[Qemu-devel] [PATCH] pci-devfn: check that device/slot number is within range

2011-09-21 Thread Donald Dutile
Need to check that guest slot/device number is not > 31 or walk off the devfn table when checking if a devfn is available or not in a guest. before this fix, passing in an addr=abc or addr=34, can crash qemu, sometimes fail gracefully if data past end of devfn table fails the availability test.

Re: [PATCH v3] hw/arm/virt: Avoid unexpected warning from Linux guest on host with Fujitsu CPUs

2024-06-11 Thread Donald Dutile
ot;); if (vms->dtb_randomness) { +1 to Peter's suggested comment, otherwise, unless privy to this thread, one would wonder how/why. Reviewed-by: Donald Dutile

Re: nested-smmuv3 topic for QEMU/libvirt, Nov 2024

2024-11-07 Thread Donald Dutile
On 11/7/24 3:31 PM, Nicolin Chen wrote: Hi Eric, On Thu, Nov 07, 2024 at 12:11:05PM +0100, Eric Auger wrote: On 11/1/24 05:09, Nicolin Chen wrote: Hi, This is a continued discussion following previous month's: https://lore.kernel.org/qemu-devel/Zvr%2Fbf7KgLN1cjOl@Asurada-Nvidia/ Kernel ch

Re: [RFC PATCH 2/5] hw/arm/smmuv3: Add initial support for SMMUv3 Nested device

2024-11-27 Thread Donald Dutile
On 11/27/24 11:00 AM, Jason Gunthorpe wrote: On Wed, Nov 27, 2024 at 10:21:24AM +, Shameerali Kolothum Thodi wrote: For SMMUv3, NVIDIA-specific vCMDQ, it needs a parameter to state that specifically, since I'm concluding from reading the SMMUv3 version G.a spec, that ECMDQ was added to be

Re: [RFC PATCH 2/5] hw/arm/smmuv3: Add initial support for SMMUv3 Nested device

2024-11-27 Thread Donald Dutile
On 11/27/24 5:21 AM, Shameerali Kolothum Thodi wrote: -Original Message- From: Donald Dutile Sent: Tuesday, November 26, 2024 6:29 PM To: Nicolin Chen ; Eric Auger Cc: Shameerali Kolothum Thodi ; qemu-...@nongnu.org; qemu-devel@nongnu.org; peter.mayd...@linaro.org; j

Re: [RFC PATCH 2/5] hw/arm/smmuv3: Add initial support for SMMUv3 Nested device

2024-11-26 Thread Donald Dutile
On 11/13/24 1:05 PM, Nicolin Chen wrote: Hi Eric, On Wed, Nov 13, 2024 at 06:12:15PM +0100, Eric Auger wrote: On 11/8/24 13:52, Shameer Kolothum wrote: @@ -181,6 +181,7 @@ static const MemMapEntry base_memmap[] = { [VIRT_PVTIME] = { 0x090a, 0x0001 }, [VIRT_SE

Re: [RFC PATCH 2/5] hw/arm/smmuv3: Add initial support for SMMUv3 Nested device

2024-12-02 Thread Donald Dutile
On 11/28/24 7:54 AM, Jason Gunthorpe wrote: On Wed, Nov 27, 2024 at 08:44:47PM -0800, Nicolin Chen wrote: On Wed, Nov 27, 2024 at 11:29:06PM -0500, Donald Dutile wrote: On 11/27/24 5:21 AM, Shameerali Kolothum Thodi wrote: W.r.t naming, maybe something related to "hardware-accele

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-17 Thread Donald Dutile
On 12/13/24 8:19 AM, Daniel P. Berrangé wrote: On Fri, Dec 13, 2024 at 08:46:42AM -0400, Jason Gunthorpe wrote: On Fri, Dec 13, 2024 at 12:00:43PM +, Daniel P. Berrangé wrote: On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via wrote: Hi, This series adds initial support for

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2025-01-10 Thread Donald Dutile
Nicolin, Hi! On 1/8/25 11:45 PM, Nicolin Chen wrote: On Mon, Dec 16, 2024 at 10:01:29AM +, Shameerali Kolothum Thodi wrote: And patches prior to this commit adds that support: 4ccdbe3: ("cover-letter: Add HW accelerated nesting support for arm SMMUv3") Nicolin is soon going to send out th

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-04 Thread Donald Dutile
Hi Suravee! Not your issue, but wondering if others know: Why isn't this an issue for Intel-vtd-iommu & ARM-SMMUV3 ? Are they instantiated as non-PCI-id (platform) devices, but AMD puts their IOMMU in PCI space? Adv. thanks for the info. - Don On 3/4/25 1:37 PM, Suravee Suthikulpanit wrote:

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-05 Thread Donald Dutile
On 3/4/25 9:56 PM, Suthikulpanit, Suravee wrote: On 3/5/2025 6:02 AM, Donald Dutile wrote: Hi Suravee! Not your issue, but wondering if others know: Why isn't this an issue for Intel-vtd-iommu & ARM-SMMUV3 ? Are they instantiated as non-PCI-id (platform) devices, but AMD p

Re: [RFC PATCH v2 16/20] hw/arm/smmuv3-accel: Read host SMMUv3 device info

2025-03-18 Thread Donald Dutile
Shameer, Hey, On 3/11/25 10:10 AM, Shameer Kolothum wrote: From: Nicolin Chen Read the underlying SMMUv3 device info and set corresponding IDR bits. We need at least one cold-plugged vfio-pci dev associated with the smmuv3-accel instance to do this now.  Hence fail if it is not available. T

Re: [RFC PATCH v2 18/20] hw/arm/smmu-common: Bypass emulated IOTLB for a accel SMMUv3

2025-03-18 Thread Donald Dutile
On 3/11/25 10:10 AM, Shameer Kolothum wrote: From: Nicolin Chen If a vSMMU is configured as a accelerated one, HW IOTLB will be used and all cache invalidation should be done to the HW IOTLB too, v.s. the emulated iotlb. In this case, an iommu notifier isn't registered, as the devices behind

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-18 Thread Donald Dutile
Shameer, Hi, On 3/11/25 10:10 AM, Shameer Kolothum wrote: From: Nicolin Chen Inroduce an SMMUCommandBatch and some helpers to batch and issue the Introduce commands. Currently separate out TLBI commands and device cache commands to avoid some errata on certain versions of SMMUs

Re: [RFC PATCH v2 11/20] hw/arm/smmuv3-accel: Allocate a vDEVICE object for device

2025-03-18 Thread Donald Dutile
Shameer, Hi, On 3/11/25 10:10 AM, Shameer Kolothum wrote: From: Nicolin Chen Allocate and associate a vDEVICE object for the Guest device with the vIOMMU. This will help the kernel to do the vSID --> sid translation whenever required (eg: device specific invalidations). Signed-off-by: Nicoli

Re: [RFC PATCH v2 04/20] hw/arm/virt: Add support for smmuv3-accel

2025-03-18 Thread Donald Dutile
Doesn't this commit become moot, if accel becomes an smmuv3 option vs separate device object altogether, dynamically added if a pdev is attached to a host SMMUv3 that has accel feature(s)? Blocking w/virtio-iommu falls under the same situation mentioned in 03/20 wrt mixing emulated & physica

Re: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-19 Thread Donald Dutile
On 3/19/25 5:26 AM, Shameerali Kolothum Thodi wrote: Hi Don, Hey! -Original Message- From: Donald Dutile Sent: Tuesday, March 18, 2025 10:12 PM To: Shameerali Kolothum Thodi ; qemu-...@nongnu.org; qemu-devel@nongnu.org Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-19 Thread Donald Dutile
On 3/19/25 5:48 AM, Shameerali Kolothum Thodi wrote: -Original Message- From: Donald Dutile Sent: Wednesday, March 19, 2025 1:31 AM To: Shameerali Kolothum Thodi ; qemu-...@nongnu.org; qemu-devel@nongnu.org Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-18 Thread Donald Dutile
On 3/18/25 3:13 PM, Nicolin Chen wrote: On Tue, Mar 18, 2025 at 07:31:36PM +0100, Eric Auger wrote: On 3/17/25 9:19 PM, Nicolin Chen wrote: On Mon, Mar 17, 2025 at 04:24:53PM -0300, Jason Gunthorpe wrote: On Mon, Mar 17, 2025 at 12:10:19PM -0700, Nicolin Chen wrote: Another question: how d

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-18 Thread Donald Dutile
On 3/17/25 3:24 PM, Jason Gunthorpe wrote: On Mon, Mar 17, 2025 at 12:10:19PM -0700, Nicolin Chen wrote: Another question: how does an emulated device work with a vSMMUv3? I could imagine that all the accel steps would be bypassed since !sdev->idev. Yet, the emulated iotlb should cache its tr

Re: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-18 Thread Donald Dutile
Shameer, Hi! On 3/11/25 10:10 AM, Shameer Kolothum wrote: User must associate a pxb-pcie root bus to smmuv3-accel and that is set as the primary-bus for the smmu dev. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 19 +++ 1 file changed, 19 insertions(+) diff

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-18 Thread Donald Dutile
Jason, Hey! On 3/18/25 8:23 PM, Jason Gunthorpe wrote: On Tue, Mar 18, 2025 at 05:22:51PM -0400, Donald Dutile wrote: I agree with Eric that 'accel' isn't needed -- this should be ascertained from the pSMMU that a physical device is attached to. I seem to remember the point w

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-20 Thread Donald Dutile
On 3/19/25 2:09 PM, Eric Auger wrote: Hi Nicolin, On 3/19/25 6:14 PM, Nicolin Chen wrote: On Wed, Mar 19, 2025 at 05:45:51PM +0100, Eric Auger wrote: On 3/17/25 8:10 PM, Nicolin Chen wrote: On Mon, Mar 17, 2025 at 07:07:52PM +0100, Eric Auger wrote: On 3/17/25 6:54 PM, Nicolin Chen wro

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-20 Thread Donald Dutile
On 3/19/25 1:04 PM, Eric Auger wrote: On 3/18/25 10:22 PM, Donald Dutile wrote: On 3/18/25 3:13 PM, Nicolin Chen wrote: On Tue, Mar 18, 2025 at 07:31:36PM +0100, Eric Auger wrote: On 3/17/25 9:19 PM, Nicolin Chen wrote: On Mon, Mar 17, 2025 at 04:24:53PM -0300, Jason Gunthorpe wrote

Re: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-20 Thread Donald Dutile
On 3/19/25 2:21 PM, Eric Auger wrote: Hi Don, On 3/19/25 5:21 PM, Donald Dutile wrote: On 3/19/25 5:26 AM, Shameerali Kolothum Thodi wrote: Hi Don, Hey! -Original Message- From: Donald Dutile Sent: Tuesday, March 18, 2025 10:12 PM To: Shameerali Kolothum Thodi ; qemu

Re: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-24 Thread Donald Dutile
On 3/24/25 10:56 AM, Eric Auger wrote: On 3/21/25 1:59 AM, Donald Dutile wrote: On 3/19/25 2:21 PM, Eric Auger wrote: Hi Don, On 3/19/25 5:21 PM, Donald Dutile wrote: On 3/19/25 5:26 AM, Shameerali Kolothum Thodi wrote: Hi Don, Hey! -Original Message- From: Donald