Hi Michael, Jason,

> From: Michael S. Tsirkin <[email protected]>
> Sent: Wednesday, February 24, 2021 12:40 PM
> 
> On Wed, Feb 24, 2021 at 08:18:36AM +0200, Parav Pandit wrote:
> > To honor VIRTIO_F_VERSION_1 feature bit, during endianness detection,
> > consider the read only supported features bit instead of current
> > features bit which can be modified by the driver.
> >
> > This enables vdpa_sim_net driver to invoke cpu_to_vdpasim16() early
> > enough just after vdpasim device creation in subsequent patch.
> >
> > Signed-off-by: Parav Pandit <[email protected]>
> > Reviewed-by: Eli Cohen <[email protected]>
> 
> Well that works for legacy and modern devices but not for transitional ones.
> Without transitional device support vendors are reluctant to add modern
> features since that will break old guests ...  I suspect we need to either 
> add a
> new ioctl enabling modern mode, or abuse SET_FEATURES and call it from
> qemu on first config space access.
> 

>From mgmt tool kernel point of view,
(a) config space decoding depends on current feature version bit
(b) feature get/set and config read are not atomic callbacks 

Mgmt. tool kernel code need to read them in single call from the vendor driver.
I need to add mgmt_dev->ops->get_features_config(struct 
virtio_features_config*) calllback that returns value of both atomically in 
structure like below.

struct virtio_features_config {
        u64 features;
        union {
                struct virtio_net_config net;
                struct virtio_block_config blk;
        } u;
}

What do you think?
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to