1 | 1 | ||
---|---|---|---|
2 | > -----Original Message----- | 2 | > -----Original Message----- |
3 | > From: Nicolin Chen <nicolinc@nvidia.com> | 3 | > From: Peter Maydell <peter.maydell@linaro.org> |
4 | > Sent: Thursday, January 23, 2025 4:10 AM | 4 | > Sent: Friday, December 13, 2024 1:33 PM |
5 | > To: Donald Dutile <ddutile@redhat.com> | 5 | > To: Jason Gunthorpe <jgg@nvidia.com> |
6 | > Cc: Shameerali Kolothum Thodi | 6 | > Cc: Daniel P. Berrangé <berrange@redhat.com>; Shameerali Kolothum |
7 | > <shameerali.kolothum.thodi@huawei.com>; eric.auger@redhat.com; Peter | 7 | > Thodi <shameerali.kolothum.thodi@huawei.com>; qemu-arm@nongnu.org; |
8 | > Maydell <peter.maydell@linaro.org>; Jason Gunthorpe <jgg@nvidia.com>; | 8 | > qemu-devel@nongnu.org; eric.auger@redhat.com; nicolinc@nvidia.com; |
9 | > Daniel P. Berrangé <berrange@redhat.com>; qemu-arm@nongnu.org; | 9 | > ddutile@redhat.com; Linuxarm <linuxarm@huawei.com>; Wangzhou (B) |
10 | > qemu-devel@nongnu.org; Linuxarm <linuxarm@huawei.com>; Wangzhou | 10 | > <wangzhou1@hisilicon.com>; jiangkunkun <jiangkunkun@huawei.com>; |
11 | > (B) <wangzhou1@hisilicon.com>; jiangkunkun <jiangkunkun@huawei.com>; | ||
12 | > Jonathan Cameron <jonathan.cameron@huawei.com>; | 11 | > Jonathan Cameron <jonathan.cameron@huawei.com>; |
13 | > zhangfei.gao@linaro.org | 12 | > zhangfei.gao@linaro.org |
14 | > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable | 13 | > Subject: Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable |
15 | > nested SMMUv3 | 14 | > nested SMMUv3 |
16 | > | 15 | > |
17 | > Hi Don, | 16 | > On Fri, 13 Dec 2024 at 12:46, Jason Gunthorpe <jgg@nvidia.com> wrote: |
17 | > > | ||
18 | > > On Fri, Dec 13, 2024 at 12:00:43PM +0000, Daniel P. Berrangé wrote: | ||
19 | > > > On Fri, Nov 08, 2024 at 12:52:37PM +0000, Shameer Kolothum via wrote: | ||
20 | > > > > Hi, | ||
21 | > > > > | ||
22 | > > > > This series adds initial support for a user-creatable "arm-smmuv3- | ||
23 | > nested" | ||
24 | > > > > device to Qemu. At present the Qemu ARM SMMUv3 emulation is per | ||
25 | > machine | ||
26 | > > > > and cannot support multiple SMMUv3s. | ||
27 | > > > > | ||
28 | > > > > In order to support vfio-pci dev assignment with vSMMUv3, the | ||
29 | > physical | ||
30 | > > > > SMMUv3 has to be configured in nested mode. Having a pluggable | ||
31 | > > > > "arm-smmuv3-nested" device enables us to have multiple vSMMUv3 | ||
32 | > for Guests | ||
33 | > > > > running on a host with multiple physical SMMUv3s. A few benefits of | ||
34 | > doing | ||
35 | > > > > this are, | ||
36 | > > > | ||
37 | > > > I'm not very familiar with arm, but from this description I'm not | ||
38 | > > > really seeing how "nesting" is involved here. You're only talking | ||
39 | > > > about the host and 1 L1 guest, no L2 guest. | ||
40 | > > | ||
41 | > > nesting is the term the iommu side is using to refer to the 2 | ||
42 | > > dimensional paging, ie a guest page table on top of a hypervisor page | ||
43 | > > table. | ||
18 | > | 44 | > |
19 | > On Fri, Jan 10, 2025 at 11:05:24PM -0500, Donald Dutile wrote: | 45 | > Isn't that more usually called "two stage" paging? Calling |
20 | > > On 1/8/25 11:45 PM, Nicolin Chen wrote: | 46 | > that "nesting" seems like it is going to be massively confusing... |
21 | > > > On Mon, Dec 16, 2024 at 10:01:29AM +0000, Shameerali Kolothum Thodi | 47 | |
22 | > wrote: | 48 | Yes. This will be renamed in future revisions as arm-smmuv3-accel. |
23 | > > > > And patches prior to this commit adds that support: | 49 | |
24 | > > > > 4ccdbe3: ("cover-letter: Add HW accelerated nesting support for arm | ||
25 | > > > > SMMUv3") | ||
26 | > > > > | ||
27 | > > > > Nicolin is soon going to send out those for review. Or I can include | ||
28 | > > > > those in this series so that it gives a complete picture. Nicolin? | ||
29 | > > > | ||
30 | > > > Just found that I forgot to reply this one...sorry | ||
31 | > > > | ||
32 | > > > I asked Don/Eric to take over that vSMMU series: | ||
33 | > > > https://lore.kernel.org/qemu-devel/Zy0jiPItu8A3wNTL@Asurada-Nvidia/ | ||
34 | > > > (The majority of my effort has been still on the kernel side: | ||
35 | > > > previously vIOMMU/vDEVICE, and now vEVENTQ/MSI/vCMDQ..) | ||
36 | > > > | ||
37 | > > > Don/Eric, is there any update from your side? | ||
38 | > > > | ||
39 | > > Apologies for delayed response, been at customer site, and haven't been | ||
40 | > keeping up w/biz email. | ||
41 | > > Eric is probably waiting for me to get back and chat as well. | ||
42 | > > Will look to reply early next week. | ||
43 | > | 50 | > |
44 | > I wonder if we can make some progress in Feb? If so, we can start | 51 | > Also, how does it relate to what this series seems to be |
45 | > to wrap up the iommufd uAPI patches for HWPT, which was a part of | 52 | > doing, where we provide the guest with two separate SMMUs? |
46 | > intel's series but never got sent since their emulated series is | 53 | > (Are those two SMMUs "nested" in the sense that one is sitting |
47 | > seemingly still pending? | 54 | > behind the other?) |
48 | 55 | ||
49 | I think these are the 5 patches that we require from Intel pass-through series, | 56 | I don't think it requires two SMMUs in Guest. The nested or "two |
57 | stage" means the stage 1 page table is owned by Guest and stage 2 | ||
58 | by host. And this is achieved by IOMMUFD provided IOCTLs. | ||
50 | 59 | ||
51 | vfio/iommufd: Implement [at|de]tach_hwpt handlers | 60 | There is a precurser to this series where the support for hw accelerated |
52 | vfio/iommufd: Implement HostIOMMUDeviceClass::realize_late() handler | 61 | 2 stage support is added in Qemu SMMUv3 code. |
53 | HostIOMMUDevice: Introduce realize_late callback | ||
54 | vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD | ||
55 | backends/iommufd: Add helpers for invalidating user-managed HWPT | ||
56 | 62 | ||
57 | See the commits from here, | 63 | Please see the complete branch here, |
58 | https://github.com/hisilicon/qemu/commit/bbdc65af38fa5723f1bd9b026e292730901f57b5 | 64 | https://github.com/hisilicon/qemu/commits/private-smmuv3-nested-dev-rfc-v1/ |
65 | And patches prior to this commit adds that support: | ||
66 | 4ccdbe3: ("cover-letter: Add HW accelerated nesting support for arm | ||
67 | SMMUv3") | ||
59 | 68 | ||
60 | [CC Zhenzhong] | 69 | Nicolin is soon going to send out those for review. Or I can include |
70 | those in this series so that it gives a complete picture. Nicolin? | ||
61 | 71 | ||
62 | Hi Zhenzhong, | 72 | Hope this clarifies any confusion. |
63 | |||
64 | Just wondering what your plans are for the above patches. If it make sense and you | ||
65 | are fine with it, I think it is a good idea one of us can pick up those from that series | ||
66 | and sent out separately so that it can get some review and take it forward. | ||
67 | 73 | ||
68 | Thanks, | 74 | Thanks, |
69 | Shameer | 75 | Shameer |
70 | 76 | ||
77 | |||
78 | diff view generated by jsdifflib |