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

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

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


Subject: RE: [virtio-comment] Re: [PATCH v1 3/8] device-context: Define the device context fields for device migration


Hi Michael,

> From: virtio-comment@lists.oasis-open.org <virtio-comment@lists.oasis-
> open.org> On Behalf Of Michael S. Tsirkin
> Sent: Sunday, October 8, 2023 5:12 PM

[..]
> > +\begin{tabularx}{\textwidth}{ |l||l|X| } \hline type & Name &
> > +Description \\ \hline \hline
> > +0x0 & VIRTIO_DEV_CTX_PCI_COMMON_RUNTIME_CFG & Provides common
> > +configuration space of device for PCI transport \\ \hline
> > +0x1 & VIRTIO_DEV_CTX_DEV_CFG_LAYOUT & Provides device specific
> > +configuration layout \\ \hline
> > +0x2 & VIRTIO_DEV_CTX_DEV_FEATURES & Provides device features \\
> > +\hline
> > +0x3 & VIRTIO_DEV_CTX_PCI_VQ_CFG & Provides Virtqueue configuration
> > +for PCI transport \\ \hline
> > +0x4 & VIRTIO_DEV_CTX_VQ_SPLIT_RUNTIME_CFG & Provides Queue run
> time
> > +state \\ \hline
> > +0x5 & VIRTIO_DEV_CTX_VQ_SPLIT_DEV_OWN_DESC & Provides list of
> > +virtqueue descriptors owned by device  \\ \hline
> > +0x6 - 0xFFFFFFFF & - & Reserved for future types \\ \hline
> > +\end{tabularx}
> 
> 
> I don't think this is enough, e.g. virtio net has internal state
> controlled thought CVQ commands. how do you intend to address/migrate
> these?
>
Post this series, the 32-bit type field will be split into two ranges.
First range (existing) to cover common content across all device type.
Second range to contain device specific content, containing non internal fields such as fields setup by the guest directly over CVQ.
 
> > +\subsubsection{Device Context Fields}\label{sec:Basic Facilities of a Virtio
> Device / Device Context / Device Context Fields}
> > +
> > +\paragraph{PCI Common Configuration Context}
> > +\label{par:Basic Facilities of a Virtio Device / Device Context / Device Context
> Fields/ PCI Common Configuration Context}
> > +
> > +For the field VIRTIO_DEV_CTX_PCI_COMMON_RUNTIME_CFG, \field{type}
> is set to 0x0.
> > +The \field{value} is in format of \field{struct virtio_pci_common_cfg}.
> > +The \field{length} is the length of \field{struct virtio_pci_common_cfg}.
> > +
> > +\paragraph{Device Configuration Layout Context}
> > +\label{par:Basic Facilities of a Virtio Device / Device Context / Device Context
> Fields/ Device Configuration Layout Context}
> > +
> > +For the field VIRTIO_DEV_CTX_DEV_CFG_LAYOUT, \field{type} is set to 0x1.
> > +The \field{value} is in format of device specific configuration layout listed
> > +in each of the device's device configuration layout section.
> > +The \field{length} is the length of the device configuration layout data.
> 
> Unclear. I am guessing it's doing things like setting up RO
> fields? This needs to be specified per device really.
> Also how some fields behave might depend on features.
In practice fields in this area do not change a lot, but it can for example the link status/speed of net device.
So it is not RO per say.

Regarding it be device specific or just a config_length blob, I think config_length blob is just fine for device_context use.
This is because there isnât a need for migration driver to parse any of these fields.


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