[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: proposal: use admin command (and aq) of the device to query config space
> From: Zhu, Lingshan <lingshan.zhu@intel.com> > Sent: Wednesday, August 2, 2023 2:15 PM > Rebasing "transport vq" on admin vq is still in my pipeline, I am currently > working on a patch series implementing virtio pci live migration in the > spec(carry on Jason and Eugenio's work). > I will post it next week and back to transport vq task then. > Awesome and interesting to us as well. I have draft for member device migration admin commands. I guess yours will hit the mailing list first, so we can converge on your series. > For SIOV, I have implemented the interfaces for querying the configurations, for > example: > 1) Access config space: > > 247 +\begin{lstlisting} > 248 +#define VIRTIO_TRANSPTQ_CTRL_CONFIGÂÂÂ 6 > 249 +Â #define VIRTIO_TRANSPTQ_CTRL_CONFIG_GETÂÂÂ 0 > 250 +Â #define VIRTIO_TRANSPTQ_CTRL_CONFIG_SETÂÂÂ 1 > 251 + > 252 +struct virtio_transportq_ctrl_dev_config_get { > 253 +ÂÂÂÂÂÂ u32 offset; > 254 +ÂÂÂÂÂÂ u32 size; > 255 +}; > 256 + > 257 +struct virtio_transportq_ctrl_dev_config_set { > 258 +ÂÂÂÂÂÂ u32 offset; > 259 +ÂÂÂÂÂÂ u32 size; > 260 +ÂÂÂÂÂÂ u8Â data[]; > 261 +}; > 262 +\end{lstlisting} > > I think we can re-use the GET command for SR-IOV, I am afraid SET would be a > side-channel attacking surface for SR-IOV. > Get and set both should be inband for PF, VF, SIOV. I donât see any need to diverge and create any weird combinations differently for 3 different device types. > 2) a specific config, e.g., features: > > 142 +The features negotiation of managed devices is done by the > 143 +following commands: > 144 + > 145 +\begin{lstlisting} > 146 +#define VIRTIO_TRANSPTQ_CTRL_FEATÂÂ 3 > 147 + #define VIRTIO_TRANSPTQ_CTRL_FEAT_DEVICE_GETÂÂÂÂÂÂÂ 0 > 148 + #define VIRTIO_TRANSPTQ_CTRL_FEAT_DRIVER_SETÂÂÂÂÂÂÂ 1 > 149 + #define VIRTIO_TRANSPTQ_CTRL_FEAT_DRIVER_GETÂÂÂÂÂÂÂ 2 > 150 + > 151 +struct virtio_transportq_ctrl_dev_features { > 152 +ÂÂÂÂÂÂÂ u32 features_len; > 153 +ÂÂÂÂÂÂÂ u32 features[features_len]; > 154 +}; > 155 +\end{lstlisting} > > still can re-use the GET commands. > > Thanks > Zhu Lingshan > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]