[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 60/62] vhost-user: Fix protocol feature bit conflict
From: |
Michael S. Tsirkin |
Subject: |
[PULL v3 60/62] vhost-user: Fix protocol feature bit conflict |
Date: |
Sun, 22 Oct 2023 05:26:42 -0400 |
From: Hanna Czenczek <hreitz@redhat.com>
The VHOST_USER_PROTOCOL_F_XEN_MMAP feature bit was defined in
f21e95ee97d, which has been part of qemu's 8.1.0 release. However, it
seems it was never added to qemu's code, but it is well possible that it
is already used by different front-ends outside of qemu (i.e., Xen).
VHOST_USER_PROTOCOL_F_SHARED_OBJECT in contrast was added to qemu's code
in 16094766627, but never defined in the vhost-user specification. As a
consequence, both bits were defined to be 17, which cannot work.
Regardless of whether actual code or the specification should take
precedence, F_XEN_MMAP is already part of a qemu release, while
F_SHARED_OBJECT is not. Therefore, bump the latter to take number 18
instead of 17, and add this to the specification.
Take the opportunity to add at least a little note on the
VhostUserShared structure to the specification. This structure is
referenced by the new commands introduced in 16094766627, but was not
defined.
Fixes: 160947666276c5b7f6bca4d746bcac2966635d79
("vhost-user: add shared_object msg")
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20231016083201.23736-1-hreitz@redhat.com>
Reviewed-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/vhost-user.h | 3 ++-
subprojects/libvhost-user/libvhost-user.h | 3 ++-
docs/interop/vhost-user.rst | 11 +++++++++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/include/hw/virtio/vhost-user.h b/include/hw/virtio/vhost-user.h
index 6b06ecb1bd..20b69d8e85 100644
--- a/include/hw/virtio/vhost-user.h
+++ b/include/hw/virtio/vhost-user.h
@@ -29,7 +29,8 @@ enum VhostUserProtocolFeature {
VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS = 14,
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS = 15,
VHOST_USER_PROTOCOL_F_STATUS = 16,
- VHOST_USER_PROTOCOL_F_SHARED_OBJECT = 17,
+ /* Feature 17 reserved for VHOST_USER_PROTOCOL_F_XEN_MMAP. */
+ VHOST_USER_PROTOCOL_F_SHARED_OBJECT = 18,
VHOST_USER_PROTOCOL_F_MAX
};
diff --git a/subprojects/libvhost-user/libvhost-user.h
b/subprojects/libvhost-user/libvhost-user.h
index b36a42a7ca..c2352904f0 100644
--- a/subprojects/libvhost-user/libvhost-user.h
+++ b/subprojects/libvhost-user/libvhost-user.h
@@ -65,7 +65,8 @@ enum VhostUserProtocolFeature {
VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS = 14,
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS = 15,
/* Feature 16 is reserved for VHOST_USER_PROTOCOL_F_STATUS. */
- VHOST_USER_PROTOCOL_F_SHARED_OBJECT = 17,
+ /* Feature 17 reserved for VHOST_USER_PROTOCOL_F_XEN_MMAP. */
+ VHOST_USER_PROTOCOL_F_SHARED_OBJECT = 18,
VHOST_USER_PROTOCOL_F_MAX
};
diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
index 415bb47a19..768fb5c28c 100644
--- a/docs/interop/vhost-user.rst
+++ b/docs/interop/vhost-user.rst
@@ -275,6 +275,16 @@ Inflight description
:queue size: a 16-bit size of virtqueues
+VhostUserShared
+^^^^^^^^^^^^^^^
+
++------+
+| UUID |
++------+
+
+:UUID: 16 bytes UUID, whose first three components (a 32-bit value, then
+ two 16-bit values) are stored in big endian.
+
C structure
-----------
@@ -885,6 +895,7 @@ Protocol features
#define VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS 15
#define VHOST_USER_PROTOCOL_F_STATUS 16
#define VHOST_USER_PROTOCOL_F_XEN_MMAP 17
+ #define VHOST_USER_PROTOCOL_F_SHARED_OBJECT 18
Front-end message types
-----------------------
--
MST
- [PULL v3 48/62] hw/isa/piix: Resolve duplicate code regarding PCI interrupt wiring, (continued)
- [PULL v3 48/62] hw/isa/piix: Resolve duplicate code regarding PCI interrupt wiring, Michael S. Tsirkin, 2023/10/22
- [PULL v3 51/62] vhost-user-common: send get_inflight_fd once, Michael S. Tsirkin, 2023/10/22
- [PULL v3 49/62] hw/isa/piix: Implement multi-process QEMU support also for PIIX4, Michael S. Tsirkin, 2023/10/22
- [PULL v3 53/62] vhost-user-scsi: support reconnect to backend, Michael S. Tsirkin, 2023/10/22
- [PULL v3 52/62] vhost: move and rename the conn retry times, Michael S. Tsirkin, 2023/10/22
- [PULL v3 54/62] vhost-user-scsi: start vhost when guest kicks, Michael S. Tsirkin, 2023/10/22
- [PULL v3 55/62] vhost-user: fix lost reconnect, Michael S. Tsirkin, 2023/10/22
- [PULL v3 56/62] hw/i386/cxl: ensure maxram is greater than ram size for calculating cxl range, Michael S. Tsirkin, 2023/10/22
- [PULL v3 57/62] tests/acpi: Allow update of DSDT.cxl, Michael S. Tsirkin, 2023/10/22
- [PULL v3 58/62] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/22
- [PULL v3 60/62] vhost-user: Fix protocol feature bit conflict,
Michael S. Tsirkin <=
- [PULL v3 59/62] tests/acpi: Update DSDT.cxl with QTG DSM, Michael S. Tsirkin, 2023/10/22
- [PULL v3 61/62] MAINTAINERS: Add include/hw/intc/i8259.h to the PC chip section, Michael S. Tsirkin, 2023/10/22
- [PULL v3 62/62] intel-iommu: Report interrupt remapping faults, fix return value, Michael S. Tsirkin, 2023/10/22
- Re: [PULL v3 00/62] virtio,pc,pci: features, cleanups, Stefan Hajnoczi, 2023/10/23