OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Re: [PATCH v3 4/4] vhost-user: update shared memory capability


On 31/5/19 7:59 Î.Î., Dr. David Alan Gilbert wrote:
> * Nikos Dragazis (ndragazis@arrikto.com) wrote:
>> The virtio vhost-user device has shared memory resources. Therefore, it
>> uses the VIRTIO_PCI_CAP_SHARED_MEMORY_CFG capability to standardize
>> those resources through the PCI Configuration Space. This patch
>> synchronizes the virtio vhost-user device spec with the following shared
>> memory resources PATCH:
>>
>> https://lists.oasis-open.org/archives/virtio-dev/201902/msg00142.html
>>
>> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> Signed-off-by: Nikos Dragazis <ndragazis@arrikto.com>
>> ---
>>  virtio-vhost-user.tex | 17 ++++++++++++++++-
>>  1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/virtio-vhost-user.tex b/virtio-vhost-user.tex
>> index 7a8cd9c..d1305dd 100644
>> --- a/virtio-vhost-user.tex
>> +++ b/virtio-vhost-user.tex
>> @@ -320,7 +320,22 @@ \subsubsection{Notification structure layout}\label{sec:Device Types / Vhost-use
>>  \subsubsection{Shared memory capability}\label{sec:Device Types / Vhost-user Device Backend / Additional Device Resources over PCI / Shared Memory capability}
>>  
>>  The shared memory location is found using the VIRTIO_PCI_CAP_SHARED_MEMORY_CFG
>> -capability.
>> +capability. Using the additional \field{offset_hi} and \field{length_hi}
>> +fields following the SHARED_MEMORY_CFG capability structure, the shared
>> +memory region's 64-bit BAR offset is calculated as follows:
>> +
>> +\begin{lstlisting}
>> +        offset_hi << 32 + cap.offset
>> +\end{lstlisting}
>> +
>> +and the shared memory region's 64-bit length is calculated as follows:
>> +
>> +\begin{lstlisting}
>> +        length_hi << 32 + cap.length
>> +\end{lstlisting}
>> +
>> +The \field{cap.offset} and \field{cap.length} fields are taken from the
>> +SHARED_MEMORY_CFG capability structure.
> Yes, or this could just reference the:
> {sec:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Shared memory capability}
>
> section once it's merged.

That makes sense.

>
> Do you actually need to specify that it's found by PCI though?
> Could you just define it as using Shared Memory Regions,
> reference {sec:Basic Facilities of a Virtio Device / Shared Memory Regions}
> and then it would be defined to work with PCI, MMIO or CCW if they
> define the shared memory region support.

As you may have noticed, the virtio-vhost-user device, in contrast to
the other devices, needs some additional resources (doorbells,
notifications, shared memory), including of course the shared memory
regions which you are attempting to standardize. So, this device can
only be supported by transports that can somehow export all of these
resources, not just the shared memory resource.

In contrast to the shared memory region, the doorbells and notifications
resources are not standardized. Therefore, this patchset offers a
straightforward mapping of all these resources to the PCI transport via
virtio PCI capabilities. I am not sure about how the other virtio
transports could possibly support these resources.

Hope this makes sense :)
Any suggestions are welcome.

--
Nikos

>
> Dave
>
>
>>  \devicenormative{\paragraph}{Shared Memory capability}{Device Types / Vhost-user Device Backend / Additional Device Resources over PCI / Shared Memory capability}
>>  The device MUST present exactly one shared memory capability.
>> -- 
>> 2.7.4
>>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]