qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 0/8] Virtio features acknowledged by guest


From: Stefan Hajnoczi
Subject: Re: [PATCH v1 0/8] Virtio features acknowledged by guest
Date: Thu, 2 Sep 2021 13:34:56 +0100

On Wed, Sep 01, 2021 at 12:07:56PM +0300, Maxim Davydov wrote:
> In some situations (for instance, debug), we want to be able to see the
> features that were confirmed by the guest. At the same time, we would like
> to do this safely, without the possibility of setting bits of guest
> features from the outside.
> 
> Maxim Davydov (8):
>   qdev-properties: Add read-only 64 bit property
>   virtio: Add tracking of the common virtio guest features
>   virtio-gpu: Add tracking of the virtio guest feature bits
>   virtio-serial: Add tracking of the virtio guest feature bits
>   virtio-net: Add tracking of the virtio guest feature bits
>   scsi: Add tracking of the acknowledged feature bits
>   virtio-blk: Add tracking of the virtio guest feature bits
>   virtio-balloon: Add tracking of the virtio guest feature bits
> 
>  hw/block/virtio-blk.c          |  20 ++++---
>  hw/char/virtio-serial-bus.c    |   5 +-
>  hw/core/qdev-properties.c      |  32 +++++++++++
>  hw/display/vhost-user-gpu.c    |   3 +-
>  hw/display/virtio-gpu.c        |   8 +--
>  hw/net/virtio-net.c            | 118 
> +++++++++++++++++++++++++----------------
>  hw/scsi/vhost-scsi.c           |   6 +--
>  hw/scsi/vhost-user-scsi.c      |  18 +++----
>  hw/scsi/virtio-scsi.c          |  10 ++--
>  hw/virtio/virtio-balloon.c     |  20 ++++---
>  hw/virtio/virtio.c             |   2 +-
>  include/hw/qdev-properties.h   |   5 ++
>  include/hw/virtio/virtio-gpu.h |  10 ++--
>  include/hw/virtio/virtio.h     |  39 +++++++++-----
>  14 files changed, 193 insertions(+), 103 deletions(-)

Hi Maxim,
The VIRTIO specification is designed to allow more than 64 feature bits.
Currently all feature bits fit into 64 bits but that may not be the case
in the future. Please use a representation that is capable of expanding
in the future.

The Linux guest drivers have a string sysfs attribute that is formatted
in binary ('0' and '1' characters). It's not easy for humans to read but
it is capable of growing in the future.

Also, please take a look at Jonah Palmer's patch series that adds
commands to introspect VIRTIO devices:
https://lore.kernel.org/qemu-devel/1626086137-16292-1-git-send-email-jonah.palmer@oracle.com/

I have CCed Jonah in case there is overlap between the two series that
you can work together on.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]