On Fri, Aug 29, 2025 at 01:40:01AM +0000, Duan, Zhenzhong wrote: > >-----Original Message----- > >On 8/28/25 11:53 AM, Duan, Zhenzhong wrote: > >>>> + /* > >>>> + * If vIOMMU supports stage-1 translation, force to create nested > >>> parent > >>> I would rather not use another terminology here. You previously used > >>> hw_nested, I think that's better. Also bear in mind that smmu supports > >>> S1, S2 and S1+S2 in emulated code. > >> What about 'nesting parent' to match kernel side terminology, per Nicolin's > >suggestion: > >> > >> In kernel kdoc/uAPI, we use: > >> - "nesting parent" for stage-2 object > >> - "nested hwpt", "nested domain" for stage-1 object > >I still think that since you queried the HW_NESTED cap it makes sense to > >continue using it. This can come along with the kernel terminology though. > > OK, like below, do I understand right? > > + /* > + * If vIOMMU supports stage-1 translation, force to create hw_nested > + * (aka. nesting parent in kernel) domain which could be reused by > + * vIOMMU to create nested domain. > + */
FWIW, while I was targeting the word "nested parent", I think Eric was commenting on the word "stage-1 translation". The vSMMU code supports "stage-1", "stage-2", and even "nested" as its full emulation modes (no HW acceleration). So, any word like "stage-1 translation" or "nested S1" can be confusing to the vSMMU folks, as neither of them necessarily means "HW_NESTED" that stands for "HW-accelerated nested stage-1". Also, "HW_NESTED" != "nesting parent". They're two different things. Thus, "force to create hw_nested" isn't accurate. Here, we want to create a "nesting parent" HWPT. There is no other alternative name, IMHO, given this is essentially a kernel-defined object. Anyway, if we all agree on the VIOMMU_FLAG_WANT_NESTING_PARENT, it is not necessary to have this comment (at least the first part) -- we could still note that the nesting parent HWPT will be reused by vIOMMU to create nested HWPTs, if you'd like to. Thanks Nicolin