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

2025-03-08 Thread Shameerali Kolothum Thodi via
emu-devel@nongnu.org; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei@linaro.org; Peng, Chao P > > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Shammeer, > Hi Eric, > > > >

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

2025-03-07 Thread Eric Auger
utile >> Cc: eric.au...@redhat.com; Peter Maydell ; >> Jason Gunthorpe ; Daniel P. Berrangé >> ; qemu-...@nongnu.org; qemu- >> de...@nongnu.org; Linuxarm ; Wangzhou (B) >> ; jiangkunkun ; >> Jonathan Cameron ; >> zhangfei....@linaro.org; Peng, Chao P >>

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

2025-03-06 Thread Eric Auger
utile >> Cc: Peter Maydell ; Jason Gunthorpe >> ; Daniel P. Berrangé ; qemu- >> a...@nongnu.org; qemu-devel@nongnu.org; Linuxarm >> ; Wangzhou (B) ; >> jiangkunkun ; Jonathan Cameron >> ; zhangfei....@linaro.org; Peng, Chao P >> >> Subject: Re: [RFC PATCH

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

2025-03-04 Thread Shameerali Kolothum Thodi via
Linuxarm ; Wangzhou > (B) ; jiangkunkun ; > Jonathan Cameron ; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Mon, Mar 03, 2025 at 03:21:57PM +, Shameerali Kolothum Thodi > wrote: > > I am wor

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

2025-03-03 Thread Nicolin Chen
On Mon, Mar 03, 2025 at 03:21:57PM +, Shameerali Kolothum Thodi wrote: > I am working on the above now and have quick question to you😊. > > Looking at the smmu_dev_attach_viommu() fn here[0], > it appears to do the following: > > 1. Alloc a s2_hwpt if not allocated already and attach it. > 2.

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

2025-03-03 Thread Shameerali Kolothum Thodi via
vel@nongnu.org; Linuxarm ; Wangzhou > (B) ; jiangkunkun ; > Jonathan Cameron ; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > [..] > > One of the feedback I received on my series was to rename "arm-smm

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

2025-02-17 Thread Shameerali Kolothum Thodi via
-...@nongnu.org; qemu- > de...@nongnu.org; Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Peng, Chao P > Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Shameer, Nicolin, > [...

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

2025-02-17 Thread Duan, Zhenzhong
Hi Shameer, Nicolin, >-Original Message- >From: Duan, Zhenzhong >Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested >SMMUv3 > >Hi Shameer, > >>-Original Message- >>From: Shameerali Kolothum Thodi >>Subject: RE: [

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

2025-02-07 Thread Jason Gunthorpe
On Fri, Feb 07, 2025 at 12:21:54PM +, Shameerali Kolothum Thodi wrote: > Just wondering whether we can have something like the > vfio_register_iommu_driver() for iommufd subsystem by which it can directly > access iommu drivers ops(may be a restricted set). I very much want to try hard to av

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

2025-02-07 Thread Shameerali Kolothum Thodi via
g; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Feb 07, 2025 at 10:21:

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

2025-02-07 Thread Daniel P . Berrangé
nthorpe > > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > > eric.au...@redhat.com; peter.mayd...@linaro.org; ddut...@redhat.com; > > Linuxarm ; Wangzhou (B) > > ; jiangkunkun ; > > Jonathan Cameron ; > > zhangfei....@linaro.org; nath...@nvidia.com > >

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

2025-02-07 Thread Shameerali Kolothum Thodi via
.org; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 02:22:01PM -0400, Jason

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 02:46:42PM -0800, Nicolin Chen wrote: > > You'd use the command line information and wouldn't need GET_HW_INFO, > > it would be complicated > > Do you mean the "-device arm-smmuv3-accel,id=xx" line? This still > won't give us the host IDR/IIDR register values to probe a vSM

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

2025-02-06 Thread Nicolin Chen
On Thu, Feb 06, 2025 at 05:11:13PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 12:48:40PM -0800, Nicolin Chen wrote: > > On Thu, Feb 06, 2025 at 04:38:55PM -0400, Jason Gunthorpe wrote: > > > On Thu, Feb 06, 2025 at 12:33:19PM -0800, Nicolin Chen wrote: > > > > On Thu, Feb 06, 2025 at 0

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 12:48:40PM -0800, Nicolin Chen wrote: > On Thu, Feb 06, 2025 at 04:38:55PM -0400, Jason Gunthorpe wrote: > > On Thu, Feb 06, 2025 at 12:33:19PM -0800, Nicolin Chen wrote: > > > On Thu, Feb 06, 2025 at 02:22:01PM -0400, Jason Gunthorpe wrote: > > > > On Thu, Feb 06, 2025 at 0

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

2025-02-06 Thread Nicolin Chen
On Thu, Feb 06, 2025 at 04:38:55PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 12:33:19PM -0800, Nicolin Chen wrote: > > On Thu, Feb 06, 2025 at 02:22:01PM -0400, Jason Gunthorpe wrote: > > > On Thu, Feb 06, 2025 at 06:18:14PM +, Shameerali Kolothum Thodi wrote: > > > > > > > > So

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 12:33:19PM -0800, Nicolin Chen wrote: > On Thu, Feb 06, 2025 at 02:22:01PM -0400, Jason Gunthorpe wrote: > > On Thu, Feb 06, 2025 at 06:18:14PM +, Shameerali Kolothum Thodi wrote: > > > > > > So even if you invent an iommu ID we cannot accept it as a handle to > > > > c

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

2025-02-06 Thread Nicolin Chen
On Thu, Feb 06, 2025 at 02:22:01PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 06:18:14PM +, Shameerali Kolothum Thodi wrote: > > > > So even if you invent an iommu ID we cannot accept it as a handle to > > > create viommu in iommufd. > > > > Creating the vIOMMU only happens when

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

2025-02-06 Thread Nicolin Chen
On Thu, Feb 06, 2025 at 10:34:15AM +, Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Nicolin Chen > > On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: > > > However in > > > > > > Shameer suggested he may include it in his SMMU multi instance series. > > >

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 06:18:14PM +, Shameerali Kolothum Thodi wrote: > > So even if you invent an iommu ID we cannot accept it as a handle to > > create viommu in iommufd. > > Creating the vIOMMU only happens when the user does a cold/hot plug of > a VFIO device. At that time Qemu checks w

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

2025-02-06 Thread Shameerali Kolothum Thodi via
m; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 06:04:57PM +, Shame

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

2025-02-06 Thread Daniel P . Berrangé
On Thu, Feb 06, 2025 at 01:58:43PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 05:54:57PM +, Daniel P. Berrangé wrote: > > > > We shouldn't assume any VFIO device exists in the QEMU cnofig at the > > > > time > > > > we realize the virtual ssmu. I expect the SMMU may be cold plugge

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 06:04:57PM +, Shameerali Kolothum Thodi wrote: > > Some kind of hot plug smmu would have to create a vSMMU without any > > kernel backing and then later bind it to a kernel implementation. > > Not sure I get the problem with associating vSMMU with a pSMMU. Something > l

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

2025-02-06 Thread Shameerali Kolothum Thodi via
.com; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 05:54:57PM +

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 05:54:57PM +, Daniel P. Berrangé wrote: > > > We shouldn't assume any VFIO device exists in the QEMU cnofig at the time > > > we realize the virtual ssmu. I expect the SMMU may be cold plugged, while > > > the VFIO devices may be hot plugged arbitrarly later, and we shou

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 05:57:38PM +, Shameerali Kolothum Thodi wrote: > Also how do we do it with multiple VF devices under a pSUMMU ? Which > cdev fd in that case? It doesn't matter, they are all interchangeable. Creating the VIOMMU object just requires any vfio device that is attached to

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

2025-02-06 Thread Shameerali Kolothum Thodi via
.com; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 05:10:32PM +, Da

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

2025-02-06 Thread Daniel P . Berrangé
On Thu, Feb 06, 2025 at 01:46:47PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 05:10:32PM +, Daniel P. Berrangé wrote: > > On Thu, Feb 06, 2025 at 01:02:38PM -0400, Jason Gunthorpe wrote: > > > On Thu, Feb 06, 2025 at 03:07:06PM +, Shameerali Kolothum Thodi wrote: > > > > > If w

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 05:10:32PM +, Daniel P. Berrangé wrote: > On Thu, Feb 06, 2025 at 01:02:38PM -0400, Jason Gunthorpe wrote: > > On Thu, Feb 06, 2025 at 03:07:06PM +, Shameerali Kolothum Thodi wrote: > > > > If we set the physical/guest SMMU relationship directly, then at the > > > >

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

2025-02-06 Thread Daniel P . Berrangé
On Thu, Feb 06, 2025 at 01:02:38PM -0400, Jason Gunthorpe wrote: > On Thu, Feb 06, 2025 at 03:07:06PM +, Shameerali Kolothum Thodi wrote: > > > If we set the physical/guest SMMU relationship directly, then at the > > > time the VFIO device is plugged, we can diagnose the incorrectly > > > place

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

2025-02-06 Thread Jason Gunthorpe
On Thu, Feb 06, 2025 at 03:07:06PM +, Shameerali Kolothum Thodi wrote: > > If we set the physical/guest SMMU relationship directly, then at the > > time the VFIO device is plugged, we can diagnose the incorrectly > > placed VFIO device, and better reason about behaviour. > > Agree. Can you ju

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

2025-02-06 Thread Eric Auger
hat.com; >>>> Linuxarm ; Wangzhou (B) >>>> ; jiangkunkun ; >>>> Jonathan Cameron ; >>>> zhangfei@linaro.org; Nathan Chen >>>> Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable >>>> nested SMMUv3 >

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

2025-02-06 Thread Shameerali Kolothum Thodi via
m; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei@linaro.org; > nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 01:51:15PM +, Shamee

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

2025-02-06 Thread Daniel P . Berrangé
On Thu, Feb 06, 2025 at 01:51:15PM +, Shameerali Kolothum Thodi wrote: > Hmm..I don’t think just swapping the order will change the association with > Guest SMMU here. Because, we have, > > > -device arm-smmuv3-accel,id=smmuv2,bus=pcie.2 > > During smmuv3-accel realize time, this will result

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

2025-02-06 Thread Shameerali Kolothum Thodi via
m; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei@linaro.org; > nath...@nvidia.com > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Feb 06, 2025 at 10:02:25AM +, Sha

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

2025-02-06 Thread Daniel P . Berrangé
; qemu-devel@nongnu.org; > > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > > nicol...@nvidia.com; ddut...@redhat.com; Linuxarm > > ; Wangzhou (B) ; > > jiangkunkun ; Jonathan Cameron > > ; zhangfei@linaro.org > > Subject: Re: [RFC PATCH 0/5] h

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

2025-02-06 Thread Shameerali Kolothum Thodi via
-devel@nongnu.org; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: > > &g

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

2025-02-06 Thread Shameerali Kolothum Thodi via
l...@nvidia.com; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Thu, Jan 30, 2025 at 06:09:24PM +, Shameerali Kolothum Thod

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

2025-02-06 Thread Daniel P . Berrangé
On Wed, Feb 05, 2025 at 12:53:42PM -0800, Nathan Chen wrote: > > > On 1/31/2025 8:08 AM, Eric Auger wrote: > > > > > > > And Qemu does some checking to make sure that the device is indeed > > > > > > associated > > > > > > > with the specified phys-smmuv3. This can be done going through > > > >

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

2025-02-06 Thread Daniel P . Berrangé
>> Jonathan Cameron ; > >> zhangfei....@linaro.org; Nathan Chen > >> Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > >> nested SMMUv3 > >> > >> On Fri, Jan 31, 2025 at 02:39:53PM +, Shameerali Kolothum Thodi > &

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

2025-02-05 Thread Nathan Chen
On 1/31/2025 8:08 AM, Eric Auger wrote: And Qemu does some checking to make sure that the device is indeed associated with the specified phys-smmuv3. This can be done going through the sysfs path checking which is what I guess libvirt is currently doing to populate the topology. So basi

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

2025-02-05 Thread Eric Auger
Hi Nicolin, On 2/5/25 1:08 AM, Nicolin Chen wrote: > On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: >>> In summary, we will have the following series: >>> 1) HWPT uAPI patches in backends/iommufd.c (Zhenzhong or Shameer) >>> >>> https://lore.kernel.org/qemu-devel/sj0pr11mb6744943

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

2025-02-05 Thread Shameerali Kolothum Thodi via
-devel@nongnu.org; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: > > > In summa

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

2025-02-04 Thread Nicolin Chen
On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: > > In summary, we will have the following series: > > 1) HWPT uAPI patches in backends/iommufd.c (Zhenzhong or Shameer) > > > > https://lore.kernel.org/qemu-devel/sj0pr11mb6744943702eb5798ec9b3b9992...@sj0pr11mb6744.namprd11.prod.outl

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

2025-02-04 Thread Eric Auger
Hi Nicolin, Shameer, On 2/3/25 7:50 PM, Nicolin Chen wrote: > On Fri, Jan 31, 2025 at 05:54:56PM +0100, Eric Auger wrote: >> On 1/9/25 5:45 AM, 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

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

2025-02-04 Thread Eric Auger
Hi Nathan, On 11/22/24 7:53 PM, Nathan Chen wrote: > >  >> Also as a heads up, I've added support for auto-inserting PCIe > switch > >  >> between the PXB and GPUs in libvirt to attach multiple devices to a > > SMMU > >  >> node per libvirt's documentation - "If you intend to plug multiple > >  >

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

2025-02-03 Thread Nicolin Chen
On Fri, Jan 31, 2025 at 05:54:56PM +0100, Eric Auger wrote: > On 1/9/25 5:45 AM, 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 supp

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

2025-01-31 Thread Daniel P . Berrangé
On Thu, Jan 30, 2025 at 06:09:24PM +, Shameerali Kolothum Thodi wrote: > > Each "arm-smmuv3-nested" instance, when the first device gets attached > to it, will create a S2 HWPT and a corresponding SMMUv3 domain in kernel > SMMUv3 driver. This domain will have a pointer representing the physica

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

2025-01-31 Thread Eric Auger
Hi Nicolin, On 1/9/25 5:45 AM, 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

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

2025-01-31 Thread Eric Auger
devel@nongnu.org; eric.au...@redhat.com; >> peter.mayd...@linaro.org; nicol...@nvidia.com; ddut...@redhat.com; >> Linuxarm ; Wangzhou (B) >> ; jiangkunkun ; >> Jonathan Cameron ; >> zhangfei@linaro.org; Nathan Chen >> Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add supp

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

2025-01-31 Thread Shameerali Kolothum Thodi via
m; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Nathan Chen > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Jan 31, 2025 at 02:39:53PM +, Shameerali Kol

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

2025-01-31 Thread Jason Gunthorpe
On Fri, Jan 31, 2025 at 02:39:53PM +, Shameerali Kolothum Thodi wrote: > > > And Qemu does some checking to make sure that the device is indeed > > associated > > > with the specified phys-smmuv3. This can be done going through the > > sysfs path checking > > > which is what I guess libvirt i

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

2025-01-31 Thread Shameerali Kolothum Thodi via
m; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Nathan Chen > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Jan 31, 2025 at 09:33:16AM +, Shameerali

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

2025-01-31 Thread Jason Gunthorpe
On Fri, Jan 31, 2025 at 09:33:16AM +, Shameerali Kolothum Thodi wrote: > And Qemu does some checking to make sure that the device is indeed associated > with the specified phys-smmuv3. This can be done going through the sysfs > path checking > which is what I guess libvirt is currently doing

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

2025-01-31 Thread Eric Auger
u.org; >> eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; >> nicol...@nvidia.com; ddut...@redhat.com; Linuxarm >> ; Wangzhou (B) ; >> jiangkunkun ; Jonathan Cameron >> ; zhangfei....@linaro.org >> Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add su

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

2025-01-31 Thread Shameerali Kolothum Thodi via
@nvidia.com; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei....@linaro.org > Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Daniel, > > > -Original Message- > >

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

2025-01-30 Thread Shameerali Kolothum Thodi via
l...@nvidia.com; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via w

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

2025-01-30 Thread Daniel P . Berrangé
On Mon, Nov 18, 2024 at 11:50:46AM +0100, Eric Auger wrote: > Hi Shameer, > > On 11/8/24 13:52, Shameer Kolothum wrote: > > Hi, > > > > This series adds initial support for a user-creatable "arm-smmuv3-nested" > > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per machine > > and cann

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

2025-01-30 Thread Daniel P . Berrangé
On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via wrote: > How to use it(Eg:): > > On a HiSilicon platform that has multiple physical SMMUv3s, the ACC ZIP VF > devices and HNS VF devices are behind different SMMUv3s. So for a Guest, > specify two smmuv3-nested devices each behind a px

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

2025-01-27 Thread Nathan Chen
>with an error message indicating DMA mapping failed for the passthrough >devices. A correction - the message indicates UEFI failed to find a mapping for the boot partition ("map: no mapping found"), not that DMA mapping failed. But earlier EDK debug logs still show PCI host bridge resource conf

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

2025-01-27 Thread Shameerali Kolothum Thodi via
.@nvidia.com; peter.mayd...@linaro.org; > qemu-...@nongnu.org; Wangzhou (B) ; > zhangfei@linaro.org; qemu-devel@nongnu.org > Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > >> >with an error message indicating DMA mapping fa

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

2025-01-24 Thread Nathan Chen
>with an error message indicating DMA mapping failed for the passthrough >devices. A correction - the message indicates UEFI failed to find a mapping for the boot partition ("map: no mapping found"), not that DMA mapping failed. But earlier EDK debug logs still show PCI host bridge resource conf

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

2025-01-23 Thread Duan, Zhenzhong
Hi Shameer, >-Original Message- >From: Shameerali Kolothum Thodi >Subject: RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested >SMMUv3 > > > >> -Original Message- >> From: Nicolin Chen >> Sent: Thursday, January 23, 2

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

2025-01-23 Thread Nicolin Chen
On Thu, Jan 23, 2025 at 08:28:34AM +, Shameerali Kolothum Thodi wrote: > > -Original Message- > > From: Nicolin Chen > > I wonder if we can make some progress in Feb? If so, we can start > > to wrap up the iommufd uAPI patches for HWPT, which was a part of > > intel's series but never

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

2025-01-23 Thread Shameerali Kolothum Thodi via
-devel@nongnu.org; Linuxarm ; Wangzhou > (B) ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Don, > > On Fri, Jan 10, 2025 at 11:05:24PM -0500, Donald Dutile wrote

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

2025-01-22 Thread Nicolin Chen
Hi Don, On Fri, Jan 10, 2025 at 11:05:24PM -0500, Donald Dutile wrote: > 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 accelerate

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: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2025-01-08 Thread Nicolin Chen
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 those for review. Or I can include > those in thi

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

2024-12-16 Thread Shameerali Kolothum Thodi via
...@redhat.com; Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, 13 Dec 2024 at 12:46, Jason Gunthorpe wrote: > > > > On

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

2024-12-16 Thread Shameerali Kolothum Thodi via
.com; ddut...@redhat.com; > Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Dec 13, 2024 at 08:46:42AM -0400, Jason Gunthorpe wro

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

2024-12-16 Thread Shameerali Kolothum Thodi via
; Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Nicolin Chen > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > > >with an error message indicating DMA mapping failed for the > pa

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

2024-12-13 Thread Peter Maydell
On Fri, 13 Dec 2024 at 12:46, 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 a user-creatable "arm-smmuv3-nested" > >

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

2024-12-13 Thread Daniel P . Berrangé
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 a user-creatable "arm-smmuv3-n

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

2024-12-13 Thread Jason Gunthorpe
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 a user-creatable "arm-smmuv3-nested" > > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per

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

2024-12-13 Thread Jason Gunthorpe
On Fri, Dec 13, 2024 at 11:58:02AM +, Daniel P. Berrangé wrote: > Libvirt does not rquire use of pcie-switch. It supports them, but in the > absence of app requested configs, libvirt will always just populate > pcie-root-port devices. switches are something that has to be explicitly > asked fo

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

2024-12-13 Thread Daniel P . Berrangé
On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via wrote: > Hi, > > This series adds initial support for a user-creatable "arm-smmuv3-nested" > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per machine > and cannot support multiple SMMUv3s. > > In order to support vfio-p

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

2024-12-13 Thread Daniel P . Berrangé
ongnu.org; > > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > > ddut...@redhat.com; Linuxarm ; Wangzhou (B) > > ; jiangkunkun ; > > Jonathan Cameron ; > > zhangfei....@linaro.org; Nicolin Chen > > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add s

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

2024-12-12 Thread Nathan Chen
>with an error message indicating DMA mapping failed for the passthrough >devices. A correction - the message indicates UEFI failed to find a mapping for the boot partition ("map: no mapping found"), not that DMA mapping failed. But earlier EDK debug logs still show PCI host bridge resource

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

2024-12-12 Thread Nathan Chen
Hi Shameer, Could you share the branch/version of the boot firmware file "QEMU_EFI.fd" from your example, and where you retrieved it from? I've been encountering PCI host bridge resource conflicts whenever assigning more than one passthrough device to a multi-vSMMU VM, booting with the boot f

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

2024-11-22 Thread Nathan Chen
> >> Also as a heads up, I've added support for auto-inserting PCIe switch > >> between the PXB and GPUs in libvirt to attach multiple devices to a > SMMU > >> node per libvirt's documentation - "If you intend to plug multiple > >> devices into a pcie-expander-bus, you must connect a > >> pci

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

2024-11-22 Thread Shameerali Kolothum Thodi via
inuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Nicolin Chen > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > >> Also as a heads up, I've added support for auto-inserting PCIe switc

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

2024-11-21 Thread Nathan Chen
>> Also as a heads up, I've added support for auto-inserting PCIe switch >> between the PXB and GPUs in libvirt to attach multiple devices to a SMMU >> node per libvirt's documentation - "If you intend to plug multiple >> devices into a pcie-expander-bus, you must connect a >> pcie-switch-upstream

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

2024-11-21 Thread Nathan Chen
Hi Shameer, > Attempt to add the HNS VF to a different SMMUv3 will result in, > > -device vfio-pci,host=:7d:02.2,bus=pcie.port3,iommufd=iommufd0: Unable to attach viommu > -device vfio-pci,host=:7d:02.2,bus=pcie.port3,iommufd=iommufd0: vfio :7d:02.2: >Failed to set iommu_device

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

2024-11-21 Thread Shameerali Kolothum Thodi via
@redhat.com; Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei@linaro.org; Nicolin Chen > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Shameer, > > > Attempt to add the HNS VF to a different SMM

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

2024-11-18 Thread Eric Auger
Hi Shameer, On 11/8/24 13:52, Shameer Kolothum wrote: > Hi, > > This series adds initial support for a user-creatable "arm-smmuv3-nested" > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per machine > and cannot support multiple SMMUv3s. > > In order to support vfio-pci dev assignment

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

2024-11-14 Thread Mostafa Saleh
..@nongnu.org; qemu-devel@nongnu.org; > > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > > nicol...@nvidia.com; ddut...@redhat.com; Linuxarm > > ; Wangzhou (B) ; > > jiangkunkun ; Jonathan Cameron > > ; zhangfei@linaro.org > > Subject: Re

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

2024-11-14 Thread Shameerali Kolothum Thodi via
inuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum wrote: > > This RFC is for in

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

2024-11-14 Thread Shameerali Kolothum Thodi via
l...@nvidia.com; ddut...@redhat.com; Linuxarm > ; Wangzhou (B) ; > jiangkunkun ; Jonathan Cameron > ; zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > Hi Shameer, > > On Fri, Nov 08, 2024 at 12:52:37PM +,

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

2024-11-13 Thread Shameerali Kolothum Thodi via
> ddut...@redhat.com; Linuxarm ; Wangzhou (B) > ; jiangkunkun ; > Jonathan Cameron ; > zhangfei....@linaro.org > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable > nested SMMUv3 > > On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum wrote: > &g

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

2024-11-13 Thread Nicolin Chen
On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum wrote: > This RFC is for initial discussion/test purposes only and includes patches > that are only relevant for adding the "arm-smmuv3-nested" support. For the > complete branch please find, > https://github.com/hisilicon/qemu/commits/priv

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

2024-11-13 Thread Mostafa Saleh
Hi Shameer, On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum via wrote: > Hi, > > This series adds initial support for a user-creatable "arm-smmuv3-nested" > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per machine > and cannot support multiple SMMUv3s. > I had a quick

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

2024-11-12 Thread Nicolin Chen
On Fri, Nov 08, 2024 at 12:52:37PM +, Shameer Kolothum wrote: > Few ToDos to note, > 1. At present default-bus-bypass-iommu=on should be set when >arm-smmuv3-nested dev is specified. Otherwise you may get an IORT >related boot error. Requires fixing. > 2. Hot adding a device is not wor

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

2024-11-08 Thread Shameer Kolothum via
Hi, This series adds initial support for a user-creatable "arm-smmuv3-nested" device to Qemu. At present the Qemu ARM SMMUv3 emulation is per machine and cannot support multiple SMMUv3s. In order to support vfio-pci dev assignment with vSMMUv3, the physical SMMUv3 has to be configured in nested m