[Xen-devel] [PATCH net-next] xen-netback: use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/net/xen-netback/netback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Xen-devel] [ovmf test] 125734: all pass - PUSHED

2018-08-01 Thread osstest service owner
flight 125734 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/125734/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d65b78f101b3f2845dc20b9556faf3f14904f3c5 baseline version: ovmf

[Xen-devel] [xen-4.10-testing baseline-only test] 75034: tolerable FAIL

2018-08-01 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75034 xen-4.10-testing real [real] http://osstest.xensource.com/osstest/logs/75034/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-qemuu-nested-intel 14 xen-boot/l1 fail

Re: [Xen-devel] [RFC PATCH 09/17] libxl: use \x1b to separate qemu arguments for linux stubdomain

2018-08-01 Thread Simon Gaiser
Marek Marczykowski-Górecki: > On Wed, Aug 01, 2018 at 10:36:26AM -0400, Jason Andryuk wrote: >> On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki >> wrote: >>> This allows using arguments with spaces, like -append. >>> Stubdomain side of this require "xenstore-client: Add option for

Re: [Xen-devel] [RFC PATCH 09/17] libxl: use \x1b to separate qemu arguments for linux stubdomain

2018-08-01 Thread Simon Gaiser
Simon Gaiser: > Marek Marczykowski-Górecki: >> On Wed, Aug 01, 2018 at 10:36:26AM -0400, Jason Andryuk wrote: >>> On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki >>> wrote: This allows using arguments with spaces, like -append. Stubdomain side of this require

[Xen-devel] [xen-4.7-testing test] 125708: regressions - FAIL

2018-08-01 Thread osstest service owner
flight 125708 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/125708/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-pair 22 guest-migrate/src_host/dst_host fail REGR. vs. 125057 Tests

[Xen-devel] [xen-4.6-testing test] 125705: tolerable FAIL - PUSHED

2018-08-01 Thread osstest service owner
flight 125705 xen-4.6-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/125705/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-vhd 6 xen-install fail in 125683 pass in 125705 test-amd64-i386-rumprun-i386

[Xen-devel] [freebsd-master test] 125725: regressions - trouble: blocked/fail

2018-08-01 Thread osstest service owner
flight 125725 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/125725/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-freebsd 7 freebsd-buildfail REGR. vs. 125317 Tests which did

Re: [Xen-devel] [PATCH v8 08/11] arm: add ALL_PLAT, QEMU, Rcar3 and MPSoC configs

2018-08-01 Thread Stefano Stabellini
On Wed, 1 Aug 2018, Andrii Anisov wrote: > Hello Stefano, > > > On 30.07.18 20:48, Stefano Stabellini wrote: > > Add a "Platform Support" choice with four kconfig options: QEMU, RCAR3, > > MPSOC and ALL_PLAT. They enable the required options for their hardware > > platform. ALL_PLAT enables all

Re: [Xen-devel] [PATCH v6 7/7] xen/arm: export shared memory regions as reserved-memory on device tree

2018-08-01 Thread Stefano Stabellini
On Wed, 1 Aug 2018, Julien Grall wrote: > Hi, > > On 31/07/18 19:23, Stefano Stabellini wrote: > > Shared memory regions need to be advertised to the guest. Fortunately, a > > device tree binding for special memory regions already exist: > > reserved-memory. > > > > Add a reserved-memory node

Re: [Xen-devel] [PATCH v6 1/7] xen: xsm: flask: introduce XENMAPSPACE_gmfn_share for memory sharing

2018-08-01 Thread Stefano Stabellini
On Wed, 1 Aug 2018, Jan Beulich wrote: > First of all I think your Cc list is too short here - all of REST should be > included imo. CC'ing them now. I'll also add them automatically from next time. > >>> On 31.07.18 at 20:23, wrote: > > --- a/xen/include/xsm/dummy.h > > +++

Re: [Xen-devel] [PATCH 3/3] x86/spec-ctrl: Add support for modifying SSBD AMD VIA LS_CFG MSR

2018-08-01 Thread Brian Woods
On Tue, Jul 31, 2018 at 05:25:27AM -0600, Jan Beulich wrote: > Code structure wise this looks to undo a fair part of what patch > 1 has done. It would be nice to limit code churn. Patch 1 stand alone just to improve reporting the capabilities of the processor. Currently Xen doesn't mention

Re: [Xen-devel] [RFC PATCH 09/17] libxl: use \x1b to separate qemu arguments for linux stubdomain

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:36:26AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > This allows using arguments with spaces, like -append. > > Stubdomain side of this require "xenstore-client: Add option for raw > > in-/output" commit. > > I

Re: [Xen-devel] [RFC PATCH 08/17] xl: add stubdomain related options to xl config parser

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:35:59AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > No Signed-off-by Sigh, does anyone know how to configure git-series (or git commit) to add it automatically? I know how to do that for git format-patch, but

Re: [Xen-devel] [RFC PATCH 07/17] libxl: add save/restore support for qemu-xen in stubdomain

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:35:26AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > Rely on a wrapper script in stubdomain to attach FD 3/4 of qemu to > > relevant consoles. > > Should FD 3 & 4 be defined in some header? That's not useful

Re: [Xen-devel] [RFC PATCH 06/17] libxl: create vkb device only for guests with graphics output

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:30:14AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > The forced vkb device is meant for better performance of qemu access > > (at least according to ebbd2561b4cefb299f0f68a88b2788504223de18 "libxl: > > Add a

Re: [Xen-devel] [PATCH 1/3] x86/spec-ctrl: add AMD SSBD LS_CFG in init print

2018-08-01 Thread Brian Woods
On Tue, Jul 31, 2018 at 04:47:48AM -0600, Jan Beulich wrote: > Pointless initializer. Noted > Why log the same string twice? Simply OR together both conditions. > Also please don't omit the blank before the ? operator. Both remarks > apply as well further down. Because they're completely

Re: [Xen-devel] [PATCH 2/3] x86/spec-ctrl: Add defines and variables for AMD SSBD support

2018-08-01 Thread Brian Woods
On Tue, Jul 31, 2018 at 04:44:57AM -0600, Jan Beulich wrote: > Whether these additions fit the purpose can only be told when > seeing their use. Please fold this into the patch using these. > > Jan I was trying to split up patch 3 but I'll combine 2 and 3. -- Brian Woods

[Xen-devel] [linux-linus test] 125702: tolerable FAIL - PUSHED

2018-08-01 Thread osstest service owner
flight 125702 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/125702/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 17 guest-stopfail like 125648 test-armhf-armhf-libvirt 14

[Xen-devel] [ovmf test] 125714: all pass - PUSHED

2018-08-01 Thread osstest service owner
flight 125714 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/125714/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 7343bc8062c893ed6d40b25a9329d51340e0d703 baseline version: ovmf

[Xen-devel] [xen-4.8-testing test] 125700: tolerable FAIL - PUSHED

2018-08-01 Thread osstest service owner
flight 125700 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/125700/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-xtf-amd64-amd64-5 50 xtf/test-hvm64-lbr-tsx-vmentry fail like 125500 test-xtf-amd64-amd64-2 50

Re: [Xen-devel] [PATCH v9] new config option vtsc_tolerance_khz to avoid TSC emulation

2018-08-01 Thread Olaf Hering
Am Tue, 26 Jun 2018 19:11:13 +0200 schrieb Olaf Hering : > Am Thu, 7 Jun 2018 15:08:29 +0200 > schrieb Olaf Hering : > > Add an option to control when vTSC emulation will be activated for a > > domU with tsc_mode=default. Without such option each TSC access from > > domU will be emulated, which

Re: [Xen-devel] [PATCH] docs/xl: Clarify documentation for mem-max and mem-set

2018-08-01 Thread Lars Kurth
On 01/08/2018, 16:41, "George Dunlap" wrote: mem-set is the primary command that users will need to use and understand. Move it first, and clarify the wording; also specify that you can't set the target higher than maxmem from the domain config. mem-max is actually a

Re: [Xen-devel] [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make page table population preemptible"...

2018-08-01 Thread Roger Pau Monné
On Wed, Aug 01, 2018 at 02:40:14PM +0100, Paul Durrant wrote: > ...to simplify the implementation and turn need_iommu back into a boolean. > > As noted in [1] the tri-state nature of need_iommu after commit 3e06b989 is > confusing, as is the implementation of pre-emption using relmem_list. > >

Re: [Xen-devel] [PATCH] x86/HVM: correct an inverted check in hvm_load()

2018-08-01 Thread Andrew Cooper
On 01/08/18 16:36, Jan Beulich wrote: > Clearly we want to put a vCPU to sleep if it is _not_ already down. > > Signed-off-by: Jan Beulich > --- > TBD: Since the flaw apparently never mattered, I imply that the function > is never called with any vCPU up. Hence an alternative might be to >

[Xen-devel] [distros-debian-squeeze test] 75033: tolerable FAIL

2018-08-01 Thread Platform Team regression test user
flight 75033 distros-debian-squeeze real [real] http://osstest.xensource.com/osstest/logs/75033/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-i386-squeeze-netboot-pygrub 10 debian-di-install fail like 75005

Re: [Xen-devel] [RFC PATCH 05/17] libxl: use xenstore for pci hotplug qemu-in-linux-stubdom commands

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:29:07AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > From: Simon Gaiser > > > > There is no QMP socket access, re-use the same mechanism as for MiniOS > > based stubdom. > > Later you add some QMP support. Is

Re: [Xen-devel] [RFC PATCH 03/17] libxl: Handle Linux stubdomain specific QEMU options.

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:25:22AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > From: Eric Shelton > > > > This patch creates an appropriate command line for the QEMU instance > > running in a Linux-based stubdomain. > > > > NOTE: a

[Xen-devel] [PATCH] docs/xl: Clarify documentation for mem-max and mem-set

2018-08-01 Thread George Dunlap
mem-set is the primary command that users will need to use and understand. Move it first, and clarify the wording; also specify that you can't set the target higher than maxmem from the domain config. mem-max is actually a pretty useless command at the moment. Clarify that users are not

[Xen-devel] [PATCH] x86/HVM: correct an inverted check in hvm_load()

2018-08-01 Thread Jan Beulich
Clearly we want to put a vCPU to sleep if it is _not_ already down. Signed-off-by: Jan Beulich --- TBD: Since the flaw apparently never mattered, I imply that the function is never called with any vCPU up. Hence an alternative might be to simply return an error if a vCPU doesn't have

Re: [Xen-devel] [PATCH v14 06/11] x86/hvm: Introduce hvm_save_mtrr_msr_one func

2018-08-01 Thread Jan Beulich
>>> On 01.08.18 at 16:57, wrote: > On Ma, 2018-07-31 at 06:16 -0600, Jan Beulich wrote: >> > > > On 25.07.18 at 14:14, wrote: >> > --- a/xen/arch/x86/hvm/mtrr.c >> > +++ b/xen/arch/x86/hvm/mtrr.c >> > @@ -718,52 +718,59 @@ int hvm_set_mem_pinned_cacheattr(struct >> > domain *d, >> > uint64_t

Re: [Xen-devel] [PATCH v14 06/11] x86/hvm: Introduce hvm_save_mtrr_msr_one func

2018-08-01 Thread Isaila Alexandru
On Ma, 2018-07-31 at 06:16 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > This is used to save data from a single instance. > > > > Signed-off-by: Alexandru Isaila > > > > --- > > Changes since v11: > > - hvm_save_mtrr_msr() now returns err from > >

Re: [Xen-devel] [RFC PATCH 04/17] libxl: Build the domain with a Linux based stubdomain

2018-08-01 Thread Jason Andryuk
On Wed, Aug 1, 2018 at 10:37 AM, Marek Marczykowski-Górecki wrote: > On Wed, Aug 01, 2018 at 10:26:06AM -0400, Jason Andryuk wrote: >> On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki >> wrote: >> > From: Eric Shelton >> > >> > This will build a Linux-based stubdomain with QEMU

Re: [Xen-devel] [PATCH v14 09/11] x86/domctl: Don't pause the whole domain if only getting vcpu state

2018-08-01 Thread Isaila Alexandru
On Ma, 2018-07-31 at 07:08 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 25.07.18 at 14:14, wrote: > > This patch is focused on moving the for loop to the caller so > > now we can save info for a single vcpu instance with the save_one > > handlers. > > > > Signed-off-by: Alexandru

Re: [Xen-devel] [PATCH 4/5] x86/cpuidle: clean up Cx dumping

2018-08-01 Thread Andrew Cooper
On 01/08/18 15:33, Jan Beulich wrote: > Don't log the same global information once per CPU. Don't log the same > information (here: the currently active state) twice. Don't prefix > decimal numbers with zeros (giving the impression they're octal). Use > format specifiers matching the type of the

Re: [Xen-devel] [PATCH 1/5] x86/cpuidle: replace a pointless NULL check

2018-08-01 Thread Andrew Cooper
On 01/08/18 15:31, Jan Beulich wrote: > The address of an array slot can't be NULL. Instead add a bounds check > to make sure the array indexing is valid (the check is against 2 since > slot zero of the array - corresponding to C0 - is of no interest here). > > Signed-off-by: Jan Beulich

Re: [Xen-devel] [RFC PATCH 04/17] libxl: Build the domain with a Linux based stubdomain

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:26:06AM -0400, Jason Andryuk wrote: > On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki > wrote: > > From: Eric Shelton > > > > This will build a Linux-based stubdomain with QEMU upstream. > > > > Signed-off-by: Eric Shelton > > > > Simon: > > * use

Re: [Xen-devel] [RFC PATCH 08/17] xl: add stubdomain related options to xl config parser

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: No Signed-off-by > --- > docs/man/xl.cfg.pod.5.in | 23 +++ > tools/xl/xl_parse.c | 7 +++ > 2 files changed, 26 insertions(+), 4 deletions(-) > > diff --git a/docs/man/xl.cfg.pod.5.in

Re: [Xen-devel] [RFC PATCH 09/17] libxl: use \x1b to separate qemu arguments for linux stubdomain

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > This allows using arguments with spaces, like -append. > Stubdomain side of this require "xenstore-client: Add option for raw > in-/output" commit. I had to look up \x1b - it is ascii escape. Since I was on the

Re: [Xen-devel] [RFC PATCH 07/17] libxl: add save/restore support for qemu-xen in stubdomain

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > Rely on a wrapper script in stubdomain to attach FD 3/4 of qemu to > relevant consoles. Should FD 3 & 4 be defined in some header? That's not useful from a wrapper shell script, but it should be documented somewhere.

[Xen-devel] [PATCH 5/5] x86: place non-parked CPUs into wait-for-SIPI state after offlining

2018-08-01 Thread Jan Beulich
This is presumably more power efficient than keeping them in a HLT loop, and I supposed also the state in which they're being handed off by firmware. Split off from wakeup_secondary_cpu() the code to assert/deassert INIT (and in turn also recurring wait-for-send-completion code), and re-use it

[Xen-devel] [PATCH 3/5] x86/cpuidle: push parked CPUs into deeper sleep states when possible

2018-08-01 Thread Jan Beulich
When the mwait-idle driver isn't used, C-state information becomes available only in the course of Dom0 starting up. Use the provided data to allow parked CPUs to sleep in a more energy efficient way, by waking them briefly (via NMI) once the data has been recorded. This involves re-arranging

[Xen-devel] [PATCH 4/5] x86/cpuidle: clean up Cx dumping

2018-08-01 Thread Jan Beulich
Don't log the same global information once per CPU. Don't log the same information (here: the currently active state) twice. Don't prefix decimal numbers with zeros (giving the impression they're octal). Use format specifiers matching the type of the corresponding expressions. Don't split

[Xen-devel] [PATCH 1/5] x86/cpuidle: replace a pointless NULL check

2018-08-01 Thread Jan Beulich
The address of an array slot can't be NULL. Instead add a bounds check to make sure the array indexing is valid (the check is against 2 since slot zero of the array - corresponding to C0 - is of no interest here). Signed-off-by: Jan Beulich --- a/xen/arch/x86/acpi/cpu_idle.c +++

[Xen-devel] [PATCH 2/5] x86/idle: re-arrange dead-idle handling

2018-08-01 Thread Jan Beulich
In order to be able to wake parked CPUs from default_dead_idle(), the function must not itself loop. Move the loop into play_dead(), and use play_dead() as well on the AP boot error path. Furthermore, not the least considering the comment in play_dead(), make sure NMI raised (for now this would

[Xen-devel] [xen-unstable baseline-only test] 75032: regressions - FAIL

2018-08-01 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75032 xen-unstable real [real] http://osstest.xensource.com/osstest/logs/75032/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-4 63 xtf/test-hvm64-xsa-204

Re: [Xen-devel] [RFC PATCH 06/17] libxl: create vkb device only for guests with graphics output

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > The forced vkb device is meant for better performance of qemu access > (at least according to ebbd2561b4cefb299f0f68a88b2788504223de18 "libxl: > Add a vkbd frontend/backend pair for HVM guests"), which isn't used if > there is

Re: [Xen-devel] [RFC PATCH 05/17] libxl: use xenstore for pci hotplug qemu-in-linux-stubdom commands

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > From: Simon Gaiser > > There is no QMP socket access, re-use the same mechanism as for MiniOS > based stubdom. Later you add some QMP support. Is this preferred because your QMP support is unreliable? > @@ -1010,7

[Xen-devel] [xen-4.10-testing test] 125698: tolerable FAIL - PUSHED

2018-08-01 Thread osstest service owner
flight 125698 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/125698/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-shadow 20 guest-start/debian.repeat fail in 125677 pass in 125698 test-armhf-armhf-xl

Re: [Xen-devel] [RFC PATCH 04/17] libxl: Build the domain with a Linux based stubdomain

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > From: Eric Shelton > > This will build a Linux-based stubdomain with QEMU upstream. > > Signed-off-by: Eric Shelton > > Simon: > * use initramfs instead of disk with rootfs > * don't initialize qmp (unused in Qubes) > *

Re: [Xen-devel] [RFC PATCH 03/17] libxl: Handle Linux stubdomain specific QEMU options.

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > 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

Re: [Xen-devel] [RFC PATCH 02/17] libxl: Add "stubdomain_version" to domain_build_info.

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > From: Eric Shelton > > This enum gives the ability to select between a MiniOS-based QEMU > traditional stub domain and a Linux-based QEMU upstream stub domain. To > use the Linux-based stubdomain, the following two lines

Re: [Xen-devel] [RFC PATCH 01/17] libxl: fix qemu-trad cmdline for no sdl/vnc case

2018-08-01 Thread Jason Andryuk
On Mon, Jul 30, 2018 at 11:56 PM, Marek Marczykowski-Górecki wrote: > 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 >

[Xen-devel] [PATCH 0/5] x86: more power-efficient CPU parking

2018-08-01 Thread Jan Beulich
When putting CPUs to sleep permanently, we should try to put them into the most power conserving state possible. For now it is unclear whether, especially in a deep C-state, the P-state also matters, so this series only arranges for the C-state side of things (plus some cleanup). 1: x86/cpuidle:

Re: [Xen-devel] [PATCH] xen: Remove domain_crash_synchronous() completely

2018-08-01 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Roger Pau Monné > Sent: 01 August 2018 14:50 > To: Andrew Cooper > Cc: Julien Grall ; Stefano Stabellini > ; Wei Liu ; Jan Beulich > ; Xen-devel > Subject: Re: [Xen-devel] [PATCH] xen:

Re: [Xen-devel] [PATCH] xen: Remove domain_crash_synchronous() completely

2018-08-01 Thread Andrew Cooper
On 01/08/18 14:50, Roger Pau Monné wrote: > On Wed, Aug 01, 2018 at 02:29:35PM +0100, Andrew Cooper wrote: >> domain_crash_synchronous() is unsafe to use in general as it may leave >> spinlocks held, temporary memory allocated, etc. >> >> With domain_crash_synchronous() removed from the ARM code

[Xen-devel] [PATCH v4 13/15] memory: add get_paged_gfn() as a wrapper...

2018-08-01 Thread Paul Durrant
...for some uses of get_page_from_gfn(). There are many occurences of the following pattern in the code: q = ? P2M_ALLOC : P2M_UNSHARE; page = get_page_from_gfn(d, gfn, , q); if ( p2m_is_paging(p2mt) ) { if ( page ) put_page(page);

[Xen-devel] [PATCH v4 10/15] mm / iommu: include need_iommu() test in iommu_use_hap_pt()

2018-08-01 Thread Paul Durrant
The name 'iommu_use_hap_pt' suggests that that P2M table is in use as the domain's IOMMU pagetable which, prior to this patch, is not strictly true since the macro did not test whether the domain actually has IOMMU mappings. Signed-off-by: Paul Durrant --- Cc: Jun Nakajima Cc: Kevin Tian Cc:

[Xen-devel] [PATCH v4 11/15] mm / iommu: split need_iommu() into has_iommu_pt() and sync_iommu_pt()

2018-08-01 Thread Paul Durrant
The name 'need_iommu' is a little confusing as it suggests a domain needs to use the IOMMU but something might not be set up yet, when in fact it doesn't become true until IOMMU mappings for the domain have been created. Two different meanings are also inferred from it in various places in the

[Xen-devel] [PATCH v4 15/15] x86: extend the map and unmap iommu_ops to support grant references

2018-08-01 Thread Paul Durrant
This patch allows a domain to add or remove foreign frames from its IOMMU mappings by grant reference as well as GFN. This is necessary, for example, to support a PV network backend that needs to construct a packet buffer that can be directly accessed by a NIC. Signed-off-by: Paul Durrant ---

[Xen-devel] [PATCH v4 12/15] x86: add iommu_op to enable modification of IOMMU mappings

2018-08-01 Thread Paul Durrant
This patch adds an iommu_op which checks whether it is possible or safe for a domain to modify its own IOMMU mappings and, if so, creates a rangeset to track modifications. NOTE: The actual map and unmap operations are introduced by subsequent patches. Signed-off-by: Paul Durrant --- Cc:

[Xen-devel] [PATCH v4 14/15] x86: add iommu_ops to modify and flush IOMMU mappings

2018-08-01 Thread Paul Durrant
This patch adds iommu_ops to add (map) or remove (unmap) frames in the domain's IOMMU mappings, and an iommu_op to synchronize (flush) those manipulations with the hardware. Mappings added by the map operation are tracked and only those mappings may be removed by a subsequent unmap operation.

Re: [Xen-devel] [PATCH] xen: Remove domain_crash_synchronous() completely

2018-08-01 Thread Roger Pau Monné
On Wed, Aug 01, 2018 at 02:29:35PM +0100, Andrew Cooper wrote: > domain_crash_synchronous() is unsafe to use in general as it may leave > spinlocks held, temporary memory allocated, etc. > > With domain_crash_synchronous() removed from the ARM code in 4.11, take the > opportunity to remove the

[Xen-devel] [PATCH v4 06/15] public / x86: introduce __HYPERCALL_iommu_op

2018-08-01 Thread Paul Durrant
This patch introduces the boilerplate for a new hypercall to allow a domain to control IOMMU mappings for its own pages. Whilst there is duplication of code between the native and compat entry points which appears ripe for some form of combination, I think it is better to maintain the separation

[Xen-devel] [PATCH v4 07/15] iommu: track reserved ranges using a rangeset

2018-08-01 Thread Paul Durrant
Ranges that should be considered reserved in the IOMMU are not necessarily limited to RMRRs. If iommu_inclusive_mapping is set then any frame number falling within an E820 reserved region should also be considered as reserved in the IOMMU. This patch adds a rangeset to the domain_iommu structure

[Xen-devel] [PATCH v4 03/15] iommu: make use of type-safe BFN and MFN in exported functions

2018-08-01 Thread Paul Durrant
This patch modifies the declaration of the entry points to the IOMMU sub-system to use bfn_t and mfn_t in place of unsigned long. A subsequent patch will similarly modify the methods in the iommu_ops structure. Signed-off-by: Paul Durrant Reviewed-by: Wei Liu --- Cc: Jan Beulich Cc: Andrew

Re: [Xen-devel] [PATCH] xen: Remove domain_crash_synchronous() completely

2018-08-01 Thread Jan Beulich
>>> On 01.08.18 at 15:29, wrote: > domain_crash_synchronous() is unsafe to use in general as it may leave > spinlocks held, temporary memory allocated, etc. > > With domain_crash_synchronous() removed from the ARM code in 4.11, take the > opportunity to remove the infrastructure completely by

[Xen-devel] [PATCH v4 01/15] re-work commit 3e06b989 "IOMMU: make page table population preemptible"...

2018-08-01 Thread Paul Durrant
...to simplify the implementation and turn need_iommu back into a boolean. As noted in [1] the tri-state nature of need_iommu after commit 3e06b989 is confusing, as is the implementation of pre-emption using relmem_list. This patch instead uses a simple count of pages already populated stored in

[Xen-devel] [PATCH v4 00/15] paravirtual IOMMU interface

2018-08-01 Thread Paul Durrant
The idea of a paravirtual IOMMU interface was last discussed on xen-devel several years ago and narrowed down on a draft specification [1]. There was also an RFC patch series posted with an implementation, however this was never followed through. In this patch series I have tried to simplify the

[Xen-devel] [PATCH v4 02/15] iommu: introduce the concept of BFN...

2018-08-01 Thread Paul Durrant
...meaning 'bus frame number' i.e. a frame number mapped in the IOMMU rather than the MMU. This patch is a largely cosmetic change that substitutes the terms 'gfn' and 'gaddr' for 'bfn' and 'baddr' in all the places where the frame number or address relate to the IOMMU rather than the MMU. The

[Xen-devel] [PATCH v4 05/15] iommu: don't domain_crash() inside iommu_map/unmap_page()

2018-08-01 Thread Paul Durrant
Turn iommu_map/unmap_page() into straightforward wrappers that check the existence of the relevant iommu_op and call through to it. This makes them usable by PV IOMMU code to be delivered in future patches. Leave the decision on whether to invoke domain_crash() up to the caller. This has the added

[Xen-devel] [PATCH v4 04/15] iommu: push use of type-safe BFN and MFN into iommu_ops

2018-08-01 Thread Paul Durrant
This patch modifies the methods in struct iommu_ops to use type-safe BFN and MFN. This follows on from the prior patch that modified the functions exported in xen/iommu.h. Signed-off-by: Paul Durrant Reviewed-by: Wei Liu --- Cc: Suravee Suthikulpanit Cc: Jan Beulich Cc: Kevin Tian Cc: Andrew

[Xen-devel] [PATCH v4 08/15] x86: add iommu_op to query reserved ranges

2018-08-01 Thread Paul Durrant
This patch adds an iommu_op to allow the domain IOMMU reserved ranges to be queried by the guest. NOTE: The number of reserved ranges is determined by system firmware, in conjunction with Xen command line options, and is expected to be small. Thus, to avoid over-complicating the code,

[Xen-devel] [PATCH v4 09/15] vtd: add lookup_page method to iommu_ops

2018-08-01 Thread Paul Durrant
This patch adds a new method to the VT-d IOMMU implementation to find the MFN currently mapped by the specified BFN along with a wrapper function in generic IOMMU code to call the implementation if it exists. This functionality will be used by a subsequent patch. Signed-off-by: Paul Durrant

[Xen-devel] [PATCH] xen: Remove domain_crash_synchronous() completely

2018-08-01 Thread Andrew Cooper
domain_crash_synchronous() is unsafe to use in general as it may leave spinlocks held, temporary memory allocated, etc. With domain_crash_synchronous() removed from the ARM code in 4.11, take the opportunity to remove the infrastructure completely by opencoding the softirq loop in the remaining

[Xen-devel] [xen-unstable-smoke test] 125729: tolerable all pass - PUSHED

2018-08-01 Thread osstest service owner
flight 125729 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/125729/ 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: [Xen-devel] [PATCH] x86/vmx: Avoid using domain_crash_syncrhonous() in vmx_vmentry_failure()

2018-08-01 Thread Jan Beulich
>>> On 01.08.18 at 14:55, wrote: > There is no need for the syncrhonous varient, as the vmentry failure path can > just return to processing softirqs. > > This is in aid of trying to remove domain_crash_syncrhonous() from the > codebase. > > Signed-off-by: Andrew Cooper With the name of the

[Xen-devel] [PATCH] x86/vmx: Avoid using domain_crash_syncrhonous() in vmx_vmentry_failure()

2018-08-01 Thread Andrew Cooper
There is no need for the syncrhonous varient, as the vmentry failure path can just return to processing softirqs. This is in aid of trying to remove domain_crash_syncrhonous() from the codebase. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Jun Nakajima CC: Kevin Tian ---

Re: [Xen-devel] [PATCH] x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()

2018-08-01 Thread Razvan Cojocaru
On 08/01/2018 03:07 PM, Andrew Cooper wrote: > If the EPTP pointer can't be located in the altp2m list, the domain > is (legitimately) crashed. > > Under those circumstances, execution will continue and guarentee to hit the > BUG_ON(idx >= MAX_ALTP2M) (unfortunately, just out of context). > >

[Xen-devel] [PATCH] x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()

2018-08-01 Thread Andrew Cooper
If the EPTP pointer can't be located in the altp2m list, the domain is (legitimately) crashed. Under those circumstances, execution will continue and guarentee to hit the BUG_ON(idx >= MAX_ALTP2M) (unfortunately, just out of context). Return from vmx_vmexit_handler() after the domain_crash(),

[Xen-devel] [qemu-mainline test] 125695: trouble: broken/fail/pass

2018-08-01 Thread osstest service owner
flight 125695 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/125695/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl broken

Re: [Xen-devel] [PATCH v3 17/25] xen/arm: introduce allocate_memory

2018-08-01 Thread Julien Grall
Hi, On 01/08/18 00:28, Stefano Stabellini wrote: Introduce an allocate_memory function able to allocate memory for DomUs and map it at the right guest addresses, according to the guest memory map: GUEST_RAM0_BASE and GUEST_RAM1_BASE. Signed-off-by: Stefano Stabellini --- Changes in v3: - new

Re: [Xen-devel] [PATCH v2 5/5] x86/iommu: add PVH support to the inclusive options

2018-08-01 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Roger Pau Monne > Sent: 01 August 2018 12:04 > To: xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; George Dunlap ; > Andrew Cooper ; Ian Jackson > ; Tim (Xen.org) ;

Re: [Xen-devel] [PATCH v2 3/5] iommu: make iommu_inclusive_mapping a suboption of dom0-iommu

2018-08-01 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Roger Pau Monne > Sent: 01 August 2018 12:04 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Wei Liu ; George Dunlap > ; Andrew Cooper > ; Ian Jackson ; Tim

Re: [Xen-devel] [PATCH v2 1/5] iommu/vtd: cleanup vtd_set_hwdom_mapping after ia64 removal

2018-08-01 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Roger Pau Monne > Sent: 01 August 2018 12:04 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Roger Pau Monne > > Subject: [Xen-devel] [PATCH v2 1/5] iommu/vtd: cleanup >

Re: [Xen-devel] [PATCH v2 2/5] iommu: introduce dom0-iommu option

2018-08-01 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf > Of Roger Pau Monne > Sent: 01 August 2018 12:04 > To: xen-devel@lists.xenproject.org > Cc: Kevin Tian ; Stefano Stabellini > ; Wei Liu ; Suravee > Suthikulpanit ; George Dunlap > ; Andrew

Re: [Xen-devel] [PATCH v2 2/5] iommu: introduce dom0-iommu option

2018-08-01 Thread Andrew Cooper
On 01/08/18 12:03, Roger Pau Monne wrote: > @@ -1198,6 +1204,32 @@ detection of systems known to misbehave upon accesses > to that port. > > >> Enable IOMMU debugging code (implies `verbose`). > > +### dom0-iommu > +> `= List of [ none | strict | relaxed ]` > + > +> Sub-options are of

Re: [Xen-devel] [PATCH v3 10/25] xen/arm: don't add duplicate boot modules

2018-08-01 Thread Julien Grall
Hi Stefano, On 01/08/18 00:27, Stefano Stabellini wrote: Don't add duplicate boot modules (same kind and same start address). Please explain why you don't want to duplicate it. Mark kernels and ramdisks of "xen,domain" nodes as BOOTMOD_KERNEL_DOMAIN and BOOTMOD_RAMDISK_DOMAIN respectively,

[Xen-devel] [PATCH v2 3/5] iommu: make iommu_inclusive_mapping a suboption of dom0-iommu

2018-08-01 Thread Roger Pau Monne
Introduce a new dom0-iommu=inclusive generic option that supersedes iommu_inclusive_mapping. The prevcious behaviour is preserved and the option should only be enabled by default on Intel hardware. No functional change intended. Signed-off-by: Roger Pau Monné --- Changes since v1: - Use

[Xen-devel] [PATCH v2 5/5] x86/iommu: add PVH support to the inclusive options

2018-08-01 Thread Roger Pau Monne
Several people have reported hardware issues (malfunctioning USB controllers) due to iommu page faults on Intel hardware. Those faults are caused by missing RMRR (VTd) entries in the ACPI tables. Those can be worked around on VTd hardware by manually adding RMRR entries on the command line, this

[Xen-devel] [PATCH v2 0/5] x86/iommu: PVH Dom0 workarounds for missing RMRR entries

2018-08-01 Thread Roger Pau Monne
Hello, The following series implement a workaround for missing RMRR entries for a PVH Dom0. It's based on the iommu_inclusive_mapping VTd option. The PVH workaround identity maps all regions marked as reserved in the memory map. Note that this workaround is enabled by default on Intel hardware.

[Xen-devel] [PATCH v2 4/5] dom0/pvh: change the order of the MMCFG initialization

2018-08-01 Thread Roger Pau Monne
So it's done before the iommu is initialized. This is required in order to be able to fetch the MMCFG regions from the domain struct. No functional change. Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- Cc: Jan Beulich Cc: Andrew Cooper ---

[Xen-devel] [PATCH v2 1/5] iommu/vtd: cleanup vtd_set_hwdom_mapping after ia64 removal

2018-08-01 Thread Roger Pau Monne
Remove the handling for different page sizes now that ia64 is gone. No functional change. Reported by: Jan Beulich Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- Cc: Kevin Tian --- xen/drivers/passthrough/vtd/x86/vtd.c | 17 - 1 file changed,

[Xen-devel] [PATCH v2 2/5] iommu: introduce dom0-iommu option

2018-08-01 Thread Roger Pau Monne
To select the iommu configuration used by Dom0. This option supersedes iommu=dom0-strict|dom0-passthrough. No functional change. Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version. --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien

Re: [Xen-devel] [PATCH v3 09/25] xen/arm: introduce bootcmdlines

2018-08-01 Thread Julien Grall
Hi Stefano, On 01/08/18 00:27, Stefano Stabellini wrote: Introduce a new array to store the cmdline of each boot module. It is separate from struct bootmodules. Remove the cmdline field from struct boot_module. This way, kernels and initrds with the same address in memory can share struct

Re: [Xen-devel] [PATCH] tools/gdbsx: use inttypes.h instead of custom macros

2018-08-01 Thread Marek Marczykowski-Górecki
On Wed, Aug 01, 2018 at 10:33:23AM +0100, Wei Liu wrote: > On Wed, Aug 01, 2018 at 10:19:17AM +0100, Wei Liu wrote: > > On Tue, Jul 31, 2018 at 10:19:05PM +0200, Marek Marczykowski-Górecki wrote: > > > Signed-off-by: Marek Marczykowski-Górecki > > > > > > --- > > > This is on top of

Re: [Xen-devel] [PATCH 2/4] iommu: generalize iommu_inclusive_mapping

2018-08-01 Thread Andrew Cooper
On 01/08/18 10:59, Jan Beulich wrote: On 01.08.18 at 11:20, wrote: >> On 01/08/2018 10:10, Jan Beulich wrote: Furthermore, on by default is the only reasonable option. Dom0 is specifically given cpu mappings of the reserved regions, therefore it should have matching IOMMU

Re: [Xen-devel] [PATCH 00/16] x86: indirect call overhead reduction

2018-08-01 Thread Jan Beulich
>>> On 11.07.18 at 15:15, wrote: > While indirect calls have always been more expensive than direct ones, > their cost has further increased with the Spectre v2 mitigations. In a > number of cases we simply pointlessly use them in the first place. In > many other cases the indirection solely

Re: [Xen-devel] [PATCH 2/4] iommu: generalize iommu_inclusive_mapping

2018-08-01 Thread Jan Beulich
>>> On 01.08.18 at 11:20, wrote: > On 01/08/2018 10:10, Jan Beulich wrote: >>> Furthermore, on by default is the only reasonable option. Dom0 is >>> specifically given cpu mappings of the reserved regions, therefore it >>> should have matching IOMMU mappings. >> I don't think I can uniformly

Re: [Xen-devel] [PATCH v3 07/25] xen/arm: rename acpi_make_chosen_node to make_chosen_node

2018-08-01 Thread Julien Grall
On 01/08/18 00:27, Stefano Stabellini wrote: acpi_make_chosen_node is actually generic and can be reused. Rename it to make_chosen_node and make it available to non-ACPI builds. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- Removed Julien's ack due to small change below

  1   2   >