[virtio-dev] Re: [virtio-comment] Re: [PATCH v2 0/2] transport-pci: Introduce legacy registers access using AQ

Jason Wang
2023-05-15T05:08:37Z

在 2023/5/11 19:35, Michael S. Tsirkin 写道:
> On Thu, May 11, 2023 at 03:20:52PM +0800, Jason Wang wrote:
>> On Thu, May 11, 2023 at 12:08 AM Parav Pandit <parav@nvidia.com> wrote:
>>>
>>>
>>> On 5/10/2023 12:22 AM, Jason Wang wrote:
>>>> On Wed, May 10, 2023 at 11:51 AM Jason Wang <jasowang@redhat.com> wrote:
>>>> Just to make sure we are at the same page.
>>>>
>>>> 1) if the hardware has configq and we need to make it work for current
>>>> virtio-pci driver, hypervisor needs to trap guest PCI access and
>>>> translate it to configq command. This means the hypervisor needs to
>>>> hide the configq from guests. In this case the configq needs a
>>>> dedicated DMA address which is what PASID can help.
>>>> 2) if the hardware can report the device states, unless we want to
>>>> migrate L2 guest, hypervisor should hide it from L1, so PASID is
>>>> required to isolate the DMA for guest traffic and device state.
>>> A configq negotiates + discovers new fields for the PCI PF, VF, SF/SIOV
>>> devices over PCIe or other transports.
>>> So no need to hide/mediate for hw based devices, like cvq and like data vqs.
>> As discussed, I may misunderstand the function of the configq. If it
>> works like cvq, then yes. We don't need PASID.
>>
>> But if we want to report device state via let's say migration q, it
>> requires PASID since it is used by the hypervisor.
>>
>> Thanks
> I don't exactly get this part. With SRIOV migration q normally would be
> part of the PF, accessing hypervisor memory.

Yes, I meant if we have a per VF adminq.

Thanks

>
>
>
>
>
>>> For vdpa kind of use case it can work like cvq mediation, which I
>>> believe is happening without PASID today.
>>>
>>> This publicly archived list offers a means to provide input to the
>>> OASIS Virtual I/O Device (VIRTIO) TC.
>>>
>>> In order to verify user consent to the Feedback License terms and
>>> to minimize spam in the list archive, subscription is required
>>> before posting.
>>>
>>> Subscribe: virtio-comment-subscribe@lists.oasis-open.org
>>> Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
>>> List help: virtio-comment-help@lists.oasis-open.org
>>> List archive: https://lists.oasis-open.org/archives/virtio-comment/
>>> Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
>>> List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
>>> Committee: https://www.oasis-open.org/committees/virtio/
>>> Join OASIS: https://www.oasis-open.org/join/
>>>