Re: Xen network domain performance for 10Gb NIC

2020-04-27 Thread tosher 1
> Driver domains with passthrough devices need to perform IOMMU operations in order to add/remove page table entries when doing grant maps (ie: IOMMU TLB flushes), while dom0 doesn't need to because it has the whole RAM identity mapped in the IOMMU tables. Depending on how fast your IOMMU is and

[PATCH v5 21/21] tools: Clean up vchan-socket-proxy socket

2020-04-27 Thread Jason Andryuk
To avoid socket files lingering in /run/xen, have vchan-socket-proxy clean up the sockets it creates. Use a signal handler as well as atexit to handle both means of termination. Signed-off-by: Jason Andryuk --- tools/libvchan/vchan-socket-proxy.c | 22 ++ 1 file changed, 22

[PATCH v5 17/21] docs: Add device-model-domid to xenstore-paths

2020-04-27 Thread Jason Andryuk
Document device-model-domid for when using a device model stubdomain. Signed-off-by: Jason Andryuk --- docs/misc/xenstore-paths.pandoc | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc index a152f5ea68..766e8008dc 100644

[PATCH v5 14/21] libxl: require qemu in dom0 even if stubdomain is in use

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Until xenconsoled learns how to handle multiple consoles, this is needed for save/restore support (qemu state is transferred over secondary consoles). Additionally, Linux-based stubdomain waits for all the backends to initialize during boot. Lack of some console

[PATCH v5 20/21] libxl: Kill vchan-socket-proxy when cleaning up qmp

2020-04-27 Thread Jason Andryuk
We need to kill the vchan-socket-proxy so we don't leak the daemonized processes. libxl__stubdomain_is_linux_running works against the guest_domid, but the xenstore path is beneath the stubdomain. This leads to the use of libxl_is_stubdom in addition to libxl__stubdomain_is_linux_running so that

[PATCH v5 15/21] libxl: ignore emulated IDE disks beyond the first 4

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Qemu supports only 4 emulated IDE disks, when given more (or with higher indexes), it will fail to start. Since the disks can still be accessible using PV interface, just ignore emulated path and log a warning, instead of rejecting the configuration altogether.

[PATCH v5 12/21] libxl: use vchan for QMP access with Linux stubdomain

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Access to QMP of QEMU in Linux stubdomain is possible over vchan connection. Handle the actual vchan connection in a separate process (vchan-socket-proxy). This simplified integration with QMP (already quite complex), but also allows preliminary filtering of

[PATCH v5 16/21] libxl: consider also qemu in stubdomain in libxl__dm_active check

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Since qemu-xen can now run in stubdomain too, handle this case when checking it's state too. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Signed-off-by: Jason Andryuk --- tools/libxl/libxl_dm.c | 10 -- 1 file changed, 8

[PATCH v5 13/21] Regenerate autotools files

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Since we have those generated files committed to the repo (why?!), update them after changing configure.ac. Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Jason Andryuk --- configure | 14 +- docs/configure| 14 +-

[PATCH v5 18/21] libxl: Check stubdomain kernel & ramdisk presence

2020-04-27 Thread Jason Andryuk
Just out of context is the following comment for libxl__domain_make: /* fixme: this function can leak the stubdom if it fails */ When the stubdomain kernel or ramdisk is not present, the domid and stubdomain name will indeed be leaked. Avoid the leak by checking the file presence and erroring

[PATCH v5 19/21] libxl: Refactor kill_device_model to libxl__kill_xs_path

2020-04-27 Thread Jason Andryuk
Move kill_device_model to libxl__kill_xs_path so we have a helper to kill a process from a pid stored in xenstore. We'll be using it to kill vchan-qmp-proxy. libxl__kill_xs_path takes a "what" string for use in printing error messages. kill_device_model is retained in libxl_dm.c to provide the

[PATCH v5 09/21] libxl: add save/restore support for qemu-xen in stubdomain

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Rely on a wrapper script in stubdomain to attach FD 3/4 of qemu to relevant consoles. Signed-off-by: Marek Marczykowski-Górecki Address TODO in dm_state_save_to_fdset: Only remove savefile for non-stubdom. Signed-off-by: Jason Andryuk --- Changes in v3: -

[PATCH v5 08/21] tools/libvchan: notify server when client is connected

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Let the server know when the client is connected. Otherwise server will notice only when client send some data. This change does not break existing clients, as libvchan user should handle spurious notifications anyway (for example acknowledge of remote side

[PATCH v5 10/21] tools: add missing libxenvchan cflags

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki libxenvchan.h include xenevtchn.h and xengnttab.h, so applications built with it needs applicable -I in CFLAGS too. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Signed-off-by: Jason Andryuk --- tools/Rules.mk | 2 +- 1 file changed, 1

[PATCH v5 03/21] libxl: fix qemu-trad cmdline for no sdl/vnc case

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki When qemu is running in stubdomain, any attempt to initialize vnc/sdl there will crash it (on failed attempt to load a keymap from a file). If vfb is present, all those cases are skipped. But since b053f0c4c9e533f3d97837cf897eb920b8355ed3 "libxl: do not start

[PATCH v5 05/21] libxl: Handle Linux stubdomain specific QEMU options.

2020-04-27 Thread Jason Andryuk
From: Eric Shelton This patch creates an appropriate command line for the QEMU instance running in a Linux-based stubdomain. NOTE: a number of items are not currently implemented for Linux-based stubdomains, such as: - save/restore - QMP socket - graphics output (e.g., VNC) Signed-off-by: Eric

[PATCH v5 04/21] libxl: Allow running qemu-xen in stubdomain

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Do not prohibit anymore using stubdomain with qemu-xen. To help distingushing MiniOS and Linux stubdomain, add helper inline functions libxl__stubdomain_is_linux() and libxl__stubdomain_is_linux_running(). Those should be used where really the difference is about

[PATCH v5 02/21] Document ioemu Linux stubdomain protocol

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Add documentation for upcoming Linux stubdomain for qemu-upstream. Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Jason Andryuk --- docs/misc/stubdom.txt | 50 +++ 1 file changed, 50 insertions(+) diff --git

[PATCH v5 01/21] Document ioemu MiniOS stubdomain protocol

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Add documentation based on reverse-engineered toolstack-ioemu stubdomain protocol. Signed-off-by: Marek Marczykowski-Górecki Signed-off-by: Jason Andryuk --- docs/misc/stubdom.txt | 53 +++ 1 file changed, 53

[PATCH v5 11/21] tools: add simple vchan-socket-proxy

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Add a simple proxy for tunneling socket connection over vchan. This is based on existing vchan-node* applications, but extended with socket support. vchan-socket-proxy serves both as a client and as a server, depending on parameters. It can be used to

[PATCH v5 06/21] libxl: write qemu arguments into separate xenstore keys

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki This allows using arguments with spaces, like -append, without nominating any special "separator" character. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Signed-off-by: Jason Andryuk --- Changes in v3: - previous version of this patch

[PATCH v5 00/21] Add support for qemu-xen runnning in a Linux-based stubdomain

2020-04-27 Thread Jason Andryuk
Hi, In coordination with Marek, I'm making a submission of his patches for Linux stubdomain device-model support. I made a few of my own additions, but Marek did the heavy lifting. Thank you, Marek. Below is mostly the v4 cover leter with a few additions. General idea is to allow freely set

[PATCH v5 07/21] xl: add stubdomain related options to xl config parser

2020-04-27 Thread Jason Andryuk
From: Marek Marczykowski-Górecki Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jason Andryuk Signed-off-by: Jason Andryuk --- docs/man/xl.cfg.5.pod.in | 27 +++ tools/xl/xl_parse.c | 7 +++ 2 files changed, 30 insertions(+), 4 deletions(-) diff

[xen-4.12-testing test] 149838: regressions - FAIL

2020-04-27 Thread osstest service owner
flight 149838 xen-4.12-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/149838/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 7 xen-boot fail REGR. vs. 149646 Tests which

[xen-unstable-smoke test] 149839: tolerable all pass - PUSHED

2020-04-27 Thread osstest service owner
flight 149839 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149839/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: arm: DomU Networking enable leads to Dom0 kernel oops

2020-04-27 Thread Stefano Stabellini
On Sat, 25 Apr 2020, Julien Grall wrote: > On Sat, 25 Apr 2020 at 10:49, Julien Grall wrote: > > > > On Sat, 25 Apr 2020 at 03:01, Stefano Stabellini > > wrote: > > > [ 86.900974] [ cut here ] > > > [ 86.905134] Interrupt for port 6, but apparently not enabled;

Re: [Xen-devel] xen/evtchn and forced threaded irq

2020-04-27 Thread Stefano Stabellini
On Thu, 21 Feb 2019, Julien Grall wrote: > Hi Roger, > > On Thu, 21 Feb 2019, 08:08 Roger Pau Monné, wrote: > FWIW, you can also mask the interrupt while waiting for the thread to > execute the interrupt handler. Ie: > > > Thank you for providing steps, however where would the

[xen-4.13-testing test] 149836: tolerable FAIL - PUSHED

2020-04-27 Thread osstest service owner
flight 149836 xen-4.13-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/149836/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 18 guest-localmigrate/x10 fail like 149664 test-armhf-armhf-xl-rtds 16

[xen-unstable test] 149835: regressions - FAIL

2020-04-27 Thread osstest service owner
flight 149835 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149835/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-examine 4 memdisk-try-append fail REGR. vs. 149831 Tests which did

Re: [PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Andrew Cooper
On 27/04/2020 16:28, Jan Beulich wrote: > On 27.04.2020 14:20, Andrew Cooper wrote: >> The logic is completely undocumented and almost impossible to follow. It >> actually uses return oriented programming. Rewrite it to conform to more >> normal call mechanics, and leave a big comment explaining

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Andrew Cooper
On 27/04/2020 16:15, Jan Beulich wrote: > On 27.04.2020 16:35, Andrew Cooper wrote: >> On 27/04/2020 09:03, Jan Beulich wrote: >>> The 2nd of the assertions as well as the macro's return value have been >>> assuming we're on the primary stack. While for most IST exceptions we >>> eventually switch

Re: [PATCH 1/3] x86/pv: Options to disable and/or compile out 32bit PV support

2020-04-27 Thread Andrew Cooper
On 24/04/2020 06:28, Jürgen Groß wrote: > On 23.04.20 19:35, Andrew Cooper wrote: >> On 21/04/2020 07:02, Jan Beulich wrote: >>> On 20.04.2020 20:05, Andrew Cooper wrote: On 20/04/2020 15:05, Jan Beulich wrote: > I'm in particular > concerned that we may gain a large number of such

Re: [PATCH 01/12] libxc/save: Shrink code volume where possible

2020-04-27 Thread Andrew Cooper
On 27/04/2020 20:55, Wei Liu wrote: > On Mon, Apr 27, 2020 at 06:19:37PM +0100, Ian Jackson wrote: >> Andrew Cooper writes ("Re: [PATCH 01/12] libxc/save: Shrink code volume >> where possible"): >>> On 14/01/2020 16:48, Ian Jackson wrote: Andrew Cooper writes ("[PATCH 01/12] libxc/save:

Re: [PATCH 01/12] libxc/save: Shrink code volume where possible

2020-04-27 Thread Wei Liu
On Mon, Apr 27, 2020 at 06:19:37PM +0100, Ian Jackson wrote: > Andrew Cooper writes ("Re: [PATCH 01/12] libxc/save: Shrink code volume where > possible"): > > On 14/01/2020 16:48, Ian Jackson wrote: > > > Andrew Cooper writes ("[PATCH 01/12] libxc/save: Shrink code volume where > > > possible"):

Re: [PATCH 2/2] x86: drop high compat r/o M2P table address range

2020-04-27 Thread Wei Liu
On Wed, Apr 15, 2020 at 10:23:58AM +0200, Jan Beulich wrote: > Now that we don't properly hook things up into the page tables anymore > we also don't need to set aside an address range. Drop it, using > compat_idle_pg_table_l2[] simply (explicitly) from slot 0. > > While doing the re-arrangement,

Re: Xen network domain performance for 10Gb NIC

2020-04-27 Thread tosher 1
The driver domain is HVM. Both the driver domain and On Monday, April 27, 2020, 1:28:13 AM EDT, Jürgen Groß wrote: > Is the driver domain PV or HVM? The driver domain is HVM. > How many vcpus do dom0, the driver domain and the guest have? Dom0 has 12 vcpus, pinned. Both the driver

Re: [PATCH v2 1/1] golang/xenlight: add NameToDomid and DomidToName util functions

2020-04-27 Thread Nick Rosbrook
On Mon, Apr 27, 2020 at 8:59 AM George Dunlap wrote: > > > > > On Apr 24, 2020, at 4:02 AM, Nick Rosbrook wrote: > > > > Many exported functions in xenlight require a domid as an argument. Make > > it easier for package users to use these functions by adding wrappers > > for the libxl utility

[xen-unstable-smoke test] 149837: tolerable all pass - PUSHED

2020-04-27 Thread osstest service owner
flight 149837 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149837/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH 01/12] libxc/save: Shrink code volume where possible

2020-04-27 Thread Ian Jackson
Andrew Cooper writes ("Re: [PATCH 01/12] libxc/save: Shrink code volume where possible"): > On 14/01/2020 16:48, Ian Jackson wrote: > > Andrew Cooper writes ("[PATCH 01/12] libxc/save: Shrink code volume where > > possible"): > >> A property of how the error handling (0 on success, nonzero

[PATCH] mem_sharing: map shared_info page to same gfn during fork

2020-04-27 Thread Tamas K Lengyel
During a VM fork we copy the shared_info page; however, we also need to ensure that the page is mapped into the same GFN in the fork as its in the parent. Signed-off-by: Tamas K Lengyel Suggested-by: Roger Pau Monne --- xen/arch/x86/mm/mem_sharing.c | 29 + 1 file

Re: [PATCH v7 08/12] xen: add /buildinfo/config entry to hypervisor filesystem

2020-04-27 Thread George Dunlap
> On Apr 27, 2020, at 4:40 PM, Jürgen Groß wrote: > > Stefano, > > On 06.04.20 14:29, Jan Beulich wrote: >> On 03.04.2020 17:45, Jürgen Groß wrote: >>> On 03.04.20 17:33, Jan Beulich wrote: On 03.04.2020 17:12, Jürgen Groß wrote: > On 03.04.20 16:31, Jan Beulich wrote: >> On

Re: [PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Roger Pau Monné
On Mon, Apr 27, 2020 at 05:18:52PM +0100, Andrew Cooper wrote: > On 27/04/2020 16:18, Roger Pau Monné wrote: > > On Mon, Apr 27, 2020 at 01:20:41PM +0100, Andrew Cooper wrote: > >> +/* Helpers - Read outer scope but only modify p. */ > >> +#define APPEND_BUFF(b) ({ memcpy(p, b, sizeof(b)); p

Re: [PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Andrew Cooper
On 27/04/2020 16:18, Roger Pau Monné wrote: > On Mon, Apr 27, 2020 at 01:20:41PM +0100, Andrew Cooper wrote: >> The logic is completely undocumented and almost impossible to follow. It >> actually uses return oriented programming. Rewrite it to conform to more >> normal call mechanics, and leave

Re: [PATCH v2 14/17] libxc/save: Write X86_{CPUID,MSR}_DATA records

2020-04-27 Thread Ian Jackson
Andrew Cooper writes ("[PATCH v2 14/17] libxc/save: Write X86_{CPUID,MSR}_DATA records"): > With all other plumbing in place, obtain the CPU Policy from Xen and > write it into the migration stream. Thanks for your earlier explanation in the thread: In all cases with migration development,

Re: [PATCH v2 03/17] tools/migration: Drop IHDR_VERSION constant from libxc and python [and 1 more messages]

2020-04-27 Thread Ian Jackson
Andrew Cooper writes ("Re: [PATCH v2 03/17] tools/migration: Drop IHDR_VERSION constant from libxc and python"): > I presume you mean here 2x send IHDR and 2x receive IHDR, one C and one > Python in each case. > > I understand what you're suggesting.  I completely disagree with it, as > it

Re: [PATCH v3 10/17] tools/libxl: Plumb a restore boolean into libxl__domain_build_state

2020-04-27 Thread Ian Jackson
Andrew Cooper writes ("[PATCH v3 10/17] tools/libxl: Plumb a restore boolean into libxl__domain_build_state"): > To fix CPUID handling, libxl__build_pre() is going to have to distinguish > between a brand new VM vs one which is being migrated-in/resumed. > > Transcribe dcs->restore_fd into

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Roger Pau Monné
On Mon, Apr 27, 2020 at 04:08:59PM +0200, Jan Beulich wrote: > On 27.04.2020 11:59, Roger Pau Monné wrote: > > On Mon, Apr 27, 2020 at 10:03:05AM +0200, Jan Beulich wrote: > >> --- a/xen/include/asm-x86/regs.h > >> +++ b/xen/include/asm-x86/regs.h > >> @@ -10,9 +10,10 @@ > >> /* Frame pointer

Re: [PATCH v4] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Jürgen Groß
On 27.04.20 17:50, Paul Durrant wrote: From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought

[PATCH v4] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought into scope. Thus it makes more sense to

RE: [PATCH v3] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
> -Original Message- > From: Jürgen Groß > Sent: 27 April 2020 16:14 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Paul Durrant ; Andrew Cooper > ; George Dunlap > ; Ian Jackson ; Jan > Beulich ; > Julien Grall ; Stefano Stabellini ; > Wei Liu > Subject: Re: [PATCH v3]

[linux-linus test] 149832: tolerable FAIL - PUSHED

2020-04-27 Thread osstest service owner
flight 149832 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/149832/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-rtds 16 guest-localmigrate fail REGR. vs. 149830 Tests which did not

Re: [PATCH v7 08/12] xen: add /buildinfo/config entry to hypervisor filesystem

2020-04-27 Thread Jürgen Groß
Stefano, On 06.04.20 14:29, Jan Beulich wrote: On 03.04.2020 17:45, Jürgen Groß wrote: On 03.04.20 17:33, Jan Beulich wrote: On 03.04.2020 17:12, Jürgen Groß wrote: On 03.04.20 16:31, Jan Beulich wrote: On 02.04.2020 17:46, Juergen Gross wrote: --- a/xen/common/Kconfig +++

Re: [PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Jan Beulich
On 27.04.2020 14:20, Andrew Cooper wrote: > The logic is completely undocumented and almost impossible to follow. It > actually uses return oriented programming. Rewrite it to conform to more > normal call mechanics, and leave a big comment explaining thing. As well as > the code being easier

Re: [PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Roger Pau Monné
On Mon, Apr 27, 2020 at 01:20:41PM +0100, Andrew Cooper wrote: > The logic is completely undocumented and almost impossible to follow. It > actually uses return oriented programming. Rewrite it to conform to more > normal call mechanics, and leave a big comment explaining thing. As well as >

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Jan Beulich
On 27.04.2020 16:35, Andrew Cooper wrote: > On 27/04/2020 09:03, Jan Beulich wrote: >> The 2nd of the assertions as well as the macro's return value have been >> assuming we're on the primary stack. While for most IST exceptions we >> eventually switch back to the main one, > > "we switch to the

Re: [PATCH v3] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Jürgen Groß
On 27.04.20 17:06, Paul Durrant wrote: From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought

[PATCH v3] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought into scope. Thus it makes more sense to

Re: [PATCH v7 05/12] libs: add libxenhypfs

2020-04-27 Thread George Dunlap
> On Apr 2, 2020, at 4:46 PM, Juergen Gross wrote: > > Add the new library libxenhypfs for access to the hypervisor filesystem. > > Signed-off-by: Juergen Gross > Acked-by: Wei Liu Just a few questions... > +/* Returned buffer and dirent should be freed via free(). */ > +void

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Andrew Cooper
On 27/04/2020 09:03, Jan Beulich wrote: > The 2nd of the assertions as well as the macro's return value have been > assuming we're on the primary stack. While for most IST exceptions we > eventually switch back to the main one, "we switch to the main one when interrupting user mode".

Re: [PATCH] x86/IST: Fix comment about stack layout

2020-04-27 Thread Jan Beulich
On 27.04.2020 15:19, Wei Liu wrote: >> --- a/xen/include/asm-x86/current.h >> +++ b/xen/include/asm-x86/current.h >> @@ -18,7 +18,7 @@ >> * 6 - Primary stack >> * 5 - Optionally not present (MEMORY_GUARD) >> * 4 - Unused; optionally not present (MEMORY_GUARD) >> - * 3 - Unused; optionally

Re: [PATCH] x86/IST: Fix comment about stack layout

2020-04-27 Thread Andrew Cooper
On 27/04/2020 14:19, Wei Liu wrote: > On Mon, Apr 27, 2020 at 02:17:02PM +0100, Andrew Cooper wrote: >> This was an oversight in c/s 5d37af364dc "x86/traps: Use an Interrupt Stack >> Table for #DB" which introduced the #DB IST to begin with. >> >> Reported-by: Jan Beulich >> Signed-off-by: Andrew

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Jan Beulich
On 27.04.2020 11:59, Roger Pau Monné wrote: > On Mon, Apr 27, 2020 at 10:03:05AM +0200, Jan Beulich wrote: >> --- a/xen/include/asm-x86/regs.h >> +++ b/xen/include/asm-x86/regs.h >> @@ -10,9 +10,10 @@ >> /* Frame pointer must point into current CPU stack. */ >> \ >>

Re: [PATCH v7 03/12] docs: add feature document for Xen hypervisor sysfs-like support

2020-04-27 Thread George Dunlap
> On Apr 2, 2020, at 4:46 PM, Juergen Gross wrote: [snip] > +* {VALUE, VALUE, ... } -- a list of possible values separated by "," and > + enclosed in "{" and "}". [snip] > +So an entry could look like this: > + > +/cpu-bugs/active-pv/xpti = ("No"|{"dom0", "domU", "PCID on"}) [w,X86,PV] > +

Cpu on/offlining crash with core scheduling

2020-04-27 Thread Sergey Dyasli
Hi Juergen, When I'm testing vcpu pinning with something like: # xl vcpu-pin 0 0 2 # xen-hptool cpu-offline 3 (offline / online CPUs {2,3} if the above is successful) I'm reliably seeing the following crash on the latest staging: (XEN) Watchdog timer detects that CPU1 is stuck!

Re: [PATCH] mini-os: Avoid segfaults in tc{g,s}etattr

2020-04-27 Thread Jason Andryuk
On Mon, Apr 27, 2020 at 3:54 AM Samuel Thibault wrote: > > Jason Andryuk, le dim. 26 avril 2020 23:40:19 -0400, a ecrit: > > Commit c96c22f1d94 "mini-os: minimal implementations of some termios > > functions" introduced implementations of tcgetattr and tcsetattr. > > However, they do not check if

[PATCH] x86/IST: Fix comment about stack layout

2020-04-27 Thread Andrew Cooper
This was an oversight in c/s 5d37af364dc "x86/traps: Use an Interrupt Stack Table for #DB" which introduced the #DB IST to begin with. Reported-by: Jan Beulich Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/include/asm-x86/current.h | 2 +- 1 file

Re: [PATCH] x86/pvh: Override opt_console_xen earlier

2020-04-27 Thread Wei Liu
On Mon, Apr 27, 2020 at 01:19:44PM +0100, Andrew Cooper wrote: > This allows printk() to work from the start of day, and backtraces from as > early as the IDT is set up. > > Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu

Re: [PATCH v2 1/1] golang/xenlight: add NameToDomid and DomidToName util functions

2020-04-27 Thread George Dunlap
> On Apr 24, 2020, at 4:02 AM, Nick Rosbrook wrote: > > Many exported functions in xenlight require a domid as an argument. Make > it easier for package users to use these functions by adding wrappers > for the libxl utility functions libxl_name_to_domid and > libxl_domid_to_name. > >

[PATCH] x86/pvh: Override opt_console_xen earlier

2020-04-27 Thread Andrew Cooper
This allows printk() to work from the start of day, and backtraces from as early as the IDT is set up. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/boot/head.S | 3 +++ xen/arch/x86/setup.c | 5 - 2 files changed, 3 insertions(+),

[PATCH] x86/ioemul: Rewrite stub generation

2020-04-27 Thread Andrew Cooper
The logic is completely undocumented and almost impossible to follow. It actually uses return oriented programming. Rewrite it to conform to more normal call mechanics, and leave a big comment explaining thing. As well as the code being easier to follow, it will execute faster as it isn't

[xen-unstable test] 149831: tolerable FAIL

2020-04-27 Thread osstest service owner
flight 149831 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/149831/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-rtds15 guest-saverestore fail in 149829 pass in 149831 test-armhf-armhf-xl-vhd 11

RE: [PATCH v2] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
> -Original Message- > From: Jürgen Groß > Sent: 27 April 2020 12:13 > To: p...@xen.org; xen-devel@lists.xenproject.org > Cc: 'Paul Durrant' > Subject: Re: [PATCH v2] docs/designs: re-work the xenstore migration > document... > > On 27.04.20 12:45, Paul Durrant wrote: > >>

[PATCH v7 10/11] x86emul: support RDPRU

2020-04-27 Thread Jan Beulich
While the PM doesn't say so, this assumes that the MPERF value read this way gets scaled similarly to its reading through RDMSR. Also introduce the SVM related constants at this occasion. Signed-off-by: Jan Beulich --- v6: Re-base. v5: The CPUID field used is just 8 bits wide. v4: Add

[PATCH v7 11/11] x86/HVM: don't needlessly intercept APERF/MPERF/TSC MSR reads

2020-04-27 Thread Jan Beulich
If the hardware can handle accesses, we should allow it to do so. This way we can expose EFRO to HVM guests, and "all" that's left for exposing APERF/MPERF is to figure out how to handle writes to these MSRs. (Note that the leaf 6 guest CPUID checks will evaluate to false for now, as

[PATCH v7 09/11] x86/HVM: scale MPERF values reported to guests (on AMD)

2020-04-27 Thread Jan Beulich
AMD's PM specifies that MPERF (and its r/o counterpart) reads are affected by the TSC ratio. Hence when processing such reads in software we too should scale the values. While we don't currently (yet) expose the underlying feature flags, besides us allowing the MSRs to be read nevertheless, RDPRU

[PATCH v7 08/11] x86emul: support FXSAVE/FXRSTOR

2020-04-27 Thread Jan Beulich
Note that FPU selector handling as well as MXCSR mask saving for now does not honor differences between host and guest visible featuresets. Since operation of the insns on CR4.OSFXSR is implementation dependent, the easiest solution is used: Simply don't look at the bit in the first place.

[PATCH v7 07/11] x86emul: support FLDENV and FRSTOR

2020-04-27 Thread Jan Beulich
While the Intel SDM claims that FRSTOR itself may raise #MF upon completion, this was confirmed by Intel to be a doc error which will be corrected in due course; behavior is like FLDENV, and like old hard copy manuals describe it. Otherwise we'd have to emulate the insn by filling st(N) in

[PATCH v7 06/11] x86emul: support FNSTENV and FNSAVE

2020-04-27 Thread Jan Beulich
To avoid introducing another boolean into emulator state, the rex_prefix field gets (ab)used to convey the real/VM86 vs protected mode info (affecting structure layout, albeit not size) to x86_emul_blk(). Signed-off-by: Jan Beulich --- TBD: The full 16-bit padding fields in the 32-bit structures

[PATCH v7 05/11] x86emul: support X{SUS,RES}LDTRK

2020-04-27 Thread Jan Beulich
There's nothing to be done by the emulator, as we unconditionally abort any XBEGIN. Signed-off-by: Jan Beulich --- v6: New. --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -208,6 +208,7 @@ int libxl_cpuid_parse_config(libxl_cpuid {"avx512-vnni", 0x0007, 0,

[PATCH v7 04/11] x86emul: support SERIALIZE

2020-04-27 Thread Jan Beulich
... enabling its use by all guest kinds at the same time. Signed-off-by: Jan Beulich --- v7: Re-base. v6: New. --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -214,6 +214,7 @@ int libxl_cpuid_parse_config(libxl_cpuid {"avx512-4vnniw",0x0007, 0, CPUID_REG_EDX,

Re: [PATCH v2] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Jürgen Groß
On 27.04.20 12:45, Paul Durrant wrote: -Original Message- From: Jürgen Groß Sent: 27 April 2020 11:37 To: Paul Durrant ; xen-devel@lists.xenproject.org Cc: Paul Durrant Subject: Re: [PATCH v2] docs/designs: re-work the xenstore migration document... On 27.04.20 09:53, Paul Durrant

[PATCH v7 02/11] x86emul: support MOVDIR{I,64B} insns

2020-04-27 Thread Jan Beulich
Introduce a new blk() hook, paralleling the rmw() one in a certain way, but being intended for larger data sizes, and hence its HVM intermediate handling function doesn't fall back to splitting the operation if the requested virtual address can't be mapped. Note that SDM revision 071 doesn't

[PATCH v7 03/11] x86emul: support ENQCMD insn

2020-04-27 Thread Jan Beulich
Note that the ISA extensions document revision 037 doesn't specify exception behavior for ModRM.mod == 0b11; assuming #UD here. No tests are being added to the harness - this would be quite hard, we can't just issue the insns against RAM. Their similarity with MOVDIR64B should have the test case

[PATCH v7 01/11] x86emul: disable FPU/MMX/SIMD insn emulation when !HVM

2020-04-27 Thread Jan Beulich
In a pure PV environment (the PV shim in particular) we don't really need emulation of all these. To limit #ifdef-ary utilize some of the CASE_*() macros we have, by providing variants expanding to (effectively) nothing (really a label, which in turn requires passing -Wno-unused-label to the

[PATCH v7 00/11] x86emul: further work

2020-04-27 Thread Jan Beulich
At least the RDPRU patches is still at least partly RFC. I'd appreciate though if at least some of the series could go in rather sooner than later. Note in particular that there's no strong ordering throughout the entire series, i.e. certain later parts could be arranged for to go in earlier. This

[xen-unstable-smoke test] 149834: tolerable all pass - PUSHED

2020-04-27 Thread osstest service owner
flight 149834 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/149834/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

RE: [PATCH v2] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
> -Original Message- > From: Jürgen Groß > Sent: 27 April 2020 11:37 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Paul Durrant > Subject: Re: [PATCH v2] docs/designs: re-work the xenstore migration > document... > > On 27.04.20 09:53, Paul Durrant wrote: > > From: Paul

Re: [PATCH v2] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Jürgen Groß
On 27.04.20 09:53, Paul Durrant wrote: From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought

Re: [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-27 Thread Roger Pau Monné
On Mon, Apr 27, 2020 at 11:12:35AM +0100, Wei Liu wrote: > On Thu, Apr 23, 2020 at 06:33:49PM +0200, Jan Beulich wrote: > > On 23.04.2020 16:56, Roger Pau Monne wrote: > > > Introduce a specific flag to request a HVM guest linear TLB flush, > > > which is an ASID/VPID tickle that forces a guest

Re: [PATCH v14 3/3] xen/tools: VM forking toolstack side

2020-04-27 Thread Wei Liu
On Fri, Apr 10, 2020 at 10:20:49AM -0600, Tamas K Lengyel wrote: > On Fri, Apr 10, 2020 at 10:19 AM Wei Liu wrote: > > > > On Fri, Apr 10, 2020 at 10:05:50AM -0600, Tamas K Lengyel wrote: > > > On Thu, Apr 9, 2020 at 11:30 AM Tamas K Lengyel > > > wrote: > > > > > > > > On Thu, Apr 9, 2020 at

Re: [PATCH v11 1/3] x86/tlb: introduce a flush HVM ASIDs flag

2020-04-27 Thread Wei Liu
On Thu, Apr 23, 2020 at 06:33:49PM +0200, Jan Beulich wrote: > On 23.04.2020 16:56, Roger Pau Monne wrote: > > Introduce a specific flag to request a HVM guest linear TLB flush, > > which is an ASID/VPID tickle that forces a guest linear to guest > > physical TLB flush for all HVM guests. > > > >

Re: [PATCH] x86: refine guest_mode()

2020-04-27 Thread Roger Pau Monné
On Mon, Apr 27, 2020 at 10:03:05AM +0200, Jan Beulich wrote: > The 2nd of the assertions as well as the macro's return value have been > assuming we're on the primary stack. While for most IST exceptions we > eventually switch back to the main one, for #DF we intentionally never > do, and hence a

Re: [PATCH 2/2] golang/xenlight: stop tracking generated files

2020-04-27 Thread George Dunlap
> On Apr 23, 2020, at 1:25 AM, Nick Rosbrook wrote: > > The generated go files were tracked temporarily while the initial > implementation of gengotypes.py was in progress. They can now be removed > and ignored by git and hg. > > While here, make sure generated files are removed by make clean.

Re: [PATCH v17 1/2] mem_sharing: fix sharability check during fork reset

2020-04-27 Thread Roger Pau Monné
On Sat, Apr 25, 2020 at 06:31:46AM -0600, Tamas K Lengyel wrote: > On Sat, Apr 25, 2020 at 3:01 AM Roger Pau Monné wrote: > > > > On Fri, Apr 24, 2020 at 06:18:24AM -0600, Tamas K Lengyel wrote: > > > On Fri, Apr 24, 2020 at 3:44 AM Roger Pau Monné > > > wrote: > > > > > > > > On Thu, Apr 23,

[PATCH] x86: refine guest_mode()

2020-04-27 Thread Jan Beulich
The 2nd of the assertions as well as the macro's return value have been assuming we're on the primary stack. While for most IST exceptions we eventually switch back to the main one, for #DF we intentionally never do, and hence a #DF actually triggering on a user mode insn (which then is still a

[PATCH v2] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought into scope. Thus it makes more sense to

Re: [PATCH] mini-os: Avoid segfaults in tc{g,s}etattr

2020-04-27 Thread Samuel Thibault
Jason Andryuk, le dim. 26 avril 2020 23:40:19 -0400, a ecrit: > Commit c96c22f1d94 "mini-os: minimal implementations of some termios > functions" introduced implementations of tcgetattr and tcsetattr. > However, they do not check if files[fildes].cons.dev is non-NULL before > dereferencing. This

RE: [PATCH] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Paul Durrant
> -Original Message- > From: Jürgen Groß > Sent: 27 April 2020 08:42 > To: Paul Durrant ; xen-devel@lists.xenproject.org > Cc: Paul Durrant > Subject: Re: [PATCH] docs/designs: re-work the xenstore migration document... > > On 24.04.20 15:37, Paul Durrant wrote: > > From: Paul Durrant

Re: [PATCH] docs/designs: re-work the xenstore migration document...

2020-04-27 Thread Jürgen Groß
On 24.04.20 15:37, Paul Durrant wrote: From: Paul Durrant ... to specify a separate migration stream that will also be suitable for live update. The original scope of the document was to support non-cooperative migration of guests [1] but, since then, live update of xenstored has been brought

RE: [PATCH 02/11] xen: Fix and improve handling of device_add usb-host errors

2020-04-27 Thread Paul Durrant
> -Original Message- > From: Markus Armbruster > Sent: 24 April 2020 20:20 > To: qemu-de...@nongnu.org > Cc: Stefano Stabellini ; Anthony Perard > ; Paul > Durrant ; Gerd Hoffmann ; > xen-devel@lists.xenproject.org > Subject: [PATCH 02/11] xen: Fix and improve handling of device_add

  1   2   >