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/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 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] 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-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-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 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 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 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 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 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: [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 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: [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] 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 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 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.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 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 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 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 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 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] 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 v3 1/2] vfio: Turn the container error into an Error handle

2019-09-24 Thread Auger Eric
Hi Alex, On 9/24/19 1:05 AM, Alex Williamson wrote: > On Mon, 23 Sep 2019 08:55:51 +0200 > Eric Auger wrote: > >> The container error integer field is currently used to store >> the first error potentially encountered during any >> vfio_listener_region_add() call. However this fails to propagate

Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c

2019-09-24 Thread Auger Eric
Hi Thomas, On 9/23/19 8:09 PM, Thomas Huth wrote: > On 23/09/2019 16.31, Auger Eric wrote: >> Hi Thomas, >> >> On 9/21/19 5:04 PM, Thomas Huth wrote: >>> We are going to make CONFIG_ARM_V7M optional, so the related cortex-m >>> CPUs should only be created

Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c

2019-09-24 Thread Auger Eric
Hi Thomas, On 9/24/19 1:06 PM, Thomas Huth wrote: > On 24/09/2019 13.02, Auger Eric wrote: >> Hi Thomas, >> >> On 9/23/19 8:09 PM, Thomas Huth wrote: >>> On 23/09/2019 16.31, Auger Eric wrote: >>>> Hi Thomas, >>>> >>>>

Re: [PATCH v4 3/9] target/arm: Allow SVE to be disabled via a CPU property

2019-09-24 Thread Auger Eric
'sve=on|off' > property to give it that flexibility. We also rename > cpu_max_get/set_sve_vq to cpu_max_get/set_sve_max_vq in order for them > to follow the typical *_get/set_ pattern. > > Signed-off-by: Andrew Jones > Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Er

Re: [PATCH v4 1/9] target/arm/monitor: Introduce qmp_query_cpu_model_expansion

2019-09-24 Thread Auger Eric
Hi Drew, On 9/24/19 1:30 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. > Additionally we restrict the list of quer

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-25 Thread Auger Eric
Hi Drew, On 9/24/19 1:31 PM, Andrew Jones wrote: > Introduce cpu properties to give fine control over SVE vector lengths. > We introduce a property for each valid length up to the current > maximum supported, which is 2048-bits. The properties are named, e.g. > sve128, sve256, sve384, sve512, ...,

Re: [PATCH v4 5/9] target/arm/kvm64: Add kvm_arch_get/put_sve

2019-09-25 Thread Auger Eric
Richard Henderson Reviewed-by: Eric Auger Eric > --- > target/arm/kvm64.c | 137 +++-- > 1 file changed, 133 insertions(+), 4 deletions(-) > > diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c > index 28f6db57d5ee..ea454c613919 10064

Re: [PATCH v4 6/9] target/arm/kvm64: max cpu: Enable SVE when available

2019-09-25 Thread Auger Eric
ing all vector lengths the host CPU supports > when on. We'll add the other SVE CPU properties in later patches. > > Signed-off-by: Andrew Jones > Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Eric > --- > target/arm/cpu64.c | 17 ++--- > t

Re: [PATCH v4 8/9] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-09-25 Thread Auger Eric
Hi Drew, On 9/24/19 1:31 PM, Andrew Jones wrote: > Extend the SVE vq map initialization and validation with KVM's > supported vector lengths when KVM is enabled. In order to determine > and select supported lengths we add two new KVM functions for getting > and setting the KVM_REG_ARM64_SVE_VLS ps

Re: [PATCH v4 9/9] target/arm/kvm: host cpu: Add support for sve properties

2019-09-26 Thread Auger Eric
Hi Drew, On 9/24/19 1:31 PM, Andrew Jones wrote: > Allow cpu 'host' to enable SVE when it's available, unless the > user chooses to disable it with the added 'sve=off' cpu property. > Also give the user the ability to select vector lengths with the > sve properties. We don't adopt 'max' cpu's othe

Re: [PATCH v4 4/9] target/arm/cpu64: max cpu: Introduce sve properties

2019-09-26 Thread Auger Eric
On 9/26/19 10:21 AM, Andrew Jones wrote: > On Wed, Sep 25, 2019 at 03:53:42PM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 9/24/19 1:31 PM, Andrew Jones wrote: >>> Introduce cpu properties to give fine control over SVE vector lengths. >>> We introduce a p

Re: [PATCH v4 8/9] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-09-26 Thread Auger Eric
On 9/26/19 10:41 AM, Andrew Jones wrote: > On Thu, Sep 26, 2019 at 08:52:55AM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 9/24/19 1:31 PM, Andrew Jones wrote: >>> Extend the SVE vq map initialization and validation with KVM's >>> supported vec

Re: [PATCH v4 8/9] target/arm/cpu64: max cpu: Support sve properties with KVM

2019-09-26 Thread Auger Eric
Hi Drew, On 9/26/19 1:40 PM, Andrew Jones wrote: > On Thu, Sep 26, 2019 at 12:01:36PM +0200, Auger Eric wrote: >> >> >> On 9/26/19 10:41 AM, Andrew Jones wrote: >>> On Thu, Sep 26, 2019 at 08:52:55AM +0200, Auger Eric wrote: >>>> Hi Drew, >&g

Re: [PATCH v2 02/10] tests/acceptance/virtiofs_submounts.py: evaluate string not length

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > If the vmlinuz variable is set to anything that evaluates to True, > then the respective arguments should be set. If the variable contains > an empty string, than it will evaluate to False, and the extra s/than/then > arguments will not be set.

Re: [PATCH v2 01/10] tests/acceptance/virtiofs_submounts.py: add missing accel tag

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > The tag is useful to select tests that depend/use a particular > feature. > > Signed-off-by: Cleber Rosa > Reviewed-by: Wainer dos Santos Moschetta > Reviewed-by: Willian Rampazzo > --- > tests/acceptance/virtiofs_submounts.py | 1 + > 1 fi

Re: [PATCH v2 03/10] Python: add utility function for retrieving port redirection

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > Slightly different versions for the same utility code are currently > present on different locations. This unifies them all, giving > preference to the version from virtiofs_submounts.py, because of the > last tweaks added to it. > > While at

Re: [PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > Both the virtiofs submounts and the linux ssh mips malta tests > contains useful methods related to ssh that deserve to be made > available to other tests. Let's move them to the base LinuxTest nit: strictly speaking they are moved to another c

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > For users of the LinuxTest class, let's set up the VM with the port > redirection for SSH, instead of requiring each test to set the same also sets the network device to virtio-net. This may be worth mentioning here in the commit msg. > argument

Re: [PATCH v2 06/10] Acceptance Tests: make username/password configurable

2021-03-24 Thread Auger Eric
sa Reviewed-by: Eric Auger Eric > --- > tests/acceptance/avocado_qemu/__init__.py | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tests/acceptance/avocado_qemu/__init__.py > b/tests/acceptance/avocado_qemu/__init__.py > index e75b002

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

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, 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 > --- > tests/acceptance/av

Re: [PATCH v2 08/10] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

2021-03-24 Thread Auger Eric
Hi, On 3/23/21 11:15 PM, Cleber Rosa wrote: > The LinuxTest class' launch_and_wait() method now behaves the same way > as this test's custom launch_vm(), so let's just use the upper layer > (common) method. > > Signed-off-by: Cleber Rosa Reviewed-by: Eric Auger

Re: [PATCH v2 09/10] Acceptance Tests: add basic documentation on LinuxTest base class

2021-03-24 Thread Auger Eric
Hi, On 3/23/21 11:15 PM, Cleber Rosa wrote: > Signed-off-by: Cleber Rosa > Reviewed-by: Marc-André Lureau > Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Eric > --- > docs/devel/testing.rst | 25 + > 1 file changed, 25 insertions(+) >

Re: [PATCH v2 10/10] Acceptance Tests: introduce CPU hotplug test

2021-03-24 Thread Auger Eric
ollow a similar > pattern and need to interact with QEMU (via qmp) and with the Linux > guest via SSH. > > Signed-off-by: Cleber Rosa > Reviewed-by: Marc-André Lureau > Reviewed-by: Willian Rampazzo Reviewed-by: Eric Auger Eric > --- >

Re: [PATCH v2 05/10] Acceptance Tests: add port redirection for ssh by default

2021-03-24 Thread Auger Eric
Hi Cleber, On 3/23/21 11:15 PM, Cleber Rosa wrote: > For users of the LinuxTest class, let's set up the VM with the port > redirection for SSH, instead of requiring each test to set the same > arguments. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/avocado_qemu/__init__.py | 4 +++- >

Re: [PATCH v2 04/10] Acceptance Tests: move useful ssh methods to base class

2021-03-25 Thread Auger Eric
Hi Cleber, On 3/24/21 11:23 PM, Cleber Rosa wrote: > On Wed, Mar 24, 2021 at 10:07:31AM +0100, Auger Eric wrote: >> Hi Cleber, >> >> On 3/23/21 11:15 PM, Cleber Rosa wrote: >>> Both the virtiofs submounts and the linux ssh mips malta tests >>> contains use

Re: [PATCH 1/1] avocado_qemu: Add SMMUv3 tests

2021-03-25 Thread Auger Eric
Hi Cleber, On 3/25/21 3:36 PM, Cleber Rosa wrote: > On Thu, Mar 25, 2021 at 10:57:12AM +0100, Eric Auger wrote: >> Add new tests checking the good behavior of the SMMUv3 protecting >> 2 virtio pci devices (block and net). We check the guest boots and >> we are able to install a package. Different

Re: [PATCH] hw/arm/smmuv3: Drop unused CDM_VALID() and is_cd_valid()

2021-03-25 Thread Auger Eric
Hi Zenghui, On 3/25/21 3:27 PM, Zenghui Yu wrote: > They were introduced in commit 9bde7f0674fe ("hw/arm/smmuv3: Implement > translate callback") but never actually used. Drop them. > > Signed-off-by: Zenghui Yu > --- > hw/arm/smmuv3-internal.h | 7 --- > 1 file changed, 7 deletions(-) > >

Re: [PATCH v3 6/7] hw/arm/smmuv3: Fix SMMU_CMD_CFGI_STE_RANGE handling

2021-03-25 Thread Auger Eric
Hi Zenghui, On 3/25/21 3:18 PM, Zenghui Yu wrote: > On 2021/3/9 18:27, Eric Auger wrote: >> If the whole SID range (32b) is invalidated (SMMU_CMD_CFGI_ALL), >> @end overflows and we fail to handle the command properly. >> >> Once this gets fixed, the current code really is awkward in the >> sense

Re: [PATCH v2 00/10] Acceptance Test: introduce base class for Linux based tests

2021-03-26 Thread Auger Eric
Hi Wainer, On 3/25/21 8:45 PM, Wainer dos Santos Moschetta wrote: > Hi, > > On 3/23/21 7:15 PM, Cleber Rosa wrote: >> This introduces a base class for tests that need to interact with a >> Linux guest.  It generalizes the "boot_linux.py" code, already been >> used by the "virtiofs_submounts.py" a

Re: [PATCH for-6.0 1/4] include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev()

2021-03-26 Thread Auger Eric
Hi Peter, On 3/25/21 4:33 PM, Peter Maydell wrote: > The function machine_class_allow_dynamic_sysbus_dev() is currently > undocumented; add a doc comment. > > Signed-off-by: Peter Maydell > --- > include/hw/boards.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/inclu

Re: [PATCH for-6.0 2/4] machine: Provide a function to check the dynamic sysbus whitelist

2021-03-26 Thread Auger Eric
Hi Peter, On 3/25/21 4:33 PM, Peter Maydell wrote: > Provide a new function dynamic_sysbus_dev_allowed() which checks > the per-machine whitelist of dynamic sysbus devices and returns > a boolean result indicating whether the device is whitelisted. > We can use this in the implementation of valida

Re: [PATCH for-6.0 3/4] hw/arm/virt: Only try to add valid dynamic sysbus devices to platform bus

2021-03-26 Thread Auger Eric
Hi Peter, On 3/25/21 4:33 PM, Peter Maydell wrote: > The virt machine device plug callback currently calls > platform_bus_link_device() for any sysbus device. This is overly > broad, because platform_bus_link_device() will unconditionally grab > the IRQs and MMIOs of the device it is passed, whet

Re: [PATCH for-6.0 4/4] hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to platform bus

2021-03-26 Thread Auger Eric
is not supported by this machine yet. > > Signed-off-by: Peter Maydell Reviewed-by: Eric Auger Eric > --- > hw/ppc/e500plat.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c > index bddd5e7c48f..fc911b

Re: [PATCH for-6.0 1/4] include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev()

2021-03-26 Thread Auger Eric
Hi Peter, On 3/26/21 11:20 AM, Peter Maydell wrote: > On Fri, 26 Mar 2021 at 09:27, Auger Eric wrote: >> >> Hi Peter, >> >> On 3/25/21 4:33 PM, Peter Maydell wrote: >>> The function machine_class_allow_dynamic_sysbus_dev() is currently >>> undocumen

Re: [PATCH] hw/arm/smmuv3: Emulate CFGI_STE_RANGE for an aligned range of StreamIDs

2021-04-06 Thread Auger Eric
Hi Zenghui, On 4/2/21 12:04 PM, Zenghui Yu wrote: > In emulation of the CFGI_STE_RANGE command, we now take StreamID as the > start of the invalidation range, regardless of whatever the Range is, > whilst the spec clearly states that > > - "Invalidation is performed for an *aligned* range of 2^(

Re: [PATCH] hw/arm/virt-acpi-build: Fix GSIV values of the {GERR, Sync} interrupts

2021-04-06 Thread Auger Eric
Hi Zenghui, On 4/2/21 10:47 AM, Zenghui Yu wrote: > The GSIV values in SMMUv3 IORT node are not correct as they don't match > the SMMUIrq enumeration, which describes the IRQ<->PIN mapping used by > our emulated vSMMU. > > Fixes: a703b4f6c1ee ("hw/arm/virt-acpi-build: Add smmuv3 node in IORT tabl

Re: [PATCH] hw/arm/virt-acpi-build: Fix GSIV values of the {GERR, Sync} interrupts

2021-04-06 Thread Auger Eric
Hi Peter, On 4/6/21 12:44 PM, Peter Maydell wrote: > On Tue, 6 Apr 2021 at 11:10, Auger Eric wrote: >> >> Hi Zenghui, >> >> On 4/2/21 10:47 AM, Zenghui Yu wrote: >>> The GSIV values in SMMUv3 IORT node are not correct as they don't match >>> the

Re: [PATCH] hw/arm/virt-acpi-build: Fix GSIV values of the {GERR, Sync} interrupts

2021-04-06 Thread Auger Eric
Hi Peter, On 4/6/21 2:31 PM, Peter Maydell wrote: > On Tue, 6 Apr 2021 at 13:23, Auger Eric wrote: >> >> Hi Peter, >> >> On 4/6/21 12:44 PM, Peter Maydell wrote: >>> On Tue, 6 Apr 2021 at 11:10, Auger Eric wrote: >>>> >>>> Hi Zenghu

Re: A question about the translation granule size supported by the vSMMU

2021-04-06 Thread Auger Eric
Hi Kunkun, On 3/27/21 3:24 AM, Kunkun Jiang wrote: > Hi all, > > Recently, I did some tests on SMMU nested mode. Here is > a question about the translation granule size supported by > vSMMU. > > There is such a code in SMMUv3_init_regs(): > >>    /* 4K and 64K granule support */ >>     s->idr[5

Re: [PATCH] hw/arm/smmuv3: Support 16K translation granule

2021-04-07 Thread Auger Eric
Hi Kunkun, On 3/31/21 8:47 AM, Kunkun Jiang wrote: > The driver can query some bits in SMMUv3 IDR5 to learn which > translation granules are supported. Arm recommends that SMMUv3 > implementations support at least 4K and 64K granules. But in > the vSMMUv3, there seems to be no reason not to suppor

Re: A question about the translation granule size supported by the vSMMU

2021-04-08 Thread Auger Eric
Hi Kunkun, On 4/7/21 11:26 AM, Kunkun Jiang wrote: > Hi Eric, > > On 2021/4/7 3:50, Auger Eric wrote: >> Hi Kunkun, >> >> On 3/27/21 3:24 AM, Kunkun Jiang wrote: >>> Hi all, >>> >>> Recently, I did some tests on SMMU nested mode. Her

Re: [RFC PATCH 1/3] vfio: Introduce helpers to mark dirty pages of a RAM section

2021-04-08 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > Extract part of the code from vfio_sync_dirty_bitmap to form a > new helper, which allows to mark dirty pages of a RAM section. > This helper will be called for nested stage. > > Signed-off-by: Kunkun Jiang > --- > hw/vfio/common.c | 22

Re: [RFC PATCH 2/3] vfio: Add vfio_prereg_listener_log_sync in nested stage

2021-04-08 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > On Intel, the DMA mapped through the host single stage. Instead > we set up the stage 2 and stage 1 separately in nested mode as there > is no "Caching Mode". You need to rewrite the above sentences, Missing ARM and also the 1st sentences miss

Re: [RFC PATCH 3/3] hw/arm/smmuv3: Post-load stage 1 configurations to the host

2021-04-12 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > In nested mode, we call the set_pasid_table() callback on each STE > update to pass the guest stage 1 configuration to the host and > apply it at physical level. > > In the case of live migration, we need to manual call the s/manual/manually >

Re: [RFC PATCH 0/3] Add migration support for VFIO PCI devices in SMMUv3 nested stage mode

2021-04-12 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > Hi all, > > Since the SMMUv3's nested translation stages[1] has been introduced by Eric, > we > need to pay attention to the migration of VFIO PCI devices in SMMUv3 nested > stage > mode. At present, it is not yet supported in QEMU. There ar

Re: [PATCH RFC RESEND v2 1/6] hw/pci/pci_host: Add iommu property for pci host

2021-04-12 Thread Auger Eric
Hi Wang, On 3/25/21 8:22 AM, Wang Xingang wrote: > From: Xingang Wang > > The pci host iommu property is useful to check whether > the iommu is enabled on the pci root bus. > > Signed-off-by: Xingang Wang > Signed-off-by: Jiahui Cen > --- > hw/pci/pci.c | 18 +- >

Re: [PATCH RFC RESEND v2 2/6] hw/pci: Add iommu option for pci root bus

2021-04-12 Thread Auger Eric
Hi Wang, On 3/25/21 8:22 AM, Wang Xingang wrote: > From: Xingang Wang > > This add iommu option for pci root bus, including primary bus > and pxb root bus. The option is valid only if there is a virtual > iommu device. > > Signed-off-by: Xingang Wang > Signed-off-by: Jiahui Cen same in this

Re: [PATCH RFC RESEND v2 3/6] hw/pci: Add pci_root_bus_max_bus

2021-04-13 Thread Auger Eric
Hi Xingang, On 3/25/21 8:22 AM, Wang Xingang wrote: > From: Xingang Wang > > This helps to find max bus number of a root bus. s/max bus number of a root bus/highest bus number of a bridge hierarchy? > > Signed-off-by: Xingang Wang > Signed-off-by: Jiahui Cen > --- > hw/pci/pci.c | 34

Re: [PATCH RFC RESEND v2 4/6] hw/arm/virt-acpi-build: Add explicit idmap info in IORT table

2021-04-13 Thread Auger Eric
Hi Xingang, On 3/25/21 8:22 AM, Wang Xingang wrote: > From: Xingang Wang > > The idmap of smmuv3 and root complex covers the whole RID space for now, > this patch add explicit idmap info according to root bus number range. > This add smmuv3 idmap for certain bus which has enabled the iommu prope

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

2021-04-13 Thread Auger Eric
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, legacy vfio_iommu_map_notify cannot be used as >> there is no "caching" mode and we do not trap on map. >> >> On Intel, vfio_iommu_map_notify was used to DMA map the RAM >> t

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

2021-04-14 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 RESEND PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

2021-03-14 Thread Auger Eric
Hi Xingang, On 3/11/21 12:57 PM, Wang Xingang wrote: > Hi Eric, > > On 2021/3/10 18:18, Auger Eric wrote: >> Hi Xingang, >> >> On 3/10/21 3:13 AM, Wang Xingang wrote: >>> Hi Eric, >>> >>> On 2021/3/9 22:36, Auger Eric wrote: >>&g

Re: [RFC RESEND PATCH 2/4] hw/pci: Add iommu option for pci root bus

2021-03-14 Thread Auger Eric
Hi Xingang On 3/11/21 1:24 PM, Wang Xingang wrote: > Hi Eric, > > On 2021/3/10 18:24, Auger Eric wrote: >> Hi Xingang, >> >> On 2/27/21 9:33 AM, Wang Xingang wrote: >>> From: Xingang Wang >>> >>> This add iommu option for pci root bus, incl

Re: [PATCH v2 4/7] hw/arm/smmu-common: Fix smmu_iotlb_inv_iova when asid is not set

2021-03-09 Thread Auger Eric
Hi Peter, On 3/8/21 5:37 PM, Peter Maydell wrote: > On Thu, 25 Feb 2021 at 09:15, Eric Auger wrote: >> >> If the asid is not set, do not attempt to locate the key directly >> as all inserted keys have a valid asid. >> >> Use g_hash_table_foreach_remove instead. >> >> Signed-off-by: Eric Auger >>

Re: [RFC RESEND PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

2021-03-09 Thread Auger Eric
Hi, On 2/27/21 9:33 AM, Wang Xingang wrote: > From: Xingang Wang > > These patches add support for configure iommu on/off for pci root bus, > including primary bus and pxb root bus. At present, All root bus will go > through iommu when iommu is configured, which is not flexible. > > So this add

Re: [RFC RESEND PATCH 2/4] hw/pci: Add iommu option for pci root bus

2021-03-10 Thread Auger Eric
Hi Xingang, On 2/27/21 9:33 AM, Wang Xingang wrote: > From: Xingang Wang > > This add iommu option for pci root bus, including primary bus > and pxb root bus. Default option is set to true, and the option > is valid only if the iommu option for machine is properly set. > > Signed-off-by: Xingan

Re: [RFC RESEND PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

2021-03-10 Thread Auger Eric
Hi Xingang, On 3/10/21 3:13 AM, Wang Xingang wrote: > Hi Eric, > > On 2021/3/9 22:36, Auger Eric wrote: >> Hi, >> On 2/27/21 9:33 AM, Wang Xingang wrote: >>> From: Xingang Wang >>> >>> These patches add support for configure iommu on/off for pci

Re: [RFC RESEND PATCH 1/4] pci: Add PCI_BUS_IOMMU property

2021-03-10 Thread Auger Eric
Hi Xingang, On 2/27/21 9:33 AM, Wang Xingang wrote: > From: Xingang Wang > > This Property can be useful to check whether this bus is attached to iommu. Strictly speaking this is not a Property (QEMU property) but a flag > > Signed-off-by: Xingang Wang > Signed-off-by: Jiahui Cen > --- > in

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