Re: [PATCH v2 1/2] accel: kvm: Fix kvm_type invocation

2021-03-10 Thread Auger Eric
lude/hw/boards.h > @@ -128,6 +128,7 @@ typedef struct { > * @kvm_type: > *Return the type of KVM corresponding to the kvm-type string option or > *computed based on other criteria such as the host kernel capabilities. > + *kvm-type may be NULL if it is not needed. > * @numa_mem_supported: > *true if '--numa node.mem' option is supported and false otherwise > * @smp_parse: > Reviewed-by: Eric Auger Eric

Re: [PATCH v2 2/2] hw/arm/virt: KVM: The IPA lower bound is 32

2021-03-10 Thread Auger Eric
Hi Drew, On 3/10/21 2:52 PM, Andrew Jones wrote: > The virt machine already checks KVM_CAP_ARM_VM_IPA_SIZE to get the > upper bound of the IPA size. If that bound is lower than the highest > possible GPA for the machine, then QEMU will error out. However, the > IPA is set to 40 when the highest GP

Re: QEMU SMMUv3 stage 2 translation

2021-05-20 Thread Auger Eric
Hi Shashi, [ fixing my email address ] On 5/13/21 4:25 PM, Shashi Mallela wrote: > Hi, > > Since the current SMMUv3 qemu implementation only supports stage 1 > translation,wanted to understand if the implementation could be extended > to stage 2 translation support and if yes what is the overall

Re: [PATCH v3 07/11] Acceptance Tests: set up SSH connection by default after boot for LinuxTest

2021-04-19 Thread Auger Eric
Hi Cleber, On 4/12/21 6:46 AM, Cleber Rosa wrote: > The LinuxTest specifically targets users that need to interact with Linux > guests. So, it makes sense to give a connection by default, and avoid > requiring it as boiler-plate code. > > Signed-off-by: Cleber Rosa > Reviewed-by: Marc-André Lur

Re: [PATCH v3 11/11] tests/acceptance/virtiofs_submounts.py: fix setup of SSH pubkey

2021-04-19 Thread Auger Eric
Hi Cleber, On 4/12/21 6:46 AM, Cleber Rosa wrote: > The public key argument should be a path to a file, and not the > public key data. > > Reported-by: Wainer dos Santos Moschetta > Signed-off-by: Cleber Rosa > --- > tests/acceptance/virtiofs_submounts.py | 2 +- > 1 file changed, 1 insertion(

Re: [PATCH 1/3] Acceptance Tests: rename attribute holding the distro image checksum

2021-04-19 Thread Auger Eric
Hi Cleber, On 4/15/21 12:14 AM, Cleber Rosa wrote: > This renames the attribute that holds the checksum for the image Linux > distribution image used. > > The current name of the attribute is not very descriptive. Also, in > preparation for making the distribution used configurable, which will u

Re: [PATCH 2/3] Acceptance Tests: move definition of distro checksums to the framework

2021-04-22 Thread Auger Eric
Hi Cleber, On 4/15/21 12:14 AM, Cleber Rosa wrote: > Instead of having, by default, the checksum in the tests, and the > definition of tests in the framework, let's keep them together. > > A central definition for distributions is available, and it should > allow other known distros to be added m

Re: [RFC v9 15/29] vfio: Set up nested stage mappings

2021-04-26 Thread Auger Eric
Hi Kunkun, On 4/14/21 3:45 AM, Kunkun Jiang wrote: > On 2021/4/13 20:57, Auger Eric wrote: >> Hi Kunkun, >> >> On 4/13/21 2:10 PM, Kunkun Jiang wrote: >>> Hi Eric, >>> >>> On 2021/4/11 20:08, Eric Auger wrote: >>>> In nested mode, leg

Re: [RFC v9 15/29] vfio: Set up nested stage mappings

2021-04-26 Thread Auger Eric
Hi Kunkun, On 4/15/21 4:03 AM, Kunkun Jiang wrote: > Hi Eric, > > On 2021/4/14 16:05, Auger Eric wrote: >> Hi Kunkun, >> >> On 4/14/21 3:45 AM, Kunkun Jiang wrote: >>> On 2021/4/13 20:57, Auger Eric wrote: >>>> Hi Kunkun, >>>>

Re: [RFC v9 15/29] vfio: Set up nested stage mappings

2021-04-29 Thread Auger Eric
Hi Kunkun, On 4/28/21 11:51 AM, Kunkun Jiang wrote: > Hi Eric, > > On 2021/4/27 3:16, Auger Eric wrote: >> Hi Kunkun, >> >> On 4/15/21 4:03 AM, Kunkun Jiang wrote: >>> Hi Eric, >>> >>> On 2021/4/14 16:05, Auger Eric wrote: >>&g

Re: [RFC v7 26/26] vfio/pci: Implement return_page_response page response callback

2021-02-24 Thread Auger Eric
Hi Shameer, On 2/18/21 2:32 PM, Auger Eric wrote: > Hi Shameer, > > On 2/18/21 12:46 PM, Shameerali Kolothum Thodi wrote: >> >> Hi Eric, >> >>> -Original Message- >>> From: Auger Eric [mailto:eric.au...@redhat.com] >>> Sent: 18

Re: [PATCH v2 1/7] intel_iommu: Fix mask may be uninitialized in vtd_context_device_invalidate

2021-02-25 Thread Auger Eric
Hi Philippe, On 2/25/21 11:08 AM, Philippe Mathieu-Daudé wrote: > On 2/25/21 10:14 AM, Eric Auger wrote: >> With -Werror=maybe-uninitialized configuration we get >> ../hw/i386/intel_iommu.c: In function ‘vtd_context_device_invalidate’: >> ../hw/i386/intel_iommu.c:1888:10: error: ‘mask’ may be used

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: [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: [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: [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: [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 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 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 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 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 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 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 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 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 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] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-28 Thread Auger Eric
Hi Zenghui, On 12/25/20 10:50 AM, Zenghui Yu wrote: > When performing range-based IOTLB invalidation, we should decode the TG > field into the corresponding translation granule size so that we can pass > the correct invalidation range to backend. Set @granule to (tg * 2 + 10) to > properly emulate

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-28 Thread Auger Eric
Hi Zenghui, On 1/28/21 9:25 AM, Auger Eric wrote: > Hi Zenghui, > > On 12/25/20 10:50 AM, Zenghui Yu wrote: >> When performing range-based IOTLB invalidation, we should decode the TG >> field into the corresponding translation granule size so that we can pass >> the co

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-29 Thread Auger Eric
Hi Zenghui, On 1/29/21 1:15 PM, Zenghui Yu wrote: > Hi Eric, > > On 2021/1/29 5:30, Auger Eric wrote: >> Hi Zenghui, >> >> On 1/28/21 9:25 AM, Auger Eric wrote: >>> Hi Zenghui, >>> >>> On 12/25/20 10:50 AM, Zenghui Yu wrote: >>>>

Re: [PATCH v2] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-31 Thread Auger Eric
Hi Zenghui, On 1/30/21 5:32 AM, Zenghui Yu wrote: > When handling guest range-based IOTLB invalidation, we should decode the TG > field into the corresponding translation granule size so that we can pass > the correct invalidation range to backend. Set @granule to (tg * 2 + 10) to > properly emula

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-05 Thread Auger Eric
Hi, On 2/5/21 4:16 AM, Jason Wang wrote: > > On 2021/2/5 上午3:12, Peter Xu wrote: >> Previous work on dev-iotlb message broke vhost on either SMMU > > > Have a quick git grep and it looks to me v3 support ATS and have command > for device iotlb (ATC) invalidation. Yes I will do that. Should no

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Auger Eric
Hi, [Adding David and Greg in CC] On 2/8/21 7:37 PM, Peter Xu wrote: > On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: > > [...] > >>> I'm not sure I remember it right, but we seem to have similar discussion >>> previously on "what if the user didn't specify ats=on" - I think at th

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-08 Thread Auger Eric
Hi, On 2/7/21 3:47 PM, Peter Xu wrote: > Hi, Kevin, > > On Sun, Feb 07, 2021 at 09:04:55AM +, Tian, Kevin wrote: >>> From: Peter Xu >>> Sent: Friday, February 5, 2021 11:31 PM >>> > > >> or virtio-iommu >> since dev-iotlb (or PCIe ATS) > > > We may need to add this

Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support

2021-02-09 Thread Auger Eric
Hi, On 2/9/21 4:12 AM, Jason Wang wrote: > > On 2021/2/9 上午2:37, Peter Xu wrote: >> On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote: >> >> [...] >> I'm not sure I remember it right, but we seem to have similar discussion previously on "what if the user didn't specify ats

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] [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 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 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 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 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 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 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 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 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 11/19] util/vfio-helpers: Let qemu_vfio_dma_map() propagate Error

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote: > Currently qemu_vfio_dma_map() displays errors on stderr. > When using management interface, this information is simply > lost. Pass qemu_vfio_dma_map() an Error* argument so it can Error** or simply error handle > propagate the err

Re: [PATCH v2 18/19] block/nvme: Switch to using the MSIX API

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote: > In preparation of using multiple IRQs, switch to using the recently > introduced MSIX API. Instead of allocating and assigning IRQ in > a single step, we now have to use two distinct calls. > > Reviewed-by: Stefan Hajnoczi > Sign

Re: [PATCH v2 16/19] util/vfio-helpers: Introduce qemu_vfio_pci_msix_init_irqs()

2020-10-26 Thread Auger Eric
Hi Philippe, On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote: > qemu_vfio_pci_init_irq() allows us to initialize any type of IRQ, > but only one. Introduce qemu_vfio_pci_msix_init_irqs() which is > specific to MSIX IRQ type, and allow us to use multiple IRQs > (thus passing multiple eventfd not

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

2020-10-27 Thread Auger Eric
Hi Peter, On 10/19/20 9:26 PM, Peter Maydell wrote: > On Wed, 14 Oct 2020 at 20:36, 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 >> --- >> hw/arm/trace-events | 2 +- >> 1 fil

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

2020-10-27 Thread Auger Eric
Hi Peter, On 10/27/20 11:38 AM, Peter Maydell wrote: > OK; I'll apply this patch to target-arm.next; feel free to send > a patch updating the other tracepoints to hex. sure, I will. Thanks Eric

Re: [PATCH 02/25] block/nvme: Use hex format to display offset in trace events

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Use the same format used for the hw/vfio/ trace events. > > Suggested-by: Eric Auger > Signed-off-by: Philippe Mathieu-Daudé > --- > block/trace-events | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > di

Re: [PATCH 03/25] block/nvme: Report warning with warn_report()

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Instead of displaying warning on stderr, use warn_report() > which also displays it on the monitor. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 4 ++-- > 1 file changed

Re: [PATCH 05/25] block/nvme: Trace nvme_poll_queue() per queue

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > As we want to enable multiple queues, report the event > in each nvme_poll_queue() call, rather than once in > the callback calling nvme_poll_queues(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > ---

Re: [PATCH 07/25] block/nvme: Trace queue pair creation/deletion

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 3 +++ > block/trace-events | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/block/nvme.c b/block/nvme.c > inde

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

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Controllers have different capabilities and report them in the > CAP register. We are particularly interested by the page size > limits. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé > --- > block/nvme

Re: [PATCH 06/25] block/nvme: Improve nvme_free_req_queue_wait() trace information

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > What we want to trace is the block driver state and the queue index. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c | 2 +- > block/trace-event

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

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/28/20 11:25 AM, Philippe Mathieu-Daudé wrote: > On 10/28/20 11:20 AM, Auger Eric wrote: >> Hi Philippe, >> >> On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: >>> Controllers have different capabilities and report them in the >>> CAP regi

Re: [PATCH 09/25] block/nvme: Move definitions before structure declarations

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > To be able to use some definitions in structure declarations, > move them earlier. No logical change. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 19 ++-

Re: [PATCH 10/25] block/nvme: Use unsigned integer for queue counter/size

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > We can not have negative queue count/size/index, use unsigned type. > Rename 'nr_queues' as 'queue_count' to match the spec naming. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Thanks Eric > --- > block/nvme.c

Re: [PATCH 11/25] block/nvme: Make nvme_identify() return boolean indicating error

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. Then I think the returned value should be used by the cal

Re: [PATCH 12/25] block/nvme: Make nvme_init_queue() return boolean indicating error

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Just for consistency, following the example documented since > commit e3fe3988d7 ("error: Document Error API usage rules"), > return a boolean value indicating an error is set or not. > This simplifies a bit nvme_create_queue_pair(). also dir

Re: [PATCH 13/25] block/nvme: Introduce Completion Queue definitions

2020-10-28 Thread Auger Eric
Hi, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Rename Submission Queue flags with 'Sq' ... to differentiate submission queue flags from command queue flags. and introduce > Completion Queue flag definitions. besides Reviewed-by: Eric Auger Thanks Eric > > Signed-off-by: Philippe M

Re: [PATCH 14/25] block/nvme: Use definitions instead of magic values in add_io_queue()

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Replace magic values by definitions, and simplifiy since the > number of queues will never reach 64K. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 9 +

Re: [PATCH 15/25] block/nvme: Correctly initialize Admin Queue Attributes

2020-10-28 Thread Auger Eric
sed value. > > This bug has never been hit because the device initialization > uses a single command synchronously :) > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 6 +++--- > 1 file changed, 3 insertions(+), 3

Re: [PATCH 16/25] block/nvme: Simplify ADMIN queue access

2020-10-28 Thread Auger Eric
o_queue().> > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/block/nvme.c b/block/nvme.c > index d5df30ec074..2d3648694b0 100644 > ---

Re: [PATCH 17/25] block/nvme: Simplify nvme_cmd_sync()

2020-10-28 Thread Auger Eric
On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > As all commands use the ADMIN queue, it is pointless to pass > it as argument each time. Remove the argument. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > block/nvme.c | 15 +++

Re: [PATCH 18/25] block/nvme: Pass AioContext argument to nvme_add_io_queue()

2020-10-28 Thread Auger Eric
nvme_init(BlockDriverState *bs, const char > *device, int namespace, > } > > /* Set up command queues. */ > -if (!nvme_add_io_queue(bs, errp)) { > + if (!nvme_add_io_queue(bs, aio_context, errp)) { > ret = -EIO; > } > out: > Besides Reviewed-by: Eric Auger Eric

Re: [RFC PATCH 25/25] block/nvme: Fix use of write-only doorbells page on Aarch64 arch

2020-10-28 Thread Auger Eric
set of 4K which > broke this contract on Aarch64 arch. > > Fix by mapping at offset 0, and and accessing doorbells at offset=4K. > > Fixes: f68453237b9 ("block/nvme: Map doorbells pages write-only") > Reported-by: Eric Auger > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH 00/25] block/nvme: Fix Aarch64 host

2020-10-28 Thread Auger Eric
Hi Philippe, On 10/27/20 2:55 PM, Philippe Mathieu-Daudé wrote: > Add a bit of tracing, clean around to finally fix few bugs. > In particular, restore NVMe on Aarch64 host. > > Eric Auger (4): > block/nvme: Change size and alignment of IDENTIFY response buffer > block/nvme: Change size and al

Re: [RFC v7 26/26] vfio/pci: Implement return_page_response page response callback

2021-02-18 Thread Auger Eric
Hi Shameer, On 2/18/21 11:19 AM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 16 November 2020 18:14 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> qemu-devel@nongnu.org; qemu-...@nongnu.org; >>

Re: [RFC v7 26/26] vfio/pci: Implement return_page_response page response callback

2021-02-18 Thread Auger Eric
Hi Shameer, On 2/18/21 12:46 PM, Shameerali Kolothum Thodi wrote: > > Hi Eric, > >> -Original Message- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: 18 February 2021 10:42 >> To: Shameerali Kolothum Thodi ; >> eric.auger

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Auger Eric
Hi Peter, On 2/18/21 5:42 PM, Peter Xu wrote: > Eric, > > On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Auger wrote: >> @@ -164,12 +166,27 @@ static void >> virtio_iommu_notify_unmap(IOMMUMemoryRegion *mr, hwaddr virt_start, >> >> event.type = IOMMU_NOTIFIER_UNMAP; >> event.entry.ta

Re: [PATCH] virtio-iommu: Handle non power of 2 range invalidations

2021-02-18 Thread Auger Eric
Hi Peter, On 2/18/21 6:48 PM, Peter Xu wrote: > On Thu, Feb 18, 2021 at 06:18:22PM +0100, Auger Eric wrote: >> Hi Peter, >> >> On 2/18/21 5:42 PM, Peter Xu wrote: >>> Eric, >>> >>> On Thu, Feb 18, 2021 at 03:16:50PM +0100, Eric Aug

Re: [PATCH] hw/arm/smmuv3: Fix up L1STD_SPAN decoding

2020-11-30 Thread Auger Eric
Hi Kunkun, Peter, On 11/30/20 12:29 PM, Peter Maydell wrote: > On Tue, 24 Nov 2020 at 02:37, Kunkun Jiang wrote: >> >> Accroding to the SMMUv3 spec, the SPAN field of Level1 Stream Table >> Descriptor is 5 bits([4:0]). >> >> Fixes: 9bde7f0674f(hw/arm/smmuv3: Implement translate callback) >> Signe

Re: [RFC v7 09/26] vfio: Force nested if iommu requires it

2020-12-01 Thread Auger Eric
Hi Kunkun, On 11/28/20 10:01 AM, Kunkun Jiang wrote: > Hi Eric, >> @@ -1668,6 +1679,14 @@ static int vfio_connect_container(VFIOGroup *group, >> AddressSpace *as, >> VFIOContainer *container; >> int ret, fd; >> VFIOAddressSpace *space; >> +IOMMUMemoryRegion *iommu_mr; >> +b

Re: [Qemu-devel] [PATCH v2] vfio-ccw: use vfio_set_irq_signaling

2019-06-17 Thread Auger Eric
Hi Connie, On 6/17/19 12:10 PM, Cornelia Huck wrote: > Use the new helper. > > Signed-off-by: Cornelia Huck Reviewed-by: Eric Auger Thanks Eric > --- > v1->v2: > - Don't go overboard with deleting, and keep the get_irq_info part. > --- > hw/vfio/ccw.c | 51 +-

Re: [Qemu-devel] [PATCH v5 3/8] hw/acpi: Add ACPI Generic Event Device Support

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > From: Samuel Ortiz > > The ACPI Generic Event Device (GED) is a hardware-reduced specific > device[ACPI v6.1 Section 5.6.9] that handles all platform events, > including the hotplug ones.This patch generates the AML code that . This patch

Re: [Qemu-devel] [PATCH v5 4/8] hw/arm/virt: Add memory hotplug framework

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > From: Eric Auger > > This patch adds the memory hot-plug/hot-unplug infrastructure > in machvirt. The device memory is not yet exposed to the Guest > either through DT or ACPI and hence both cold/hot plug of memory > is explicitly disable

Re: [Qemu-devel] [PATCH v5 7/8] hw/acpi: Add system power down support to GED

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > This adds support to use GED for system power down event. > > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Thanks Eric > --- > hw/acpi/generic_event_device.c | 16 > include/hw/acpi/generic_event_d

Re: [Qemu-devel] [PATCH v5 5/8] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > This initializes the GED device with base memory and irq, configures > ged memory hotplug event and builds the corresponding aml code. With > this, both hot and cold plug of device memory is enabled now for Guest > with ACPI boot. > > Memo

Re: [Qemu-devel] [PATCH v5 8/8] hw/arm: Use GED for system_powerdown event

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > Use GED for system_powerdown event instead of GPIO for ACPI. > Guest boot with DT still uses GPIO.> > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Thanks Eric > --- > hw/arm/virt-acpi-build.c | 37 +--

Re: [Qemu-devel] [PATCH v5 0/8] ARM virt: ACPI memory hotplug support

2019-06-18 Thread Auger Eric
Hi Shameer, On 5/22/19 6:22 PM, Shameer Kolothum wrote: > This series is an attempt to provide device memory hotplug support > on ARM virt platform. This is based on Eric's recent works here[1] > and carries some of the pc-dimm related patches dropped from his > series. > > The kernel support fo

Re: [Qemu-devel] [PATCH v5 0/8] ARM virt: ACPI memory hotplug support

2019-06-18 Thread Auger Eric
Hi Peter, On 6/18/19 2:57 PM, Peter Maydell wrote: > I'm not sure we should carry across Tested-by tags like that: any > respin might accidentally introduce bugs that make it stop working... OK. No problem. I will test the next version then. Thanks Eric

Re: [Qemu-devel] [PATCH] memory: do not do out of bound notification

2019-06-19 Thread Auger Eric
Hi Yan, [+ Peter] On 6/19/19 10:49 AM, Yan Zhao wrote: > even if an entry overlaps with notifier's range, should not map/unmap > out of bound part in the entry. I don't think the patch was based on the master as the trace at the very end if not part of the upstream code. > > This would cause pr

Re: [Qemu-devel] [PATCH] memory: warning on out of scope notification

2019-06-24 Thread Auger Eric
ies in vtd shadow page table. e.g. > (1) for notifier 0-0xfedf, > IOVAs from 0 - 0x get unmapped, > and IOVAs from 0x3c00 - 0x3c1f get mapped > (2) for notifier 0xfef0-0x > IOVAs from 0 - 0x7f get unmapped, > but IOVAs from

Re: [Qemu-devel] [PATCH 1/2] intel_iommu: Fix incorrect "end" for vtd_address_space_unmap

2019-06-24 Thread Auger Eric
Hi Peter, On 6/24/19 8:37 AM, Peter Xu wrote: > From: Yan Zhao > > IOMMUNotifier is with inclusive ranges, so we should check > against (VTD_ADDRESS_SIZE(s->aw_bits) - 1). > > Signed-off-by: Yan Zhao > [peterx: split from another bigger patch] > Signed-off-by: Peter Xu Reviewed-by: Eric Auger

Re: [Qemu-devel] [PATCH v2 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Auger Eric
Hi Peter, On 6/24/19 11:18 AM, Peter Xu wrote: > This is an replacement work of Yan Zhao's patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html > > vtd_address_space_unmap() will do proper page mask alignment to make > sure each IOTLB message will have correct masks for n

Re: [Qemu-devel] [PATCH v3] memory: warning on out of scope notification

2019-06-24 Thread Auger Eric
0x3c00 - 0x3c1f cannot get mapped back. > > Cc: Auger Eric > Signed-off-by: Yan Zhao > > --- > v3: > refined code style and message format > > v2: > 1. added a local variable entry_end (Auger Eric) > 2. using PRIx64 as format for address range in warni

Re: [Qemu-devel] [PATCH v2 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Auger Eric
On 6/24/19 1:10 PM, Peter Xu wrote: > On Mon, Jun 24, 2019 at 12:09:48PM +0200, Auger Eric wrote: >> Hi Peter, >> >> On 6/24/19 11:18 AM, Peter Xu wrote: >>> This is an replacement work of Yan Zhao's patch: >>> >>> https://www.

Re: [Qemu-devel] [PATCH v2 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-25 Thread Auger Eric
Hi Peter, On 6/24/19 11:18 AM, Peter Xu wrote: > This is an replacement work of Yan Zhao's patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html > > vtd_address_space_unmap() will do proper page mask alignment to make > sure each IOTLB message will have correct masks for n

Re: [Qemu-devel] [PATCH v4] memory: assert on out of scope notification

2019-06-25 Thread Auger Eric
Hi Yan, [ + Peter] On 6/25/19 5:21 AM, Yan Zhao wrote: > It is wrong for an entry to have parts out of scope of notifier's range. > assert this condition. > > Out of scope mapping/unmapping would cause problem, as in below case: > > 1. initially there are two notifiers with ranges > 0-0xfedfff

Re: [Qemu-devel] [PATCH v2 02/14] target/arm/cpu: Ensure we can use the pmu with kvm

2019-06-25 Thread Auger Eric
Hi Drew, On 6/21/19 6:34 PM, Andrew Jones wrote: > We first convert the pmu property from a static property to one with > its own accessors. Then we use the set accessor to check if the PMU is > supported when using KVM. Indeed a 32-bit KVM host does not support > the PMU, so this check will catch

Re: [Qemu-devel] [PATCH v2 01/14] target/arm/cpu64: Ensure kvm really supports aarch64=off

2019-06-25 Thread Auger Eric
Hi Drew, On 6/21/19 6:34 PM, Andrew Jones wrote: > If -cpu ,aarch64=off is used then KVM must also be used, and it > and the host must support running the vcpu in 32-bit mode. Also, if > -cpu ,aarch64=on is used, then it doesn't matter if kvm is > enabled or not. > > Signed-off-by: Andrew Jones

Re: [Qemu-devel] [PATCH v2 03/14] target/arm/monitor: Introduce qmp_query_cpu_model_expansion

2019-06-26 Thread Auger Eric
Hi Drew, On 6/21/19 6:34 PM, Andrew Jones wrote: > Add support for the query-cpu-model-expansion QMP command to Arm. We > do this selectively, only exposing CPU properties which represent > optional CPU features which the user may want to enable/disable. Also, > for simplicity, we restrict the lis

Re: [Qemu-devel] [PATCH-for-4.2 v9 01/12] hw/acpi: Make ACPI IO address space configurable

2019-09-01 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > This is in preparation for adding support for ARM64 platforms > where it doesn't use port mapped IO for ACPI IO space. We are > making changes so that MMIO region can be accommodated > and board can pass the base address into the aml build

Re: [Qemu-devel] [PATCH-for-4.2 v9 06/12] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-09-01 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > This initializes the GED device with base memory and irq, configures > ged memory hotplug event and builds the corresponding aml code. With > this, both hot and cold plug of device memory is enabled now for Guest > with ACPI boot. > > Mem

Re: [Qemu-devel] [PATCH-for-4.2 v9 03/12] hw/acpi: Add ACPI Generic Event Device Support

2019-09-01 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > From: Samuel Ortiz > > The ACPI Generic Event Device (GED) is a hardware-reduced specific > device[ACPI v6.1 Section 5.6.9] that handles all platform events, > including the hotplug ones. This patch generates the AML code that > defines G

Re: [Qemu-devel] [PATCH-for-4.2 v9 10/12] docs/specs: Add ACPI GED documentation

2019-09-01 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > Documents basic concepts of ACPI Generic Event device(GED) > and interface between QEMU and the ACPI BIOS. > > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Thanks Eric > --- > docs/specs/acpi_hw_reduced_hotplug.txt | 60 +++

Re: [Qemu-devel] [PATCH-for-4.2 v9 06/12] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot

2019-09-01 Thread Auger Eric
Hi Shameer, On 9/1/19 1:18 PM, Auger Eric wrote: > Hi Shameer, > > On 8/13/19 11:05 PM, Shameer Kolothum wrote: >> This initializes the GED device with base memory and irq, configures >> ged memory hotplug event and builds the corresponding aml code. With >> this, both

Re: [Qemu-devel] [PATCH-for-4.2 v9 08/12] hw/arm: Factor out powerdown notifier from GPIO

2019-09-02 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > This is in preparation of using GED device for > system_powerdown event. Make the powerdown notifier > registration independent of create_gpio() fn. > > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Thanks Eric > --- > hw/a

Re: [Qemu-devel] [PATCH-for-4.2 v9 09/12] hw/arm: Use GED for system_powerdown event

2019-09-02 Thread Auger Eric
Hi Shameer, On 8/13/19 11:05 PM, Shameer Kolothum wrote: > For machines 4.2 or higher with ACPI boot use GED for system_powerdown > event instead of GPIO. Guest boot with DT still uses GPIO. > > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Eric > --- > v8 --&g

<    5   6   7   8   9   10   11   12   13   14   >