[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e95add68-7556-f8a3-695b-40389742a682@redhat.com>
Date: Tue, 1 Jun 2021 13:10:30 +0800
From: Jason Wang <jasowang@...hat.com>
To: Shenming Lu <lushenming@...wei.com>,
Liu Yi L <yi.l.liu@...ux.intel.com>
Cc: yi.l.liu@...el.com, "Tian, Kevin" <kevin.tian@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
Jason Gunthorpe <jgg@...dia.com>,
Lu Baolu <baolu.lu@...ux.intel.com>,
David Woodhouse <dwmw2@...radead.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Alex Williamson (alex.williamson@...hat.com)\""
<alex.williamson@...hat.com>, Eric Auger <eric.auger@...hat.com>,
Jonathan Corbet <corbet@....net>,
Zenghui Yu <yuzenghui@...wei.com>,
"wanghaibin.wang@...wei.com" <wanghaibin.wang@...wei.com>
Subject: Re: [RFC] /dev/ioasid uAPI proposal
在 2021/6/1 下午12:27, Shenming Lu 写道:
> On 2021/6/1 10:36, Jason Wang wrote:
>> 在 2021/5/31 下�4:41, Liu Yi L 写�:
>>>> I guess VFIO_ATTACH_IOASID will fail if the underlayer doesn't support
>>>> hardware nesting. Or is there way to detect the capability before?
>>> I think it could fail in the IOASID_CREATE_NESTING. If the gpa_ioasid
>>> is not able to support nesting, then should fail it.
>>>
>>>> I think GET_INFO only works after the ATTACH.
>>> yes. After attaching to gpa_ioasid, userspace could GET_INFO on the
>>> gpa_ioasid and check if nesting is supported or not. right?
>>
>> Some more questions:
>>
>> 1) Is the handle returned by IOASID_ALLOC an fd?
>> 2) If yes, what's the reason for not simply use the fd opened from /dev/ioas. (This is the question that is not answered) and what happens if we call GET_INFO for the ioasid_fd?
>> 3) If not, how GET_INFO work?
> It seems that the return value from IOASID_ALLOC is an IOASID number in the
> ioasid_data struct, then when calling GET_INFO, we should convey this IOASID
> number to get the associated I/O address space attributes (depend on the
> physical IOMMU, which could be discovered when attaching a device to the
> IOASID fd or number), right?
Right, but the question is why need such indirection? Unless there's a
case that you need to create multiple IOASIDs per ioasid fd. It's more
simpler to attach the metadata into the ioasid fd itself.
Thanks
>
> Thanks,
> Shenming
>
Powered by blists - more mailing lists