[Xen-devel] [qemu-mainline test] 141434: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141434 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/141434/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 18 guest-localmigrate/x10 fail REGR. vs. 140282 test-armhf-armhf-

Re: [Xen-devel] [PATCH v2 08/10] tools/libxc: Rework xc_cpuid_apply_policy() to use {get, set}_cpu_policy()

2019-09-19 Thread Andrew Cooper
On 18/09/2019 17:09, Jan Beulich wrote: > On 13.09.2019 21:27, Andrew Cooper wrote: >> +else >> +{ >> +/* >> + * Topology for HVM guests is entirely controlled by Xen. For now, >> we >> + * hardcode APIC_ID = vcpu_id * 2 to give the illusion of no SMT. >> +

Re: [Xen-devel] [PATCH v2] print: introduce a format specifier for pci_sbdf_t

2019-09-19 Thread Julien Grall
Hi Roger, On 22/08/2019 07:51, Roger Pau Monne wrote: The new format specifier is '%pp', and prints a pci_sbdf_t using the seg:bus:dev.func format. Replace all SBDFs printed using '%04x:%02x:%02x.%u' to use the new format specifier. No functional change intended. Signed-off-by: Roger Pau Monné

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-19 Thread Julien Grall
Hi Lars, On 18/09/2019 12:50, Lars Kurth wrote: On 18/09/2019, 11:44, "Wieczorkiewicz, Pawel" wrote: > On 18. Sep 2019, at 12:41, Ian Jackson wrote: > > Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections"): >> On 18/09/2019 1

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-19 Thread Julien Grall
Hi Lars, On 18/09/2019 13:14, Lars Kurth wrote: On 18/09/2019, 12:15, "Julien Grall" wrote: Hi Ian, On 18/09/2019 11:41, Ian Jackson wrote: > Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify .rodata sections"): >> On 18/09/2019 10:52,

Re: [Xen-devel] [PATCH 2/2] x86emul: adjust MOVSXD source operand handling

2019-09-19 Thread Jan Beulich
On 18.09.2019 21:22, Andrew Cooper wrote: > On 18/09/2019 07:34, Jan Beulich wrote: >> On 17.09.2019 19:17, Andrew Cooper wrote: >>> On 16/09/2019 10:48, Jan Beulich wrote: XED commit 1b2fd94425 ("Update MOVSXD to modern behavior") points out that as of SDM rev 064 MOVSXD is specified to

Re: [Xen-devel] [PATCH V4 2/8] iommu/arm: Add ability to handle deferred probing request

2019-09-19 Thread Julien Grall
Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c index f219de9..555acfc 100644 --- a/xen/drivers/passthrough/arm/iommu.c +++ b/xen/drivers/passthrough/arm/iommu.c @@ -20,6 +20,12 @@ #include

Re: [Xen-devel] [PATCH V4 3/8] iommu/arm: Order the headers alphabetically in iommu.c

2019-09-19 Thread Julien Grall
Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Clean up the code a bit by putting the headers in alphabetical order. Signed-off-by: Oleksandr Tyshchenko Acked-by: Julien Grall And committed. Cheers, --- xen/drivers/passthrough/arm/iommu.c |

Re: [Xen-devel] [PATCH V4 2/8] iommu/arm: Add ability to handle deferred probing request

2019-09-19 Thread Oleksandr
On 19.09.19 12:44, Julien Grall wrote: Hi Oleksandr, Hi, Julien. On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c index f219de9..555acfc 100644 --- a/xen/drivers/passthrough/arm/iommu.c +++ b/xen/drive

[Xen-devel] [PATCH v2 11/15] libxl_usb: Fix wrong usage of asserts

2019-09-19 Thread Anthony PERARD
Replace the assert(0) by abort() since the intention in libxl is that asserts are always compiled in. This patch makes its clear and removes the need to deal with asserts been compiled out. Signed-off-by: Anthony PERARD --- Notes: v2: - replace asserts by abort(). tools/libxl/libxl_usb

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Julien Grall
Hi, On 17/09/2019 19:18, Oleksandr wrote: On 17.09.19 09:12, Jan Beulich wrote: Hi, Jan On 16.09.2019 20:08, Oleksandr wrote: On 16.09.19 13:40, Jan Beulich wrote: +/* per-device IOMMU instance data */ +struct iommu_fwspec { +    /* this device's IOMMU */ +    struct device *iommu_dev; +  

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Jan Beulich
On 19.09.2019 12:12, Julien Grall wrote: > Hi, > > On 17/09/2019 19:18, Oleksandr wrote: >> >> On 17.09.19 09:12, Jan Beulich wrote: >> >> Hi, Jan >> >>> On 16.09.2019 20:08, Oleksandr wrote: On 16.09.19 13:40, Jan Beulich wrote: >> +/* per-device IOMMU instance data */ >> +struct iom

Re: [Xen-devel] [PATCH RFC] pass-through: sync pir to irr after msix vector been updated

2019-09-19 Thread Jan Beulich
On 18.09.2019 23:16, Joe Jin wrote: > On 9/16/19 11:48 PM, Jan Beulich wrote: >> On 17.09.2019 00:20, Joe Jin wrote: >>> On 9/16/19 1:01 AM, Jan Beulich wrote: On 13.09.2019 18:38, Joe Jin wrote: > On 9/13/19 12:14 AM, Jan Beulich wrote: >> On 12.09.2019 20:03, Joe Jin wrote: >>> -

[Xen-devel] [PATCH] SVM: correct CPUID event processing

2019-09-19 Thread Jan Beulich
hvm_monitor_cpuid() expects the input registers, not two of the outputs. However, once having made the necessary adjustment, the SVM and VMX functions are so similar that they should be folded (thus avoiding further similar asymmetries to get introduced). Use the best of both worlds by e.g. using

[Xen-devel] add_maintainers.pl issues / "canonical" subject prefixes for CI v2 (was Re: [PATCH] create-diff-object: more precisely identify .rodata sections)

2019-09-19 Thread Lars Kurth
+Ross + Doug On 19/09/2019, 10:30, "Julien Grall" wrote: Hi Lars, On 18/09/2019 13:14, Lars Kurth wrote: > > > On 18/09/2019, 12:15, "Julien Grall" wrote: > > Hi Ian, > > On 18/09/2019 11:41, Ian Jackson wrote: > > Julien Gr

[Xen-devel] [xen-unstable-smoke test] 141462: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141462 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141462/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Oleksandr
Hi, all. +struct iommu_fwspec { +    /* this device's IOMMU */ +    struct device *iommu_dev; +    /* IOMMU driver private data for this device */ +    void *iommu_priv; +    /* number of associated device IDs */ +    unsigned int num_ids; +    /* IDs which this device may present to the IOMMU

[Xen-devel] [PATCH v3 1/9] libxl_internal: Remove lost comment

2019-09-19 Thread Anthony PERARD
That comment as been separated from the function it defines by 4197d3abbb3055d3798254eb7ba239bfb5824360, but then was not useful anymore when the libxl__device_disk_add() prototype was removed by 22ea8ad02e465e32cd40887c750b55c3a997a288. Signed-off-by: Anthony PERARD Acked-by: Wei Liu Acked-by:

[Xen-devel] [PATCH v3 8/9] libxl: Move qmp_parameters_* prototypes to libxl_internal.h

2019-09-19 Thread Anthony PERARD
.. and rename them to libxl__qmp_param_*. This is to allow other files than libxl_qmp.c to make QMP calls with parameters. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 15 tools/libxl/libxl_qmp.c | 75 +---

[Xen-devel] [PATCH v3 6/9] libxl_disk: Cut libxl_cdrom_insert into steps ..

2019-09-19 Thread Anthony PERARD
.. and use a new "slow" lock to avoid holding the userdata lock across several functions. This patch cuts libxl_cdrom_insert into different step/function but there are still called synchronously. (Taking the ev_lock is the only step that might be asynchronous.) A later patch will call them asynchr

[Xen-devel] [PATCH v3 4/9] libxl: Add optimisation to ev_lock

2019-09-19 Thread Anthony PERARD
It will often be the case that the lock is free to grab. So we first try to grab it before we have to fork. Even though in this case the locks are grabbed in the wrong order in the lock hierarchy (ev_lock should be outside of CTX_LOCK), it is fine to try without blocking. If that failed, we will re

[Xen-devel] [PATCH v3 5/9] libxl_disk: Reorganise libxl_cdrom_insert

2019-09-19 Thread Anthony PERARD
This is in preparation of cutting libxl_cdrom_insert into several functions to allow asynchronous callbacks. No functional changes. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_disk.c | 58 ++-- 1 file changed, 32 insertions(+),

[Xen-devel] [PATCH v3 0/9] libxl: New slow lock + fix libxl_cdrom_insert with QEMU depriv

2019-09-19 Thread Anthony PERARD
Hi, Changes in v3: - renamed libxl__ev_lock to libxl__ev_devlock - rebased - 1 patch not acked "libxl_internal: Introduce libxl__ev_devlock for devices hotplug via QMP" - other patches have been updated for the new ev_devlock name and for the rebased Changes in v2: - New libxl__ev_lock, which a

[Xen-devel] [PATCH v3 9/9] libxl_disk: Use ev_qmp in libxl_cdrom_insert

2019-09-19 Thread Anthony PERARD
Make libxl_cdrom_insert asynchronous when QEMU is involved. And have the cdrom opened by libxl, sending a file descriptor to QEMU. The "opaque" parameter of the "add-fd" can help to figure out what a fdset in QEMU is used for. It can be queried by "query-fdsets". Signed-off-by: Anthony PERARD A

[Xen-devel] [PATCH v3 3/9] libxl_internal: Introduce libxl__ev_devlock for devices hotplug via QMP

2019-09-19 Thread Anthony PERARD
The current lock `domain_userdata_lock' can't be used when modification to a guest is done by sending command to QEMU, this is a slow process and requires to call CTX_UNLOCK, which is not possible while holding the `domain_userdata_lock'. To resolve this issue, we create a new lock which can take

[Xen-devel] [PATCH v3 7/9] libxl_disk: Implement missing timeout for libxl_cdrom_insert

2019-09-19 Thread Anthony PERARD
After the patch "libxl_disk: Use ev_qmp in libxl_cdrom_insert" there will not be any kind of timeout, add one back. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- Notes: Ian, in this patch, the timeout is setup after we have aquired the lock. Should we change that to also have

[Xen-devel] [PATCH v3 2/9] libxl: Pointer on usage of libxl__domain_userdata_lock

2019-09-19 Thread Anthony PERARD
It is currently difficult to know how/when/why the userdata lock is supposed to be used. Add some pointers to the hotplug comments. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/libxl/libxl_in

[Xen-devel] [PATCH for-4.13] configure: fix print syntax for python 3

2019-09-19 Thread Wei Liu
16cc3362a missed one print statement. Signed-off-by: Wei Liu --- m4/python_devel.m4 | 2 +- tools/configure| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/python_devel.m4 b/m4/python_devel.m4 index 7f26381376..e365cd658e 100644 --- a/m4/python_devel.m4 +++ b/m4/pyth

Re: [Xen-devel] [PATCH 28/35] libxl_pci: Use ev_qmp in do_pci_add

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("[PATCH 28/35] libxl_pci: Use ev_qmp in do_pci_add"): > This patch also replaces the use of > libxl__wait_for_device_model_deprecated() by its equivalent > without the need for a thread. Thanks. Acked-by: Ian Jackson But, after your series, there are two basically-identic

Re: [Xen-devel] [PATCH for-4.13] configure: fix print syntax for python 3

2019-09-19 Thread Wei Liu
On Thu, 19 Sep 2019 at 12:17, Wei Liu wrote: > > 16cc3362a missed one print statement. > > Signed-off-by: Wei Liu > --- > m4/python_devel.m4 | 2 +- > tools/configure| 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/m4/python_devel.m4 b/m4/python_devel.m4 > index 7f

Re: [Xen-devel] [PATCH v2 11/15] libxl_usb: Fix wrong usage of asserts

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v2 11/15] libxl_usb: Fix wrong usage of asserts"): > Replace the assert(0) by abort() since the intention in libxl is that > asserts are always compiled in. This patch makes its clear and removes > the need to deal with asserts been compiled out. Acked-by: Ian Jacks

Re: [Xen-devel] [PATCH v3 3/9] libxl_internal: Introduce libxl__ev_devlock for devices hotplug via QMP

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v3 3/9] libxl_internal: Introduce libxl__ev_devlock for devices hotplug via QMP"): > The current lock `domain_userdata_lock' can't be used when modification > to a guest is done by sending command to QEMU, this is a slow process > and requires to call CTX_UNLOCK, whi

Re: [Xen-devel] [PATCH for-4.13] configure: fix print syntax for python 3

2019-09-19 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH for-4.13] configure: fix print syntax for python 3"): > On Thu, 19 Sep 2019 at 12:17, Wei Liu wrote: > > > > 16cc3362a missed one print statement. > > > > Signed-off-by: Wei Liu > > --- > > m4/python_devel.m4 | 2 +- > > tools/configure| 2 +- > > 2 files changed

Re: [Xen-devel] [PATCH for-4.13] configure: fix print syntax for python 3

2019-09-19 Thread Wei Liu
On Thu, 19 Sep 2019 at 12:28, Ian Jackson wrote: > My previous reply bounced due to header mangling in your first mail. > Let me try again: > > This is good in principle but: > > Can you provide as a git branch ? Then I will get the unmangled > version and be able to try it out. > See https://

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Julien Grall
Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU DT bindings [1] before assigning that device to a domain. So, this patch adds new

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Julien Grall
On 19/09/2019 11:57, Oleksandr wrote: Hi, all. Hi, +struct iommu_fwspec { +    /* this device's IOMMU */ +    struct device *iommu_dev; +    /* IOMMU driver private data for this device */ +    void *iommu_priv; +    /* number of associated device IDs */ +    unsigned int num_ids; +   

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Julien Grall
Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and access protection functionalities to processing units and interconnect networks. Please note, c

[Xen-devel] [PATCH] libxc/x86: avoid overflow in CPUID APIC ID adjustments

2019-09-19 Thread Jan Beulich
Recent AMD processors may report up to 128 logical processors in CPUID leaf 1. Doubling this value produces 0 (which OSes sincerely dislike), as the respective field is only 8 bits wide. Suppress doubling the value (and its leaf 0x8008 counterpart) in such a case. Additionally don't even do an

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Oleksandr
On 19.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi Julien On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation and access protection functionalities to pr

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Julien Grall
Hi, On 19/09/2019 12:58, Oleksandr wrote: On 19.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi Julien On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory Management Unit (IOMMU) which provides address translation

Re: [Xen-devel] [PATCH V4 6/8] iommu/arm: Add lightweight iommu_fwspec support

2019-09-19 Thread Oleksandr
Hi, all. +struct iommu_fwspec { +    /* this device's IOMMU */ +    struct device *iommu_dev; +    /* IOMMU driver private data for this device */ +    void *iommu_priv; +    /* number of associated device IDs */ +    unsigned int num_ids; +    /* IDs which this device may present to the IO

Re: [Xen-devel] [PATCH V4 8/8] iommu/arm: Add Renesas IPMMU-VMSA support

2019-09-19 Thread Oleksandr
On 19.09.19 15:05, Julien Grall wrote: Hi, Hi Julien. On 19/09/2019 12:58, Oleksandr wrote: On 19.09.19 14:45, Julien Grall wrote: Hi Oleksandr, Hi Julien On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The IPMMU-VMSA is VMSA-compatible I/O Memory M

[Xen-devel] [linux-4.14 test] 141442: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141442 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/141442/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 20 guest-start/debian.repeat fail in 141400 REGR. vs. 139910 Tests whic

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Oleksandr
On 19.09.19 14:35, Julien Grall wrote: Hi Oleksandr, Hi, Julien. On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU DT bindings [1] before as

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Julien Grall
Hi, On 19/09/2019 13:25, Oleksandr wrote: On 19.09.19 14:35, Julien Grall wrote: Hi Oleksandr, On 13/09/2019 16:35, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The main puprose of this patch is to add a way to register DT device (which is behind the IOMMU) using the generic IOMMU

Re: [Xen-devel] [PATCH 06/35] libxl: Use ev_qmp for switch_qemu_xen_logdirty

2019-09-19 Thread Anthony PERARD
On Tue, Sep 17, 2019 at 05:52:24PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH 06/35] libxl: Use ev_qmp for > switch_qemu_xen_logdirty"): > > Signed-off-by: Anthony PERARD > ... > > +rc = libxl__ev_time_register_rel(ao, &lds->timeout, > > + s

Re: [Xen-devel] [PATCH for-4.13] configure: fix print syntax for python 3

2019-09-19 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH for-4.13] configure: fix print syntax for python 3"): > On Thu, 19 Sep 2019 at 12:28, Ian Jackson wrote: > > My previous reply bounced due to header mangling in your first mail. > > Let me try again: > > > > This is good in principle but: > > > > Can you provide as a g

Re: [Xen-devel] [PATCH 06/35] libxl: Use ev_qmp for switch_qemu_xen_logdirty

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 06/35] libxl: Use ev_qmp for switch_qemu_xen_logdirty"): > On Tue, Sep 17, 2019 at 05:52:24PM +0100, Ian Jackson wrote: > > I hate to suggest this at this stage, but: maybe the timeout could be > > incorporated into libxl__ev_qmp ? > > > > I think every libxl__q

[Xen-devel] [PATCH v11] x86/emulate: Send vm_event from emulate

2019-09-19 Thread Alexandru Stefan ISAILA
A/D bit writes (on page walks) can be considered benign by an introspection agent, so receiving vm_events for them is a pessimization. We try here to optimize by filtering these events out. Currently, we are fully emulating the instruction at RIP when the hardware sees an EPT fault with npfec.kind

[Xen-devel] [PATCH v6 0/8] AMD IOMMU: further improvements

2019-09-19 Thread Jan Beulich
The main goal continues to be to reduce the huge memory overhead that we've noticed. On the way there a number of other things were once again noticed. All patches have now been tested on a Fam15 and a Fam17 system. 01: don't blindly allocate interrupt remapping tables 02: make phantom functions s

[Xen-devel] [PATCH v6 1/8] AMD/IOMMU: don't blindly allocate interrupt remapping tables

2019-09-19 Thread Jan Beulich
ACPI tables are free to list far more device coordinates than there are actual devices. By delaying the table allocations for most cases, and doing them only when an actual device is known to be present at a given position, overall memory used for the tables goes down from over 500k pages to just o

Re: [Xen-devel] [PATCH 06/35] libxl: Use ev_qmp for switch_qemu_xen_logdirty

2019-09-19 Thread Anthony PERARD
On Thu, Sep 19, 2019 at 02:03:10PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("Re: [PATCH 06/35] libxl: Use ev_qmp for > switch_qemu_xen_logdirty"): > > On Tue, Sep 17, 2019 at 05:52:24PM +0100, Ian Jackson wrote: > > I guess we could try to optimise the simpler case when there is only one

[Xen-devel] [PATCH v6 2/8] AMD/IOMMU: make phantom functions share interrupt remapping tables

2019-09-19 Thread Jan Beulich
Rather than duplicating entries in amd_iommu_msi_msg_update_ire(), share the tables. This mainly requires some care while freeing them, to avoid freeing memory blocks twice. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- v5: New. --- xen/drivers/passthrough/amd/iommu_init.c | 43

[Xen-devel] [PATCH v6 3/8] x86/PCI: read maximum MSI vector count early

2019-09-19 Thread Jan Beulich
Rather than doing this every time we set up interrupts for a device anew (and then in several places) fill this invariant field right after allocating struct pci_dev. Signed-off-by: Jan Beulich --- v6: New. --- xen/arch/x86/msi.c| 13 + xen/drivers/passthrough/pci.c |

[Xen-devel] [PATCH v6 4/8] AMD/IOMMU: replace INTREMAP_ENTRIES

2019-09-19 Thread Jan Beulich
Prepare for the number of entries to not be the maximum possible, by separating checks against maximum size from ones against actual size. For caller side simplicity have alloc_intremap_entry() return the maximum possible value upon allocation failure, rather than the first just out-of-bounds one.

[Xen-devel] [PATCH v6 5/8] AMD/IOMMU: restrict interrupt remapping table sizes

2019-09-19 Thread Jan Beulich
There's no point setting up tables with more space than a PCI device can use. For both MSI and MSI-X we can determine how many interrupts could be set up at most. Tables allocated during ACPI table parsing, however, will (for now at least) continue to be set up to have maximum size. Note that unti

[Xen-devel] [PATCH v6 6/8] AMD/IOMMU: tidy struct ivrs_mappings

2019-09-19 Thread Jan Beulich
Move the device flags field up into an unused hole, thus shrinking overall structure size by 8 bytes. Use bool and uint_t as appropriate. Drop pointless (redundant) initializations. Signed-off-by: Jan Beulich --- v6: New. --- xen/drivers/passthrough/amd/iommu_acpi.c |6 +++--- xen/drivers/p

[Xen-devel] [PATCH v6 7/8] AMD/IOMMU: allocate one device table per PCI segment

2019-09-19 Thread Jan Beulich
Having a single device table for all segments can't possibly be right. (Even worse, the symbol wasn't static despite being used in just one source file.) Attach the device tables to their respective IVRS mapping ones. Signed-off-by: Jan Beulich --- v6: New. --- xen/drivers/passthrough/amd/iommu

[Xen-devel] [PATCH v6 8/8] AMD/IOMMU: pre-fill all DTEs right after table allocation

2019-09-19 Thread Jan Beulich
Make sure we don't leave any DTEs unexpected requests through which would be passed through untranslated. Set V and IV right away (with all other fields left as zero), relying on the V and/or IV bits getting cleared only by amd_iommu_set_root_page_table() and amd_iommu_set_intremap_table() under sp

Re: [Xen-devel] [PATCH V4 7/8] iommu/arm: Introduce iommu_add_dt_device API

2019-09-19 Thread Oleksandr
On 19.09.19 15:29, Julien Grall wrote: Hi, Hi, Julien + +int __init iommu_add_dt_device(struct dt_device_node *np) Sorry to only realise it now. Would it make sense to have this function implemented in xen/passthrough/device_tree.c? Not entirely sure. device_tree.c is a common code.

[Xen-devel] [xen-unstable-smoke test] 141470: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141470 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141470/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

Re: [Xen-devel] [PATCH v11] x86/emulate: Send vm_event from emulate

2019-09-19 Thread Jan Beulich
On 19.09.2019 15:03, Alexandru Stefan ISAILA wrote: > @@ -601,6 +602,7 @@ static void *hvmemul_map_linear_addr( > > case HVMTRANS_gfn_paged_out: > case HVMTRANS_gfn_shared: > +case HVMTRANS_bad_gfn_access: > err = ERR_PTR(~X86EMUL_RETRY); > goto

Re: [Xen-devel] [PATCH] xen/arm32: setup: Give a xenheap page to the boot allocator

2019-09-19 Thread Jan Beulich
On 17.09.2019 15:21, Julien Grall wrote: > After commit 6e3e771203 "xen/arm: setup: Relocate the Device-Tree later on > in the boot", the boot allocator will not receive any xenheap page (i.e. > mapped page) on Arm32. > > However, the boot allocator implicitely rely on having the first page > alre

Re: [Xen-devel] [PATCH v11] x86/emulate: Send vm_event from emulate

2019-09-19 Thread Paul Durrant
> -Original Message- > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index fdb1e17f59..4cc077bb3f 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -3236,6 +3236,19 @@ static enum hvm_translation_result __hvm_copy( > return HVMTRANS_bad_

Re: [Xen-devel] [PATCH v3 05/12] livepatch: Add support for apply|revert action replacement hooks

2019-09-19 Thread Ross Lagerwall
On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: By default, in the quiescing zone, a hotpatch payload is applied with s/hotpatch/livepatch/ (for all the patches) apply_payload() and reverted with revert_payload() functions. Both of the functions receive the payload struct pointer as a parame

Re: [Xen-devel] [PATCH v3 06/12] livepatch: Do not enforce ELF_LIVEPATCH_FUNC section presence

2019-09-19 Thread Ross Lagerwall
On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: With default implementation the ELF_LIVEPATCH_FUNC section containing all functions to be replaced or added must be part of the hotpatch payload, otherwise the payload is rejected (with -EINVAL). However, with the extended hooks implementation, a

Re: [Xen-devel] [PATCH 33/35] libxl: Extract qmp_parse_query_cpus

2019-09-19 Thread Anthony PERARD
On Tue, Sep 17, 2019 at 06:42:10PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH 33/35] libxl: Extract qmp_parse_query_cpus"): > > The QMP command "query-cpus" is called from different places, extract > > the algorithm that parse the answer into a separate function. > > I hope you mea

Re: [Xen-devel] [PATCH v3 07/12] livepatch: Add per-function applied/reverted state tracking marker

2019-09-19 Thread Ross Lagerwall
On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: Livepatch only tracks an entire payload applied/reverted state. But, with an option to supply the apply_payload() and/or revert_payload() functions as optional hooks, it becomes possible to intermix the execution of the original apply_payload()/rev

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-19 Thread Jan Beulich
On 14.09.2019 10:52, Juergen Gross wrote: > This prepares support of larger scheduling granularities, e.g. core > scheduling. > > While at it move sched_has_urgent_vcpu() from include/asm-x86/cpuidle.h > into sched.h removing the need for including sched-if.h in cpuidle.h. > For that purpose remob

[Xen-devel] [linux-4.9 test] 141444: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141444 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/141444/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 20 guest-start/debian.repeat fail in 141392 REGR. vs. 141254 Tests which

Re: [Xen-devel] [PATCH v3 09/47] xen/sched: move some per-vcpu items to struct sched_unit

2019-09-19 Thread Jan Beulich
On 14.09.2019 10:52, Juergen Gross wrote: > Affinities are scheduler specific attributes, they should be per > scheduling unit. So move all affinity related fields in struct vcpu > to struct sched_unit. While at it switch affinity related functions in > sched-if.h to use a pointer to sched_unit ins

Re: [Xen-devel] [PATCH 17/35] libxl: Add libxl__ev_qmp to libxl__ao_device

2019-09-19 Thread Anthony PERARD
On Tue, Sep 17, 2019 at 06:07:31PM +0100, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH 17/35] libxl: Add libxl__ev_qmp to > libxl__ao_device"): > > `aodev->qmp' is initialised in libxl__prepare_ao_device(), but since > > there isn't a single exit path for a `libxl__ao_device', users of this

Re: [Xen-devel] [PATCH v3 10/47] xen/sched: add scheduler helpers hiding vcpu

2019-09-19 Thread Jan Beulich
On 14.09.2019 10:52, Juergen Gross wrote: > Add the following helpers using a sched_unit as input instead of a > vcpu: > > - is_idle_unit() similar to is_idle_vcpu() > - is_unit_online() similar to is_vcpu_online() (returns true when any > of its vcpus is online) > - unit_runnable() like vcpu_ru

Re: [Xen-devel] [PATCH v3 13/47] xen/sched: add is_running indicator to struct sched_unit

2019-09-19 Thread Jan Beulich
On 14.09.2019 10:52, Juergen Gross wrote: > @@ -1673,8 +1676,10 @@ static void schedule(void) > * switch, else lost_records resume will not work properly. > */ > > -ASSERT(!next->is_running); > +ASSERT(!next->sched_unit->is_running); > next->is_running = 1; > +next->s

[Xen-devel] Ping: [PATCH v3 0/2] x86/traps: improve show_trace()'s top-of-stack handling

2019-09-19 Thread Jan Beulich
Andrew, On 15.07.2019 16:58, Jan Beulich wrote: > 1: guard top-of-stack reads > 2: widen condition for logging top-of-stack > > The issue patch 2 fixes (a curious lack of an intermediate call stack > entry) was observed in practice; patch 1 is a result of me just looking > at the code. I realize

Re: [Xen-devel] [PATCH v3 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-09-19 Thread Ross Lagerwall
On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: This is the initial implementation of the expectations enhancement to improve inline asm hotpatching. Expectations are designed as optional feature, since the main use of them is planned for inline asm hotpatching. The flag enabled allows to contr

Re: [Xen-devel] [PATCH 17/35] libxl: Add libxl__ev_qmp to libxl__ao_device

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 17/35] libxl: Add libxl__ev_qmp to libxl__ao_device"): > On Tue, Sep 17, 2019 at 06:07:31PM +0100, Ian Jackson wrote: > > It might be nice to add a comment about the field(s) of > > libxl__ao_device which callers of libxl__prepare_ao_device are > > expected to cl

Re: [Xen-devel] [PATCH 33/35] libxl: Extract qmp_parse_query_cpus

2019-09-19 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 33/35] libxl: Extract qmp_parse_query_cpus"): > On Tue, Sep 17, 2019 at 06:42:10PM +0100, Ian Jackson wrote: > > Anthony PERARD writes ("[PATCH 33/35] libxl: Extract qmp_parse_query_cpus"): > > > The QMP command "query-cpus" is called from different places, extrac

Re: [Xen-devel] [PATCH v3 09/12] livepatch: Add support for modules .modinfo section metadata

2019-09-19 Thread Ross Lagerwall
On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: Having detailed hotpatch metadata helps to properly identify module's origin and version. It also allows to keep track of the history of hotpatch loads in the system (at least within dmesg buffer size limits). The hotpatch metadata are embedded in

Re: [Xen-devel] [PATCH 00/15] Some cleanup of libxl

2019-09-19 Thread Anthony PERARD
On Fri, Jun 14, 2019 at 12:24:29PM +0100, Anthony PERARD wrote: > Hi, > > This series contains cleanup patches, ahead of a series that's going to make > more changes to libxl. v2 with patch 11 acked and the whole branch rebased pushed to: https://xenbits.xen.org/git-http/people/aperard/xen-unstab

[Xen-devel] [xen-unstable-smoke test] 141474: regressions - FAIL

2019-09-19 Thread osstest service owner
flight 141474 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/141474/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 7 xen-boot fail REGR. vs. 141253 Tests which

[Xen-devel] [PATCH v2 00/35] libxl refactoring to use ev_qmp (with API changes)

2019-09-19 Thread Anthony PERARD
Patches with missing ackes: libxl: Use ev_qmp for switch_qemu_xen_logdirty libxl: Use ev_qmp in libxl_set_vcpuonline libxl_pci: Extract common part of *qemu_trad_watch_state_cb The series depends on "Some cleanup of libxl" series. Patch series available in this git branch (which is on

[Xen-devel] [PATCH v2 06/35] libxl: Use ev_qmp for switch_qemu_xen_logdirty

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- tools/libxl/libxl_dom_save.c | 41 tools/libxl/libxl_internal.h | 3 +-- tools/libxl/libxl_qmp.c | 10 - 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/tools/libxl/libxl_dom_save.c b/tools/libxl

[Xen-devel] [PATCH v2 08/35] libxl: Replace libxl__qmp_initializations by ev_qmp calls

2019-09-19 Thread Anthony PERARD
Setup a timeout of 10s for all the commands. It used to be about 5s per commands. The order of command is changed, we call 'query-vnc' before 'change-vnc-password', but that should not matter. That makes it easier to call 'change-vnc-password' conditionally. Also 'change' command is replaced by '

[Xen-devel] [PATCH v2 02/35] libxl: Make libxl_send_trigger async

2019-09-19 Thread Anthony PERARD
.. because it makes QMP calls which are going to be async. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl.h| 13 - tools/libxl/libxl_domain.c | 12 tools/xl/xl_misc.c | 4 ++-- tools/xl/xl_vmcontrol.c| 4 ++-- 4 files cha

[Xen-devel] [PATCH v2 09/35] libxl: Deprecate libxl__domain_{unpause, resume}

2019-09-19 Thread Anthony PERARD
These two functions are used from many places in libxl and need to change to be able to accomodate libxl__ev_qmp calls and thus needs to be asynchronous. (There is also libxl__domain_resume_device_model in the mix.) A later patch will introduce a new libxl__domain_resume and libxl__domain_unpause

[Xen-devel] [PATCH v2 05/35] libxl: Make libxl_qemu_monitor_command async

2019-09-19 Thread Anthony PERARD
.. because it makes QMP calls which are going to be async. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl.h | 14 +- tools/libxl/libxl_qmp.c | 9 + tools/xl/xl_misc.c | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git

[Xen-devel] [PATCH v2 07/35] libxl: Move "qmp_initializations" to libxl_dm

2019-09-19 Thread Anthony PERARD
libxl__qmp_initializations is part of the device domain startup, it queries information about the newly spawned QEMU and do some post-startup configuration. So the function call doesn't belong to the general domain creation, but only to the device model part of the process, thus the call belong to

[Xen-devel] [PATCH v2 03/35] libxl: Make libxl_set_vcpuonline async

2019-09-19 Thread Anthony PERARD
.. because it makes QMP calls which are going to be async. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl.h| 15 ++- tools/libxl/libxl_domain.c | 12 tools/xl/xl_cpupool.c | 2 +- tools/xl/xl_vcpu.c | 2 +- 4 files chang

[Xen-devel] [PATCH v2 04/35] libxl: Make libxl_retrieve_domain_configuration async

2019-09-19 Thread Anthony PERARD
.. because it makes QMP calls which are going to be async. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl.h| 13 - tools/libxl/libxl_domain.c | 14 +++--- tools/xl/xl_info.c | 3 ++- tools/xl/xl_saverestore.c | 3 ++- tools/xl/xl

[Xen-devel] [PATCH v2 01/35] libxl: Make libxl_domain_unpause async

2019-09-19 Thread Anthony PERARD
libxl_domain_unpause needs to make QMP calls, which are asynchronous, change the API to reflect that. Do the same with libxl_domain_pause async, even if it will keep completing synchronously. Also fix some coding style issue in those functions. Signed-off-by: Anthony PERARD Acked-by: Ian Jackso

[Xen-devel] [PATCH v2 33/35] libxl: libxl_retrieve_domain_configuration now uses ev_qmp

2019-09-19 Thread Anthony PERARD
This was the last user of libxl__qmp_query_cpus which can now be removed. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- Notes: v3: - following rename of ev_lock to ev_devlock, renamed field rdcs.ev_lock to rdcs.devlock tools/libxl/libxl_domain.c | 163 +++

[Xen-devel] [PATCH v2 19/35] libxl_usb: Make libxl__device_usbctrl_add uses ev_qmp

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_usb.c | 93 ++--- 1 file changed, 77 insertions(+), 16 deletions(-) diff --git a/tools/libxl/libxl_usb.c b/tools/libxl/libxl_usb.c index de8122dc57e9..506dbdcf5ee4 100644 --- a/tools/li

[Xen-devel] [PATCH v2 14/35] libxl_domain: Convert libxl_domain_unpause to use libxl__domain_unpause

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_domain.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 52a8bd7895cb..f3c39fa86fc9 100644 --- a/tools/libxl/libx

[Xen-devel] [PATCH v2 27/35] libxl_pci: Use libxl__ao_device with libxl__device_pci_add

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 7 +- tools/libxl/libxl_pci.c | 170 ++- 2 files changed, 150 insertions(+), 27 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h ind

[Xen-devel] [PATCH v2 34/35] libxl: libxl_qemu_monitor_command now uses ev_qmp

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_qmp.c | 52 +++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index 9639d491d991..9aabad74fabd 100644 --- a/tools/lib

[Xen-devel] [PATCH v2 18/35] libxl: Add device_{config, type} to libxl__ao_device

2019-09-19 Thread Anthony PERARD
These two fields help to give more information about the device been hotplug/hotunplug to callbacks. There is already `dev' of type `libxl__device', but it is mostly useful when the backend/frontend is xenstore. Some device (like `usbdev') don't have devid, so `dev' can't be used. Signed-off-by:

[Xen-devel] [PATCH v2 26/35] libxl_pci: Only check if qemu-dm is running in qemu-trad case

2019-09-19 Thread Anthony PERARD
QEMU upstream (or qemu-xen) may not have set "running" state in xenstore. "running" with QEMU doesn't mean that the binary is running, it means that the emulation have started. When adding a pci-passthrough device to QEMU, we do so via QMP, we have a direct answer to whether QEMU is running or not,

[Xen-devel] [PATCH v2 11/35] libxl_domain: Convert libxl_domain_resume to use libxl__domain_resume

2019-09-19 Thread Anthony PERARD
Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl_domain.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 80797c5ed21c..d78ffa6b6019 100644 --- a/tools/libxl/libxl_do

[Xen-devel] [PATCH v2 32/35] libxl: Use ev_qmp in libxl_set_vcpuonline

2019-09-19 Thread Anthony PERARD
Removed libxl__qmp_cpu_add since it's not used anymore. `cpumap' arg of libxl__set_vcpuonline_xenstore is constified. The QMP command "query-cpus" is going to be called from different places, so the algorithm that parse the answer is in a separate function, qmp_parse_query_cpus. Signed-off-by: A

  1   2   >