Re: [PATCH v2 17/19] util/vfio-helpers: Introduce qemu_vfio_pci_msix_set_irq()

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote: > Introduce qemu_vfio_pci_msix_set_irq() to set the event > notifier of a specific MSIX IRQ. All other registered IRQs > are left unmodified. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Er

Re: [PATCH v2 12/19] util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > Pass qemu_vfio_do_mapping() an Error* argument so it can propagate > any error to callers. Replace error_report() which only report > to the monitor by the more generic error_setg_errno(). > > Reviewed-by: Fam Zheng > Reviewed-by

Re: [PATCH v2 01/19] block/nvme: Correct minimum device page size

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > While trying to simplify the code using a macro, we forgot > the 12-bit shift... Correct that. > > Fixes: fad1eb68862 ("block/nvme: Use register definitions from > 'block/nvme.h'") > Reported-by: Eric Auger > Reviewed-by: Stefan

Re: [PATCH v2 02/19] block/nvme: Set request_alignment at initialization

2020-10-26 Thread Auger Eric
Hi, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > When introducing this driver in commit bdd6a90a9e5 > ("block: Add VFIO based NVMe driver") we correctly > set the request_alignment in nvme_refresh_limits() > but forgot to set it at initialization. Do it now. > > Reported-by: Stefan Hajno

Re: [PATCH v2 03/19] block/nvme: Introduce device/iommu 'page_size_min' variables

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > Introduce device/iommu 'page_size_min' variables to make > the code clearer. I am unclear how much the device and the iommu page size must equal. For instance, in [RFC 0/5] NVMe passthrough: Support 64kB page host, I have a 64kB h

Re: [PATCH v2 07/19] util/vfio-helpers: Trace PCI BAR region info

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > For debug purpose, trace BAR regions info. > > Reviewed-by: Fam Zheng > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 8 > util/trace-events | 1 + > 2 files chan

Re: [PATCH v2 06/19] util/vfio-helpers: Trace PCI I/O config accesses

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > We sometime get kernel panic with some devices on Aarch64 > hosts. Alex Williamson suggests it might be broken PCIe > root complex. Add trace event to record the latest I/O > access before crashing. In case, assert our accesses are

Re: [PATCH v2 04/19] block/nvme: Trace controller capabilities

2020-10-26 Thread Auger Eric
Hi, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > Controllers have different capabilities and report them in the > CAP register. We are particularly interested by the page size > limits. > > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme.c | 10 ++ > block/trace-

Re: [PATCH] [RFC] hw/arm/smmuv3: Set the restoration priority of the vSMMUv3 explicitly

2020-10-26 Thread Auger Eric
Hi Zenghui, On 10/19/20 11:15 AM, Zenghui Yu wrote: > Ensure the vSMMUv3 will be restored before all PCIe devices so that DMA > translation can work properly during migration. Sorry I missed this patch. good catch! Acked-by: Eric Auger Thanks Eric > > Signed-off-by: Zenghui Yu > --- > > n

Re: [PATCH v2 15/19] util/vfio-helpers: Report error when IOMMU page size is not supported

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote: > This driver uses the host page size to align its memory regions, > but this size is not always compatible with the IOMMU. Add a > check if the size matches, and bails out providing a hint what > is the minimum page size the driver

Re: [PATCH v10 00/10] virtio-iommu: VFIO integration

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > This series adds support for VFIO endpoints to virtio-iommu. > > Versions 1 to 9 were posted by Bharat Bhushan, but I am taking over for > now since he doesn't have much time to spend on it. Thanks again Bharat > for the work! > > Two m

Re: [PATCH v10 09/10] virtio-iommu: Set supported page size mask

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > The virtio-iommu device can deal with arbitrary page sizes for virtual > endpoints, but for endpoints assigned with VFIO it must follow the page > granule used by the host IOMMU driver. > > Implement the interf

Re: [PATCH v10 10/10] vfio: Don't issue full 2^64 unmap

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > IOMMUs may declare memory regions spanning from 0 to UINT64_MAX. When > attempting to deal with such region, vfio_listener_region_del() passes a > size of 2^64 to int128_get64() which throws an assertion failure. Even > ignoring this, th

Re: [PATCH v10 08/10] vfio: Set IOMMU page size as per host supported page size

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Set IOMMU supported page size mask same as host Linux supported page > size mask. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Thanks Eric > --- > hw/vfi

Re: [PATCH v10 07/10] memory: Add interface to set iommu page size mask

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Allow to set the page size mask supported by an iommu memory region. > This enables a vIOMMU to communicate the page size granule supported by > an assigned device, on hosts that use page sizes greater than 4kB.

Re: [PATCH v10 05/10] virtio-iommu: Add replay() memory region callback

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Implement the replay callback to setup all mappings for a new memory > region. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Jean-Philippe Brucker > --- > v10: Homogenize tracepoint arguments > --- > hw

Re: [PATCH v10 06/10] virtio-iommu: Add notify_flag_changed() memory region callback

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Add notify_flag_changed() to notice when memory listeners are added and > removed. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Jean-Philippe Brucker > --- > v10: > * Use notifier flags instead of notif

Re: [PATCH v10 04/10] virtio-iommu: Call memory notifiers in attach/detach

2020-10-16 Thread Auger Eric
Hi jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Call the memory notifiers when attaching an endpoint to a domain, to > replay existing mappings, and when detaching the endpoint, to remove all > mappings. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Je

Re: [PATCH v10 03/10] virtio-iommu: Add memory notifiers for map/unmap

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > Extend VIRTIO_IOMMU_T_MAP/UNMAP request to notify memory listeners. It > will call VFIO notifier to map/unmap regions in the physical IOMMU. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Eric Auger > Sig

Re: [PATCH v10 02/10] virtio-iommu: Store memory region in endpoint struct

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > Store the memory region associated to each endpoint into the endpoint > structure, to allow efficient memory notification on map/unmap. > > Signed-off-by: Jean-Philippe Brucker Acked-by: Eric Auger > --- > Not super confident about th

Re: [PATCH v10 01/10] virtio-iommu: Fix virtio_iommu_mr()

2020-10-16 Thread Auger Eric
Hi Jean, On 10/8/20 7:15 PM, Jean-Philippe Brucker wrote: > Due to an invalid mask, virtio_iommu_mr() may return the wrong memory > region. It hasn't been too problematic so far because the function was > only used to test existence of an endpoint, but that is about to change. > > Fixes: cfb42188

Re: [RFC 0/5] NVMe passthrough: Support 64kB page host

2020-10-15 Thread Auger Eric
Hi Philippe, On 10/15/20 3:49 PM, Philippe Mathieu-Daudé wrote: > On 10/15/20 1:52 PM, Eric Auger wrote: >> This series allows NVMe passthrough on aarch64 with 64kB page host. >> Addresses and sizes of buffers which are VFIO DMA mapped are >> aligned with the host page size. >> >> nvme_register_bu

Re: [RFC 1/5] block/nvme: use some NVME_CAP_* macros

2020-10-15 Thread Auger Eric
Hi Philippe, On 10/15/20 3:36 PM, Philippe Mathieu-Daudé wrote: > On 10/15/20 3:32 PM, Philippe Mathieu-Daudé wrote: >> On 10/15/20 3:29 PM, Philippe Mathieu-Daudé wrote: >>> On 10/15/20 1:52 PM, Eric Auger wrote: let's use NVME_CAP_DSTRD, NVME_CAP_MPSMIN and NVME_CAP_TO macros Sign

Re: [PATCH] arm/trace: Fix hex printing

2020-10-15 Thread Auger Eric
Hi Dave, On 10/14/20 9:33 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Use of 0x%d - make up our mind as 0x%x > > Signed-off-by: Dr. David Alan Gilbert Acked-by: Eric Auger Thanks Eric > --- > hw/arm/trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 d

Re: [PATCH v3 5/5] hw/arm/virt: Implement kvm-steal-time

2020-09-30 Thread Auger Eric
Hi Drew, On 9/16/20 11:26 AM, Andrew Jones wrote: > We add the kvm-steal-time CPU property and implement it for machvirt. > A tiny bit of refactoring was also done to allow pmu and pvtime to > use the same vcpu device helper functions. This needs a rebase. Besides this still looks good to me Revi

Re: [PATCH v3 4/5] DO NOT MERGE: HACK: Add steal time KVM cap to kvm.h

2020-09-30 Thread Auger Eric
Hi Drew, On 9/16/20 11:26 AM, Andrew Jones wrote: > --- > linux-headers/linux/kvm.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h > index a28c3667370b..924672cca1f1 100644 > --- a/linux-headers/linux/kvm.h > +++ b/linux-headers/lin

Re: [PATCH v3 3/5] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init

2020-09-30 Thread Auger Eric
ion. > > No functional change intended. > > Reviewed-by: Peter Maydell > Signed-off-by: Andrew Jones Reviewed-by: Eric Auger Eric > --- > hw/arm/virt.c | 34 ++ > 1 file changed, 18 insertions(+), 16 deletions(-) > > diff --g

Re: [PATCH v2 2/2] util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

2020-09-29 Thread Auger Eric
Hi Stefan, On 9/29/20 5:59 PM, Stefan Hajnoczi wrote: > On Tue, Sep 29, 2020 at 10:55:50AM +0200, Eric Auger wrote: >> diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c >> index ba0ee6e21c..71145970f3 100644 >> --- a/util/vfio-helpers.c >> +++ b/util/vfio-helpers.c >> @@ -667,6 +667,50 @@ sta

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Auger Eric
Hi Fam, On 9/25/20 5:44 PM, Fam Zheng wrote: > On Fri, 2020-09-25 at 17:23 +0200, Auger Eric wrote: >>>> @@ -365,8 +430,12 @@ static int qemu_vfio_init_pci(QEMUVFIOState >>>> *s, const char *device, >>>> if (ret) { >>>>

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Auger Eric
Hi Fam, On 9/25/20 4:43 PM, Fam Zheng wrote: > On 2020-09-25 15:48, Eric Auger wrote: >> The IOVA allocator currently ignores host reserved regions. >> As a result some chosen IOVAs may collide with some of them, >> resulting in VFIO MAP_DMA errors later on. This happens on ARM >> where the MSI re

Re: [PATCH] hw/arm/sbsa-ref : Fix SMMUv3 Initialisation

2020-09-25 Thread Auger Eric
Hi Gregory, On 9/25/20 3:39 PM, Graeme Gregory wrote: > SMMUv3 has an error in previous patch where a i was transposed to a 1 > meaning interrupts would not have been correctly assigned to the SMMUv3 > instance. > > The code also contained an error in that the IRQs were never allocated > in the i

Re: [PATCH v2 2/2] virtio-iommu-pci: force virtio version 1

2020-09-18 Thread Auger Eric
Hi Connie, On 9/18/20 11:29 AM, Cornelia Huck wrote: > On Tue, 8 Sep 2020 21:33:09 +0200 > Eric Auger wrote: > >> Commit 9b3a35ec82 ("virtio: verify that legacy support is not >> accidentally on") added a safety check that requires to set >> 'disable-legacy=on' on virtio-iommu-pci: >> >> qemu-s

Re: [RFC v8 3/5] memory: Add IOMMU_DEVIOTLB_UNMAP IOMMUTLBNotificationType

2020-09-03 Thread Auger Eric
Hi Eugenio, On 9/3/20 12:13 PM, Eugenio Perez Martin wrote: > Hi Eric, > > On Wed, Sep 2, 2020 at 12:32 PM Auger Eric wrote: >> >> Hi Eugenio, >> >> On 9/1/20 4:26 PM, Eugenio Pérez wrote: >>> Adapt intel and vhost to use this new notification type &

Re: [PATCH 55/63] vfio: Rename PCI_VFIO to VFIO_PCI

2020-09-03 Thread Auger Eric
Eduardo, On 9/3/20 12:43 AM, Eduardo Habkost wrote: > Make the type checking macro name consistent with the TYPE_* > constant. > > Signed-off-by: Eduardo Habkost Reviewed-by: Eric Auger Thanks Eric > --- > Cc: Alex Williamson > Cc: qemu-devel@nongnu.org > --- > hw/vfio/pci.h | 2 +- > hw/v

Re: [RFC v8 5/5] memory: Skip bad range assertion if notifier is DEVIOTLB type

2020-09-02 Thread Auger Eric
Hi Eugenio, On 9/1/20 4:26 PM, Eugenio Pérez wrote: > Signed-off-by: Eugenio Pérez Please could you explain in the commit message why you need to remove the assert()? I know you described the assert() in the cover letter but the commit msg is the one that remains. > --- > softmmu/memory.c | 13 +

Re: [RFC v8 2/5] memory: Add IOMMUTLBEvent

2020-09-02 Thread Auger Eric
Hi Eugenio, On 9/2/20 3:18 PM, Eugenio Perez Martin wrote: > On Wed, Sep 2, 2020 at 12:17 PM Auger Eric wrote: >> >> Hi Eugenio, >> >> On 9/1/20 4:26 PM, Eugenio Pérez wrote: >>> This way we can tell between regulars IOMMURLBEntries (entry of IOMMU >>

Re: [RFC v8 3/5] memory: Add IOMMU_DEVIOTLB_UNMAP IOMMUTLBNotificationType

2020-09-02 Thread Auger Eric
Hi Eugenio, On 9/1/20 4:26 PM, Eugenio Pérez wrote: > Adapt intel and vhost to use this new notification type I think you should explain in the commit message what is the benefice to introduce this new event type. > > Signed-off-by: Eugenio Pérez > --- > hw/i386/intel_iommu.c | 2 +- > hw/virti

Re: [RFC v8 2/5] memory: Add IOMMUTLBEvent

2020-09-02 Thread Auger Eric
Hi Eugenio, On 9/1/20 4:26 PM, Eugenio Pérez wrote: > This way we can tell between regulars IOMMURLBEntries (entry of IOMMU > hardware) and notifications.> > In the notifications, we set explicitly if it is a MAPs or an UNMAP, > instead of trusting in entry permissions to differenciate them. diffe

Re: [RFC v8 1/5] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one

2020-09-02 Thread Auger Eric
Hi Eugenio, On 9/1/20 4:26 PM, Eugenio Pérez wrote: > Previous name didn't reflect the iommu operation. > > Signed-off-by: Eugenio Pérez Reviewed-by: Eric Auger Thanks Eric > --- > hw/arm/smmu-common.c | 2 +- > hw/arm/smmuv3.c | 2 +- > hw/i386/intel_iommu.c | 4 ++-- > include/exec

Re: [kvm-unit-tests RFC 0/4] KVM: arm64: Statistical Profiling Extension Tests

2020-09-01 Thread Auger Eric
Hi Alexandru, On 9/1/20 11:24 AM, Alexandru Elisei wrote: > Hi Eric, > > These patches are extremely welcome! I took over the KVM SPE patches from > Andrew > Murray, and I was working on something similar to help with development. Cool. > > The KVM series on the public mailing list work only by

Re: [kvm-unit-tests RFC 4/4] spe: Test Profiling Buffer Events

2020-09-01 Thread Auger Eric
Hi, On 8/31/20 9:34 PM, Eric Auger wrote: > Setup the infrastructure to check the occurence of events. > The test checks the Buffer Full event occurs when no space > is available. The PPI is handled and we check the syndrome register > against the expected event. > > Signed-off-by: Eric Auger >

Re: [PATCH 0/7] target/arm: Add vSPE support to KVM guest

2020-08-31 Thread Auger Eric
Hi Haibo, On 8/7/20 10:10 AM, Haibo Xu wrote: > This series add support for SPE(Statistical Profiling Extension)[1] > in KVM guest. It's based on Andrew Murray's kernel KVM patches V2[2], > and has been tested to ensure that guest can use SPE with valid data. > E.g. > > In host: > $ ./qemu-system

Re: [PATCH 6/7] hw/arm/virt: spe: Add SPE fdt binding for virt machine

2020-08-29 Thread Auger Eric
Hi Haibo, On 8/7/20 10:10 AM, Haibo Xu wrote: > Add a virtual SPE device for virt machine while using PPI > 5 for SPE overflow interrupt number. > > Signed-off-by: Haibo Xu > --- > hw/arm/virt-acpi-build.c| 3 +++ > hw/arm/virt.c | 42 + >

Re: [PATCH] test-vmstate: fix bad GTree usage, use-after-free

2020-08-28 Thread Auger Eric
Hi Marc-André, On 8/28/20 9:19 AM, Auger Eric wrote: > Hi Marc-André, > > On 8/27/20 8:35 PM, Marc-André Lureau wrote: >> Hi >> >> On Thu, Aug 27, 2020 at 8:34 PM Auger Eric > <mailto:eric.au...@redhat.com>> wrote: >> >> Hi Marc-Andre >&g

Re: [PATCH] test-vmstate: fix bad GTree usage, use-after-free

2020-08-28 Thread Auger Eric
Hi Marc-André, On 8/27/20 8:35 PM, Marc-André Lureau wrote: > Hi > > On Thu, Aug 27, 2020 at 8:34 PM Auger Eric <mailto:eric.au...@redhat.com>> wrote: > > Hi Marc-Andre > > On 8/27/20 6:18 PM, marcandre.lur...@redhat.com > <mailto:marcandre.lu

Re: [PATCH] test-vmstate: fix bad GTree usage, use-after-free

2020-08-27 Thread Auger Eric
Hi Marc-Andre On 8/27/20 6:18 PM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > According to g_tree_foreach() documentation: > "The tree may not be modified while iterating over it (you can't > add/remove items)." Hum I did not see that. > > Fixes: 9a85e4b8f6 ("migration: Su

Re: virtio-vsock requires 'disable-legacy=on' in QEMU 5.1

2020-08-19 Thread Auger Eric
Hi, On 8/13/20 12:37 PM, Cornelia Huck wrote: > On Thu, 13 Aug 2020 12:24:30 +0200 > Stefano Garzarella wrote: > >> On Thu, Aug 13, 2020 at 11:28:20AM +0200, Cornelia Huck wrote: >>> On Thu, 13 Aug 2020 11:16:56 +0200 >>> Stefano Garzarella wrote: >>> Hi, Qinghua discovered tha

Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-18 Thread Auger Eric
Hi Stefan, On 8/18/20 2:54 PM, Stefan Hajnoczi wrote: > On Thu, Aug 13, 2020 at 09:18:59PM +0200, Auger Eric wrote: >> Hi Alex, >> >> On 8/13/20 9:15 PM, Alex Williamson wrote: >>> On Thu, 13 Aug 2020 20:02:45 +0200 >>> Auger Eric wrote: >>>

Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Auger Eric
Hi Alex, On 8/13/20 9:15 PM, Alex Williamson wrote: > On Thu, 13 Aug 2020 20:02:45 +0200 > Auger Eric wrote: > >> Hi Alex, >> >> On 8/13/20 6:59 PM, Alex Williamson wrote: >>> On Thu, 13 Aug 2020 15:37:08 +0800 >>> Chen Qun wrote: >>>

Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Auger Eric
Hi Alex, On 8/13/20 6:59 PM, Alex Williamson wrote: > On Thu, 13 Aug 2020 15:37:08 +0800 > Chen Qun wrote: > >> Clang static code analyzer show warning: >> hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read >> ret = event_notifier_test_and_clear(intp->interrupt); >>

Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-13 Thread Auger Eric
Hi, On 8/13/20 9:37 AM, Chen Qun wrote: > Clang static code analyzer show warning: > hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read > ret = event_notifier_test_and_clear(intp->interrupt); > ^ ~~ > > Reported-b

Re: [PATCH v2 5/5] hw/arm/virt: Implement kvm-steal-time

2020-08-12 Thread Auger Eric
Drew, On 8/5/20 11:16 AM, Andrew Jones wrote: > We add the kvm-steal-time CPU property and implement it for machvirt. > A tiny bit of refactoring was also done to allow pmu and pvtime to > use the same vcpu device helper functions. > > Signed-off-by: Andrew Jones > --- > docs/system/arm/cpu-fea

Re: [PATCH v2 3/5] hw/arm/virt: Move post cpu realize check into its own function

2020-08-12 Thread Auger Eric
Maydell Reviewed-by: Eric Auger Eric > --- > hw/arm/virt.c | 43 +++ > 1 file changed, 27 insertions(+), 16 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index acf9bfbeceaf..2cba21fe3ad9 100644 > --- a/hw/arm/vir

Re: [PATCH v2 2/5] target/arm/kvm: Make uncalled stubs explicitly unreachable

2020-08-12 Thread Auger Eric
Hi Drew, On 8/5/20 11:16 AM, Andrew Jones wrote: > When we compile without KVM support !defined(CONFIG_KVM) we generate > stubs for functions that the linker will still encounter. Sometimes > these stubs can be executed safely and are placed in paths where they > get executed with or without KVM.

Re: [PATCH v2 4/5] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init

2020-08-12 Thread Auger Eric
Hi Drew, On 8/5/20 11:16 AM, Andrew Jones wrote: > Move the KVM PMU setup part of fdt_add_pmu_nodes() to > virt_cpu_post_init(), which is a more appropriate location. Now > fdt_add_pmu_nodes() is also named more appropriately, because it > no longer does anything but fdt node creation. > > No func

Re: [PATCH for-5.2 v4 05/11] hw/arm/smmu-common: Manage IOTLB block entries

2020-07-31 Thread Auger Eric
Hi Peter, On 7/30/20 3:38 PM, Peter Maydell wrote: > On Tue, 28 Jul 2020 at 16:09, Eric Auger wrote: >> >> At the moment each entry in the IOTLB corresponds to a page sized >> mapping (4K, 16K or 64K), even if the page belongs to a mapped >> block. In case of block mapping this unefficiently cons

Re: [PATCH v3 11/11] hw/arm/smmuv3: Advertise SMMUv3.2 range invalidation

2020-07-28 Thread Auger Eric
Hi Peter, On 7/10/20 11:47 AM, Peter Maydell wrote: > On Wed, 8 Jul 2020 at 15:20, Eric Auger wrote: >> >> Expose the RIL bit so that the guest driver uses range >> invalidation. Range invalidation being an SMMU3.2 feature, >> let AIDR advertise SMMUv3.2 support. >> >> Signed-off-by: Eric Auger

Re: [PATCH for-5.1 4/4] docs/system: Document the arm virt board

2020-07-15 Thread Auger Eric
Hi Peter, On 7/13/20 7:57 PM, Peter Maydell wrote: > Document the arm 'virt' board, which has been undocumented > for far too long given that it is the main recommended board > type for arm guests. > > Signed-off-by: Peter Maydell > --- > docs/system/arm/virt.rst | 157

Re: [PATCH] qtest: bios-tables-test: fix a memory leak

2020-07-15 Thread Auger Eric
Hi Li, On 7/14/20 5:35 PM, Li Qiang wrote: > Fixes: 5da7c35e25a("bios-tables-test: Add Q35/TPM-TIS test") > Signed-off-by: Li Qiang > --- > tests/qtest/bios-tables-test.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c > i

Re: [PATCH] tests: qmp-cmd-test: fix memory leak

2020-07-15 Thread Auger Eric
Hi Li, On 7/14/20 7:15 PM, Li Qiang wrote: > Fixes: 5b88849e7b9("tests/qmp-cmd-test: Add > qmp/object-add-failure-modes" Thank you for fixing this. Adding a commit message generally is welcome such as for example: properly free each test response and separate qtest_qmp() calls with spare lines,

Re: [PATCH v3 11/11] hw/arm/smmuv3: Advertise SMMUv3.2 range invalidation

2020-07-10 Thread Auger Eric
Hi Peter, On 7/10/20 11:47 AM, Peter Maydell wrote: > On Wed, 8 Jul 2020 at 15:20, Eric Auger wrote: >> >> Expose the RIL bit so that the guest driver uses range >> invalidation. Range invalidation being an SMMU3.2 feature, >> let AIDR advertise SMMUv3.2 support. >> >> Signed-off-by: Eric Auger

Re: [PULL 05/34] virtio-iommu: Implement RESV_MEM probe request

2020-07-08 Thread Auger Eric
Hi Peter, On 7/5/20 8:21 PM, Peter Maydell wrote: > On Fri, 3 Jul 2020 at 17:54, Peter Maydell wrote: >> >> From: Eric Auger >> >> This patch implements the PROBE request. At the moment, >> only THE RESV_MEM property is handled. The first goal is >> to report iommu wide reserved regions such as

Re: [PATCH v2 9/9] hw/arm/smmuv3: Advertise SMMUv3.2 range invalidation

2020-07-06 Thread Auger Eric
Hi Robin, On 7/6/20 6:18 PM, Robin Murphy wrote: > On 2020-07-02 16:26, Eric Auger wrote: >> Expose the RIL bit so that the guest driver uses range >> invalidation. > > Hmm, this is a v3.2 feature... so strictly, in order to advertise it you > would need to claim at least v3.1 in SMMU_AIDR and im

Re: [PATCH v2 4/9] hw/arm/smmu: Simplify the IOTLB key format

2020-07-06 Thread Auger Eric
Hi Peter, On 7/6/20 3:26 PM, Peter Maydell wrote: > On Thu, 2 Jul 2020 at 16:27, Eric Auger wrote: >> >> Instead of using a Jenkins hash function to generate >> the key let's just use a 64 bit unsigned integer that >> contains the asid and the 40 upper bits of the iova. >> A maximum of 52-bit IOV

Re: [PATCH 0/4] hw/arm/virt-acpi-build: Only expose flash on older machine types

2020-07-02 Thread Auger Eric
Hi Drew, On 6/29/20 4:09 PM, Andrew Jones wrote: > The flash device is exclusively for the host-controlled firmware, so > we should not expose it to the OS. Exposing it risks the OS messing > with it, which could break firmware runtime services and surprise the > OS when all its changes disappear

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-07-02 Thread Auger Eric
Hi Peter, On 6/30/20 6:29 PM, Auger Eric wrote: > Hi Peter, > > On 6/30/20 5:50 PM, Peter Maydell wrote: >> On Fri, 26 Jun 2020 at 14:53, Auger Eric wrote: >>> On 6/25/20 5:30 PM, Peter Maydell wrote: >>>> Rather than looping around doing multiple hash table

Re: [PATCH v7 0/5] VIRTIO-IOMMU probe request support and MSI bypass on ARM

2020-07-02 Thread Auger Eric
Hi Michael, On 7/2/20 1:28 PM, Michael S. Tsirkin wrote: > On Mon, Jun 29, 2020 at 09:03:59AM +0200, Eric Auger wrote: >> By default the virtio-iommu translates MSI transactions. This >> behavior is inherited from ARM SMMU. However the virt machine >> code knows where the MSI doorbells are, so we

Re: [PATCH v7 0/5] VIRTIO-IOMMU probe request support and MSI bypass on ARM

2020-07-02 Thread Auger Eric
Hi, On 6/29/20 9:03 AM, Eric Auger wrote: > By default the virtio-iommu translates MSI transactions. This > behavior is inherited from ARM SMMU. However the virt machine > code knows where the MSI doorbells are, so we can easily > declare those regions as VIRTIO_IOMMU_RESV_MEM_T_MSI. With that > s

Re: [PATCH v5 1/3] qom: Introduce object_property_try_add_child()

2020-07-01 Thread Auger Eric
Hi Greg, On 6/30/20 3:41 PM, Greg Kurz wrote: > On Mon, 29 Jun 2020 21:34:22 +0200 > Eric Auger wrote: > >> object_property_add() does not allow object_property_try_add() >> to gracefully fail as &error_abort is passed as an error handle. >> >> However such failure can easily be triggered from t

Re: [PATCH v4 0/3] Avoid abort on QMP attempt to add an object with duplicate id

2020-06-30 Thread Auger Eric
Hi Paolo, On 6/29/20 5:30 PM, Paolo Bonzini wrote: > On 29/06/20 13:23, Eric Auger wrote: >> Attempting to add an object through QMP with an id that is >> already used leads to a qemu abort. This is a regression since >> d2623129a7de ("qom: Drop parameter @errp of object_property_add() >> & friend

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-30 Thread Auger Eric
Hi Peter, On 6/30/20 5:50 PM, Peter Maydell wrote: > On Fri, 26 Jun 2020 at 14:53, Auger Eric wrote: >> On 6/25/20 5:30 PM, Peter Maydell wrote: >>> Rather than looping around doing multiple hash table lookups like >>> this, why not just avoid including the tg and le

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-30 Thread Auger Eric
Hi Peter, On 6/26/20 3:53 PM, Auger Eric wrote: > Hi Peter, > > On 6/25/20 5:30 PM, Peter Maydell wrote: >> On Thu, 11 Jun 2020 at 17:16, Eric Auger wrote: >>> >>> At the moment each entry in the IOTLB corresponds to a page sized >>> mapping (4K,

Re: [PATCH v4 0/3] Avoid abort on QMP attempt to add an object with duplicate id

2020-06-29 Thread Auger Eric
Hi Paolo, On 6/29/20 5:30 PM, Paolo Bonzini wrote: > On 29/06/20 13:23, Eric Auger wrote: >> Attempting to add an object through QMP with an id that is >> already used leads to a qemu abort. This is a regression since >> d2623129a7de ("qom: Drop parameter @errp of object_property_add() >> & friend

Re: [PATCH v3 1/2] qom: Introduce object_property_try_add_child()

2020-06-29 Thread Auger Eric
Hi Markus On 6/25/20 11:24 AM, Markus Armbruster wrote: > Eric Auger writes: > >> object_property_add() does not allow object_property_try_add() >> to gracefully fail as &error_abort is passed as an error handle. >> >> However such failure can easily be triggered from the QMP shell when, >> for

Re: [PATCH v6 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-06-27 Thread Auger Eric
Hi Markus, On 6/27/20 9:08 AM, Markus Armbruster wrote: > Eric Auger writes: > >> This patch implements the PROBE request. At the moment, >> only THE RESV_MEM property is handled. The first goal is >> to report iommu wide reserved regions such as the MSI regions >> set by the machine code. On x8

Re: [PATCH v6 4/5] virtio-iommu-pci: Add array of Interval properties

2020-06-27 Thread Auger Eric
Hi Markus, On 6/27/20 9:03 AM, Markus Armbruster wrote: > Eric Auger writes: > >> The machine may need to pass reserved regions to the >> virtio-iommu-pci device (such as the MSI window on x86 >> or the MSI doorbells on ARM). >> >> So let's add an array of Interval properties. >> >> Note: if som

Re: [PATCH RESEND 5/9] hw/arm/smmuv3: Store the starting level in SMMUTransTableInfo

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 5:15 PM, Peter Maydell wrote: > On Thu, 11 Jun 2020 at 17:15, Eric Auger wrote: >> >> Compute the starting level on CD decoding and store it >> into SMMUTransTableInfo. We will need this information >> on IOTLB lookup so let's avoid to recompute it each time. >> >> Signed-off

Re: [PATCH RESEND 1/9] hw/arm/smmu-common: Factorize some code in smmu_ptw_64()

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 4:49 PM, Peter Maydell wrote: > On Thu, 11 Jun 2020 at 17:15, Eric Auger wrote: >> >> Page and block PTE decoding can share some code. Let's >> first handle table PTE and factorize some code shared by >> page and block PTEs. >> >> Signed-off-by: Eric Auger >> --- >> hw/arm/

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 5:30 PM, Peter Maydell wrote: > On Thu, 11 Jun 2020 at 17:16, Eric Auger wrote: >> >> At the moment each entry in the IOTLB corresponds to a page sized >> mapping (4K, 16K or 64K), even if the page belongs to a mapped >> block. In case of block mapping this unefficiently cons

Re: [PATCH RESEND 3/9] hw/arm/smmu: Simplify the IOTLB key format

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 5:03 PM, Peter Maydell wrote: > On Thu, 11 Jun 2020 at 17:15, Eric Auger wrote: >> >> Instead of using a Jenkins hash function to generate >> the key let's just use a 64 bit unsigned integer that >> contains the asid and the 40 upper bits of the iova. >> A maximum of 52-bit I

Re: [PATCH v5 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-06-26 Thread Auger Eric
Hi Markus On 6/26/20 10:53 AM, Markus Armbruster wrote: > Auger Eric writes: > >> Hi Markus, >> On 6/25/20 9:05 AM, Markus Armbruster wrote: >>> Eric Auger writes: >>> >>>> This patch implements the PROBE request. At the moment, >>>&

Re: [PATCH v5 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 12:12 PM, Peter Maydell wrote: > On Thu, 25 Jun 2020 at 08:06, Markus Armbruster wrote: >> $ qemu-system-x86_64 -nodefaults -S -display none -device >> virtio-iommu-pci,len-reserved-regions=1,reserved-regions[0]=0xfee0:0xfeef:99 >> qemu-system-x86_64: -device

Re: [PATCH v5 5/5] hw/arm/virt: Let the virtio-iommu bypass MSIs

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 12:01 PM, Peter Maydell wrote: > On Wed, 24 Jun 2020 at 14:27, Eric Auger wrote: >> >> At the moment the virtio-iommu translates MSI transactions. >> This behavior is inherited from ARM SMMU. The virt machine >> code knows where the guest MSI doorbells are so we can easily >>

Re: [PATCH v5 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-06-26 Thread Auger Eric
Hi Markus, On 6/25/20 9:05 AM, Markus Armbruster wrote: > Eric Auger writes: > >> This patch implements the PROBE request. At the moment, >> only THE RESV_MEM property is handled. The first goal is >> to report iommu wide reserved regions such as the MSI regions >> set by the machine code. On x86

Re: [PATCH] hw/virtio/virtio-iommu-pci.c: Fix typo in error message

2020-06-26 Thread Auger Eric
Hi Peter, On 6/25/20 12:08 PM, Peter Maydell wrote: > Fix a typo in an error message in virtio_iommu_pci_realize(): > "Check you machine" should be "Check your machine". > > Reported-by: Markus Armbruster > Signed-off-by: Peter Maydell Reviewed-by: Eric Auger Thanks Eric > --- > hw/virtio/

Re: [PATCH v2 1/2] qom: Introduce object_property_try_add_child()

2020-06-24 Thread Auger Eric
Hi Paolo, On 6/24/20 6:16 PM, Paolo Bonzini wrote: > On 24/06/20 18:02, Auger Eric wrote: >> Hi Paolo, >> >> On 6/24/20 4:17 PM, Auger Eric wrote: >>> Hi Paolo, >>> >>> On 6/24/20 4:12 PM, Paolo Bonzini wrote: >>>> On 24/06/20 14:43, E

Re: [PATCH v2 2/2] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id

2020-06-24 Thread Auger Eric
Hi Thomas, On 6/24/20 2:43 PM, Eric Auger wrote: > This new test checks that attempting to create an object > with an existing ID gracefully fails. > > Signed-off-by: Eric Auger > --- > tests/qtest/qmp-cmd-test.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/test

Re: [PATCH v2 1/2] qom: Introduce object_property_try_add_child()

2020-06-24 Thread Auger Eric
Hi Paolo, On 6/24/20 4:17 PM, Auger Eric wrote: > Hi Paolo, > > On 6/24/20 4:12 PM, Paolo Bonzini wrote: >> On 24/06/20 14:43, Eric Auger wrote: >>> +op = object_property_try_add(obj, name, type, >>> object_get_child_property, >>&

Re: [PATCH v2 1/2] qom: Introduce object_property_try_add_child()

2020-06-24 Thread Auger Eric
Hi Paolo, On 6/24/20 4:12 PM, Paolo Bonzini wrote: > On 24/06/20 14:43, Eric Auger wrote: >> +op = object_property_try_add(obj, name, type, object_get_child_property, >> + NULL, object_finalize_child_property, >> + child, errp); >

Re: [PATCH v2 0/2] Avoid abort on QMP attempt to add an object with duplicate id

2020-06-24 Thread Auger Eric
Hi, On 6/24/20 3:35 PM, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20200624124301.7112-1-eric.au...@redhat.com/ > > > > Hi, > > This series failed the docker-quick@centos7 build test. Please find the > testing commands and > their output below. If you have Docker i

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-24 Thread Auger Eric
Hi Markus, On 6/24/20 10:22 AM, Markus Armbruster wrote: > Eric Auger writes: > >> object_property_add() does not allow object_property_try_add() >> to gracefully fail as &error_abort is passed as an error handle. >> >> However such failure can easily be triggered from the QMP shell when, >> for

Re: [PATCH v4 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION

2020-06-24 Thread Auger Eric
Hi Markus, On 6/24/20 10:10 AM, Markus Armbruster wrote: > Auger Eric writes: > >> Hi Markus, >> >> On 6/23/20 5:13 PM, Markus Armbruster wrote: >>> Eric Auger writes: >>> >>>> Introduce a new property defining a reserved region: >&g

Re: [PATCH] qom: Allow object_property_add_child() to fail

2020-06-23 Thread Auger Eric
Hi Paolo, On 6/23/20 6:22 PM, Paolo Bonzini wrote: > On 23/06/20 17:54, Eric Auger wrote: >> This patch introduces two new functions, object_property_add_err() and >> object_property_add_child_err() whose prototype features an error handle. >> object_property_add_child_err() now gets called from u

Re: [PATCH v4 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION

2020-06-23 Thread Auger Eric
Hi Markus, On 6/23/20 5:13 PM, Markus Armbruster wrote: > Eric Auger writes: > >> Introduce a new property defining a reserved region: >> ::. >> >> This will be used to encode reserved IOVA regions. >> >> For instance, in virtio-iommu use case, reserved IOVA regions >> will be passed by the mach

Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION

2020-06-23 Thread Auger Eric
Hi Markus, On 6/23/20 5:15 PM, Markus Armbruster wrote: > Auger Eric writes: > >> Hi Markus, >> >> On 6/22/20 1:22 PM, Markus Armbruster wrote: >>> Eric Auger writes: >>> >>>> Introduce a new property defining a reserved region: >>&g

Re: [PATCH v4] arm/virt: Add memory hot remove support

2020-06-23 Thread Auger Eric
Hi Shameer, On 6/22/20 2:41 PM, Shameer Kolothum wrote: > This adds support for memory(pc-dimm) hot remove on arm/virt that > uses acpi ged device. > > NVDIMM hot removal is not yet supported. > > Signed-off-by: Shameer Kolothum Works fine for me when passing "movable_node" in the guest kernel

Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION

2020-06-23 Thread Auger Eric
Hi Markus, On 6/22/20 1:22 PM, Markus Armbruster wrote: > Eric Auger writes: > >> Introduce a new property defining a reserved region: >> , , . >> >> This will be used to encode reserved IOVA regions. >> >> For instance, in virtio-iommu use case, reserved IOVA regions >> will be passed by the ma

Re: [PATCH 16/22] hw: Fix error API violation around object_property_set_link()

2020-06-22 Thread Auger Eric
Hi Markus, On 6/22/20 12:42 PM, Markus Armbruster wrote: > The Error ** argument must be NULL, &error_abort, &error_fatal, or a > pointer to a variable containing NULL. Passing an argument of the > latter kind twice without clearing it in between is wrong: if the > first call sets an error, it no

Re: [PATCH v4 1/5] acpi: Convert build_tpm2() to build_append* API

2020-06-22 Thread Auger Eric
Hi Igor, On 6/22/20 2:14 PM, Igor Mammedov wrote: > On Mon, 22 Jun 2020 11:47:26 +0200 > Auger Eric wrote: > >> Hi Igor, >> >> On 6/22/20 11:39 AM, Igor Mammedov wrote: >>> On Fri, 19 Jun 2020 07:19:51 -0400 >>> Stefan Berger wrote: >>>

Re: [PATCH v4 1/5] acpi: Convert build_tpm2() to build_append* API

2020-06-22 Thread Auger Eric
Hi Igor, On 6/22/20 11:39 AM, Igor Mammedov wrote: > On Fri, 19 Jun 2020 07:19:51 -0400 > Stefan Berger wrote: > >> On 6/19/20 5:43 AM, Auger Eric wrote: >>> Hi Laszlo, >>> >>> On 6/19/20 11:38 AM, Laszlo Ersek wrote: >>>> On 06/

<    1   2   3   4   5   6   7   8   9   10   >