diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2019-10-23 11:04:12 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-10-25 07:46:22 -0400 |
commit | a9340358f4d5d0e8e0c7a3a23cb4e5b68334974c (patch) | |
tree | e5c2f67f97b7becd4986ae0516fc6488636e3a8e /tests/libqos/virtio.h | |
parent | 60ce3a40fc18423d6c3ba330e60ca03fc74f9d21 (diff) | |
download | qemu-a9340358f4d5d0e8e0c7a3a23cb4e5b68334974c.zip qemu-a9340358f4d5d0e8e0c7a3a23cb4e5b68334974c.tar.gz qemu-a9340358f4d5d0e8e0c7a3a23cb4e5b68334974c.tar.bz2 |
libqos: extend feature bits to 64-bit
In VIRTIO 1.0 feature bits changed from 32-bit to 64-bit. (In fact, the
transports allow even more feature bits but nothing uses more than 64
bits today.)
Add 64-bit feature bit support to virtio-mmio and virtio-pci. This will
be necessary for VIRTIO 1.0 support.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191023100425.12168-4-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests/libqos/virtio.h')
-rw-r--r-- | tests/libqos/virtio.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libqos/virtio.h b/tests/libqos/virtio.h index 2cb2448..a5c99fb 100644 --- a/tests/libqos/virtio.h +++ b/tests/libqos/virtio.h @@ -13,7 +13,7 @@ #include "libqos/malloc.h" #include "standard-headers/linux/virtio_ring.h" -#define QVIRTIO_F_BAD_FEATURE 0x40000000 +#define QVIRTIO_F_BAD_FEATURE 0x40000000ull typedef struct QVirtioBus QVirtioBus; @@ -52,13 +52,13 @@ struct QVirtioBus { uint64_t (*config_readq)(QVirtioDevice *d, uint64_t addr); /* Get features of the device */ - uint32_t (*get_features)(QVirtioDevice *d); + uint64_t (*get_features)(QVirtioDevice *d); /* Set features of the device */ - void (*set_features)(QVirtioDevice *d, uint32_t features); + void (*set_features)(QVirtioDevice *d, uint64_t features); /* Get features of the guest */ - uint32_t (*get_guest_features)(QVirtioDevice *d); + uint64_t (*get_guest_features)(QVirtioDevice *d); /* Get status of the device */ uint8_t (*get_status)(QVirtioDevice *d); @@ -103,8 +103,8 @@ uint8_t qvirtio_config_readb(QVirtioDevice *d, uint64_t addr); uint16_t qvirtio_config_readw(QVirtioDevice *d, uint64_t addr); uint32_t qvirtio_config_readl(QVirtioDevice *d, uint64_t addr); uint64_t qvirtio_config_readq(QVirtioDevice *d, uint64_t addr); -uint32_t qvirtio_get_features(QVirtioDevice *d); -void qvirtio_set_features(QVirtioDevice *d, uint32_t features); +uint64_t qvirtio_get_features(QVirtioDevice *d); +void qvirtio_set_features(QVirtioDevice *d, uint64_t features); bool qvirtio_is_big_endian(QVirtioDevice *d); void qvirtio_reset(QVirtioDevice *d); |