[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH v1 3/8] device-context: Define the device context fields for device migration
On Sun, Oct 08, 2023 at 02:25:50PM +0300, Parav Pandit wrote: > +\begin{lstlisting} > +struct virtio_dev_ctx_pci_vq_cfg { > + le16 vq_index; > + le16 queue_size; > + le16 queue_msix_vector; > + le64 queue_descÍ > + le64 queue_driverÍ > + le64 queue_deviceÍ > +}; > +\end{lstlisting} > + > +One or multiple entries of PCI Virtqueue Configuration Context may exist, each such > +entry corresponds to a unique virtqueue identified by the \field{vq_index}. So consider this example. In practice it is quite possible that driver is in the process of specifying e.g. queue_desc, and it set queue_desc_hi but not queue_desc_lo. Then what is queue_desc? Just a combination of a legal value of queue_desc_hi and illegal one of queue_desc_lo? This makes no sense. queue_desc is fundamentally undefined until queue is enabled. This is why I suggest that we have records that match the transport. Offset in structure can then we used as a tag and so we do not need to come up with new definitions for each single thing. And, this is only an instance of the general principle: do not have two definitions of the same thing. In fact I'd argue our transport structures are an example of a bad design and the cost is that less used ones like mmio and ccw sometimes lag behind on features. -- MST
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]