parent
4289f9c187
commit
0d7eae515e
@ -1,7 +1,6 @@
|
||||
From 44716867275c9a5cdead2d70e6187b5af4087f07 Mon Sep 17 00:00:00 2001
|
||||
From: Laurent Vivier <laurent@vivier.eu>
|
||||
Date: Thu, 3 Sep 2020 01:26:53 +0200
|
||||
Subject: [PATCH 1/9] linux-user: fix implicit conversion from enumeration type
|
||||
Subject: [PATCH] linux-user: fix implicit conversion from enumeration type
|
||||
error
|
||||
|
||||
MK_ARRAY(type,size) is used to fill the field_types buffer, and if the
|
||||
@ -30,6 +29,3 @@ index 7992475c9f..2099482cff 100644
|
||||
#define MK_STRUCT(id) TYPE_STRUCT, id
|
||||
|
||||
#define THUNK_TARGET 0
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
From e0eab99255d34c9dbaac7b73a1a2a79f823a7da9 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:54 +0200
|
||||
Subject: [PATCH 2/9] linux-user: Add support for a group of btrfs ioctls used
|
||||
for subvolumes
|
||||
Subject: [PATCH] linux-user: Add support for a group of btrfs ioctls used for
|
||||
subvolumes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -259,6 +258,3 @@ index 3f1f033464..db61dbc1b3 100644
|
||||
STRUCT(rtc_time,
|
||||
TYPE_INT, /* tm_sec */
|
||||
TYPE_INT, /* tm_min */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
From 40fdd783ec707e61c285e081816bd2df54dfede4 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:55 +0200
|
||||
Subject: [PATCH 3/9] linux-user: Add support for a group of btrfs ioctls used
|
||||
for snapshots
|
||||
Subject: [PATCH] linux-user: Add support for a group of btrfs ioctls used for
|
||||
snapshots
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -93,6 +92,3 @@ index db61dbc1b3..038cd7869b 100644
|
||||
STRUCT(btrfs_ioctl_vol_args,
|
||||
TYPE_LONGLONG, /* fd */
|
||||
MK_ARRAY(TYPE_CHAR, BTRFS_PATH_NAME_MAX + 1)) /* name */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
From ead1cdc1e4bb9fa4d09ca4d8af94c2687e7f5d36 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:56 +0200
|
||||
Subject: [PATCH 4/9] linux-user: Add support for btrfs ioctls used to
|
||||
manipulate with devices
|
||||
Subject: [PATCH] linux-user: Add support for btrfs ioctls used to manipulate
|
||||
with devices
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -217,6 +216,3 @@ index 038cd7869b..ea6898979b 100644
|
||||
STRUCT(rtc_time,
|
||||
TYPE_INT, /* tm_sec */
|
||||
TYPE_INT, /* tm_min */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
From 5793eb73d4d6d37293c6ca95ed85414fcccb9662 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:57 +0200
|
||||
Subject: [PATCH 5/9] linux-user: Add support for btrfs ioctls used to get/set
|
||||
Subject: [PATCH] linux-user: Add support for btrfs ioctls used to get/set
|
||||
features
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -115,6 +114,3 @@ index ea6898979b..925054cfd4 100644
|
||||
STRUCT(rtc_time,
|
||||
TYPE_INT, /* tm_sec */
|
||||
TYPE_INT, /* tm_min */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
From 79116330e3eea392dec9a1f38fddf3449ad0195a Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:58 +0200
|
||||
Subject: [PATCH 6/9] linux-user: Add support for a group of btrfs inode ioctls
|
||||
Subject: [PATCH] linux-user: Add support for a group of btrfs inode ioctls
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -231,6 +230,3 @@ index 925054cfd4..b84e14235f 100644
|
||||
#ifdef BTRFS_IOC_DEV_INFO
|
||||
STRUCT(btrfs_ioctl_dev_info_args,
|
||||
TYPE_ULONGLONG, /* devid */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
From 58252f756d7fb2a8516c0815034c0bded4697852 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:26:59 +0200
|
||||
Subject: [PATCH 7/9] linux-user: Add support for two btrfs ioctls used for
|
||||
Subject: [PATCH] linux-user: Add support for two btrfs ioctls used for
|
||||
subvolume
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -127,6 +126,3 @@ index b84e14235f..5566d101c2 100644
|
||||
#ifdef BTRFS_IOC_GET_DEV_STATS
|
||||
STRUCT(btrfs_ioctl_get_dev_stats,
|
||||
TYPE_ULONGLONG, /* devid */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
From d62c16ff35a17743c2a0f8ebfb39f84064afcb3c Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:27:00 +0200
|
||||
Subject: [PATCH 8/9] linux-user: Add support for btrfs ioctls used to manage
|
||||
quota
|
||||
Subject: [PATCH] linux-user: Add support for btrfs ioctls used to manage quota
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
@ -230,6 +228,3 @@ index 5566d101c2..d9b7106a69 100644
|
||||
STRUCT(btrfs_ioctl_feature_flags,
|
||||
TYPE_ULONGLONG, /* compat_flags */
|
||||
TYPE_ULONGLONG, /* compat_ro_flags */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
From 5695918e7c599f21fd6913a61160c482a0e41639 Mon Sep 17 00:00:00 2001
|
||||
From: Filip Bozuta <Filip.Bozuta@syrmia.com>
|
||||
Date: Thu, 3 Sep 2020 01:27:01 +0200
|
||||
Subject: [PATCH 9/9] linux-user: Add support for btrfs ioctls used to scrub a
|
||||
Subject: [PATCH] linux-user: Add support for btrfs ioctls used to scrub a
|
||||
filesystem
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -137,6 +136,3 @@ index d9b7106a69..789723cfb9 100644
|
||||
#ifdef BTRFS_IOC_DEV_INFO
|
||||
STRUCT(btrfs_ioctl_dev_info_args,
|
||||
TYPE_ULONGLONG, /* devid */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
From 1c7cb1f52e2577e190c09c9a14e6b6f56f4a3ec3 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Date: Mon, 27 Jul 2020 20:02:21 +0100
|
||||
Subject: [PATCH] virtiofsd: drop CAP_DAC_READ_SEARCH
|
||||
@ -23,7 +22,7 @@ Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
|
||||
index a9feb90fd0..784330e0e4 100644
|
||||
index 94e0de2d2b..50a164a599 100644
|
||||
--- a/tools/virtiofsd/passthrough_ll.c
|
||||
+++ b/tools/virtiofsd/passthrough_ll.c
|
||||
@@ -2596,7 +2596,6 @@ static void setup_capabilities(char *modcaps_in)
|
@ -1,4 +1,3 @@
|
||||
From ebf101955ce8f8d72fba103b5151115a4335de2c Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Hajnoczi <stefanha@redhat.com>
|
||||
Date: Tue, 6 Oct 2020 10:58:26 +0100
|
||||
Subject: [PATCH] virtiofsd: avoid /proc/self/fd tempdir
|
||||
@ -60,10 +59,10 @@ Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
1 file changed, 11 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
|
||||
index 477e6ee0b5..ff53df4451 100644
|
||||
index 50a164a599..b865dc564b 100644
|
||||
--- a/tools/virtiofsd/passthrough_ll.c
|
||||
+++ b/tools/virtiofsd/passthrough_ll.c
|
||||
@@ -2393,8 +2393,6 @@ static void setup_wait_parent_capabilities(void)
|
||||
@@ -2386,8 +2386,6 @@ static void setup_wait_parent_capabilities(void)
|
||||
static void setup_namespaces(struct lo_data *lo, struct fuse_session *se)
|
||||
{
|
||||
pid_t child;
|
||||
@ -72,7 +71,7 @@ index 477e6ee0b5..ff53df4451 100644
|
||||
|
||||
/*
|
||||
* Create a new pid namespace for *child* processes. We'll have to
|
||||
@@ -2458,33 +2456,23 @@ static void setup_namespaces(struct lo_data *lo, struct fuse_session *se)
|
||||
@@ -2451,33 +2449,23 @@ static void setup_namespaces(struct lo_data *lo, struct fuse_session *se)
|
||||
exit(1);
|
||||
}
|
||||
|
141
0103-virtio-skip-legacy-support-check-on-machine-types-le.patch
Normal file
141
0103-virtio-skip-legacy-support-check-on-machine-types-le.patch
Normal file
@ -0,0 +1,141 @@
|
||||
From: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Date: Mon, 21 Sep 2020 14:25:03 +0200
|
||||
Subject: [PATCH] virtio: skip legacy support check on machine types less than
|
||||
5.1
|
||||
|
||||
Commit 9b3a35ec82 ("virtio: verify that legacy support is not accidentally
|
||||
on") added a check that returns an error if legacy support is on, but the
|
||||
device does not support legacy.
|
||||
|
||||
Unfortunately some devices were wrongly declared legacy capable even if
|
||||
they were not (e.g vhost-vsock).
|
||||
|
||||
To avoid migration issues, we add a virtio-device property
|
||||
(x-disable-legacy-check) to skip the legacy error, printing a warning
|
||||
instead, for machine types < 5.1.
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Fixes: 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on")
|
||||
Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
||||
Suggested-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Message-Id: <20200921122506.82515-2-sgarzare@redhat.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
(cherry picked from commit d55f518248f263bb8d0852f98e47102ea09d4f89)
|
||||
---
|
||||
hw/core/machine.c | 1 +
|
||||
hw/s390x/virtio-ccw.c | 15 ++++++++++++---
|
||||
hw/virtio/virtio-pci.c | 14 ++++++++++++--
|
||||
hw/virtio/virtio.c | 7 +++++++
|
||||
include/hw/virtio/virtio.h | 2 ++
|
||||
5 files changed, 34 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/hw/core/machine.c b/hw/core/machine.c
|
||||
index 8d1a90c6cf..0af18af593 100644
|
||||
--- a/hw/core/machine.c
|
||||
+++ b/hw/core/machine.c
|
||||
@@ -35,6 +35,7 @@ GlobalProperty hw_compat_5_0[] = {
|
||||
{ "vmport", "x-signal-unsupported-cmd", "off" },
|
||||
{ "vmport", "x-report-vmx-type", "off" },
|
||||
{ "vmport", "x-cmds-v2", "off" },
|
||||
+ { "virtio-device", "x-disable-legacy-check", "true" },
|
||||
};
|
||||
const size_t hw_compat_5_0_len = G_N_ELEMENTS(hw_compat_5_0);
|
||||
|
||||
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
|
||||
index 0e60270297..3dfc93d4f6 100644
|
||||
--- a/hw/s390x/virtio-ccw.c
|
||||
+++ b/hw/s390x/virtio-ccw.c
|
||||
@@ -1122,9 +1122,18 @@ static void virtio_ccw_device_plugged(DeviceState *d, Error **errp)
|
||||
}
|
||||
|
||||
if (!virtio_ccw_rev_max(dev) && !virtio_legacy_allowed(vdev)) {
|
||||
- error_setg(errp, "Invalid value of property max_rev "
|
||||
- "(is %d expected >= 1)", virtio_ccw_rev_max(dev));
|
||||
- return;
|
||||
+ /*
|
||||
+ * To avoid migration issues, we allow legacy mode when legacy
|
||||
+ * check is disabled in the old machine types (< 5.1).
|
||||
+ */
|
||||
+ if (virtio_legacy_check_disabled(vdev)) {
|
||||
+ warn_report("device requires revision >= 1, but for backward "
|
||||
+ "compatibility max_revision=0 is allowed");
|
||||
+ } else {
|
||||
+ error_setg(errp, "Invalid value of property max_rev "
|
||||
+ "(is %d expected >= 1)", virtio_ccw_rev_max(dev));
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (virtio_get_num_queues(vdev) > VIRTIO_QUEUE_MAX) {
|
||||
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
|
||||
index ccdf54e81c..4211565f2c 100644
|
||||
--- a/hw/virtio/virtio-pci.c
|
||||
+++ b/hw/virtio/virtio-pci.c
|
||||
@@ -1596,8 +1596,18 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp)
|
||||
|
||||
if (legacy) {
|
||||
if (!virtio_legacy_allowed(vdev)) {
|
||||
- error_setg(errp, "device is modern-only, use disable-legacy=on");
|
||||
- return;
|
||||
+ /*
|
||||
+ * To avoid migration issues, we allow legacy mode when legacy
|
||||
+ * check is disabled in the old machine types (< 5.1).
|
||||
+ */
|
||||
+ if (virtio_legacy_check_disabled(vdev)) {
|
||||
+ warn_report("device is modern-only, but for backward "
|
||||
+ "compatibility legacy is allowed");
|
||||
+ } else {
|
||||
+ error_setg(errp,
|
||||
+ "device is modern-only, use disable-legacy=on");
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
if (virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) {
|
||||
error_setg(errp, "VIRTIO_F_IOMMU_PLATFORM was supported by"
|
||||
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
|
||||
index e983025217..b85277da67 100644
|
||||
--- a/hw/virtio/virtio.c
|
||||
+++ b/hw/virtio/virtio.c
|
||||
@@ -3304,6 +3304,11 @@ bool virtio_legacy_allowed(VirtIODevice *vdev)
|
||||
}
|
||||
}
|
||||
|
||||
+bool virtio_legacy_check_disabled(VirtIODevice *vdev)
|
||||
+{
|
||||
+ return vdev->disable_legacy_check;
|
||||
+}
|
||||
+
|
||||
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n)
|
||||
{
|
||||
return vdev->vq[n].vring.desc;
|
||||
@@ -3713,6 +3718,8 @@ static Property virtio_properties[] = {
|
||||
DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
|
||||
DEFINE_PROP_BOOL("use-started", VirtIODevice, use_started, true),
|
||||
DEFINE_PROP_BOOL("use-disabled-flag", VirtIODevice, use_disabled_flag, true),
|
||||
+ DEFINE_PROP_BOOL("x-disable-legacy-check", VirtIODevice,
|
||||
+ disable_legacy_check, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
|
||||
index e424df12cf..c50f5a9dfe 100644
|
||||
--- a/include/hw/virtio/virtio.h
|
||||
+++ b/include/hw/virtio/virtio.h
|
||||
@@ -105,6 +105,7 @@ struct VirtIODevice
|
||||
bool use_started;
|
||||
bool started;
|
||||
bool start_on_kick; /* when virtio 1.0 feature has not been negotiated */
|
||||
+ bool disable_legacy_check;
|
||||
VMChangeStateEntry *vmstate;
|
||||
char *bus_name;
|
||||
uint8_t device_endian;
|
||||
@@ -398,5 +399,6 @@ static inline bool virtio_device_disabled(VirtIODevice *vdev)
|
||||
}
|
||||
|
||||
bool virtio_legacy_allowed(VirtIODevice *vdev);
|
||||
+bool virtio_legacy_check_disabled(VirtIODevice *vdev);
|
||||
|
||||
#endif
|
71
0104-vhost-vsock-pci-force-virtio-version-1.patch
Normal file
71
0104-vhost-vsock-pci-force-virtio-version-1.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Date: Mon, 21 Sep 2020 14:25:04 +0200
|
||||
Subject: [PATCH] vhost-vsock-pci: force virtio version 1
|
||||
|
||||
Commit 9b3a35ec82 ("virtio: verify that legacy support is not
|
||||
accidentally on") added a safety check that requires to set
|
||||
'disable-legacy=on' on vhost-vsock-pci device:
|
||||
|
||||
$ ./qemu-system-x86_64 ... -device vhost-vsock-pci,guest-cid=5
|
||||
qemu-system-x86_64: -device vhost-vsock-pci,guest-cid=5:
|
||||
device is modern-only, use disable-legacy=on
|
||||
|
||||
virtio-vsock was introduced after the release of VIRTIO 1.0
|
||||
specifications, so it should be 'modern-only'.
|
||||
In addition Cornelia verified that forcing a legacy mode on
|
||||
vhost-vsock-pci device using x86-64 host and s390x guest, so with
|
||||
different endianness, produces strange behaviours.
|
||||
|
||||
This patch forces virtio version 1 and removes the 'transitional_name'
|
||||
property removing the need to specify 'disable-legacy=on' on
|
||||
vhost-vsock-pci device.
|
||||
|
||||
To avoid migration issues, we force virtio version 1 only when
|
||||
legacy check is enabled in the new machine types (>= 5.1).
|
||||
|
||||
As the transitional device name is not commonly used, we do not
|
||||
provide compatibility handling for it.
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Reported-by: Qian Cai <caiqian@redhat.com>
|
||||
Reported-by: Qinghua Cheng <qcheng@redhat.com>
|
||||
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1868449
|
||||
Suggested-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Message-Id: <20200921122506.82515-3-sgarzare@redhat.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
(cherry picked from commit 6209070503989cf4f28549f228989419d4f0b236)
|
||||
---
|
||||
hw/virtio/vhost-vsock-pci.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c
|
||||
index a815278e69..f11a38292f 100644
|
||||
--- a/hw/virtio/vhost-vsock-pci.c
|
||||
+++ b/hw/virtio/vhost-vsock-pci.c
|
||||
@@ -43,6 +43,15 @@ static void vhost_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
{
|
||||
VHostVSockPCI *dev = VHOST_VSOCK_PCI(vpci_dev);
|
||||
DeviceState *vdev = DEVICE(&dev->vdev);
|
||||
+ VirtIODevice *virtio_dev = VIRTIO_DEVICE(vdev);
|
||||
+
|
||||
+ /*
|
||||
+ * To avoid migration issues, we force virtio version 1 only when
|
||||
+ * legacy check is enabled in the new machine types (>= 5.1).
|
||||
+ */
|
||||
+ if (!virtio_legacy_check_disabled(virtio_dev)) {
|
||||
+ virtio_pci_force_virtio_1(vpci_dev);
|
||||
+ }
|
||||
|
||||
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
|
||||
}
|
||||
@@ -72,7 +81,6 @@ static void vhost_vsock_pci_instance_init(Object *obj)
|
||||
static const VirtioPCIDeviceTypeInfo vhost_vsock_pci_info = {
|
||||
.base_name = TYPE_VHOST_VSOCK_PCI,
|
||||
.generic_name = "vhost-vsock-pci",
|
||||
- .transitional_name = "vhost-vsock-pci-transitional",
|
||||
.non_transitional_name = "vhost-vsock-pci-non-transitional",
|
||||
.instance_size = sizeof(VHostVSockPCI),
|
||||
.instance_init = vhost_vsock_pci_instance_init,
|
55
0105-vhost-user-vsock-pci-force-virtio-version-1.patch
Normal file
55
0105-vhost-user-vsock-pci-force-virtio-version-1.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Date: Mon, 21 Sep 2020 14:25:05 +0200
|
||||
Subject: [PATCH] vhost-user-vsock-pci: force virtio version 1
|
||||
|
||||
Commit 9b3a35ec82 ("virtio: verify that legacy support is not
|
||||
accidentally on") added a safety check that requires to set
|
||||
'disable-legacy=on' on vhost-user-vsock-pci device:
|
||||
|
||||
$ ./qemu-system-x86_64 ... \
|
||||
-chardev socket,id=char0,reconnect=0,path=/tmp/vhost4.socket \
|
||||
-device vhost-user-vsock-pci,chardev=char0
|
||||
qemu-system-x86_64: -device vhost-user-vsock-pci,chardev=char0:
|
||||
device is modern-only, use disable-legacy=on
|
||||
|
||||
virtio-vsock was introduced after the release of VIRTIO 1.0
|
||||
specifications, so it should be 'modern-only'.
|
||||
|
||||
This patch forces virtio version 1 and removes the 'transitional_name'
|
||||
property, as done for vhost-vsock-pci, removing the need to specify
|
||||
'disable-legacy=on' on vhost-user-vsock-pci device.
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Suggested-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Message-Id: <20200921122506.82515-4-sgarzare@redhat.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
(cherry picked from commit 27eda699f59d430c33fc054a36a17251992e70dc)
|
||||
---
|
||||
hw/virtio/vhost-user-vsock-pci.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/virtio/vhost-user-vsock-pci.c b/hw/virtio/vhost-user-vsock-pci.c
|
||||
index f4cf95873d..492df6418a 100644
|
||||
--- a/hw/virtio/vhost-user-vsock-pci.c
|
||||
+++ b/hw/virtio/vhost-user-vsock-pci.c
|
||||
@@ -40,6 +40,9 @@ static void vhost_user_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
VHostUserVSockPCI *dev = VHOST_USER_VSOCK_PCI(vpci_dev);
|
||||
DeviceState *vdev = DEVICE(&dev->vdev);
|
||||
|
||||
+ /* unlike vhost-vsock, we do not need to care about pre-5.1 compat */
|
||||
+ virtio_pci_force_virtio_1(vpci_dev);
|
||||
+
|
||||
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
|
||||
}
|
||||
|
||||
@@ -68,7 +71,6 @@ static void vhost_user_vsock_pci_instance_init(Object *obj)
|
||||
static const VirtioPCIDeviceTypeInfo vhost_user_vsock_pci_info = {
|
||||
.base_name = TYPE_VHOST_USER_VSOCK_PCI,
|
||||
.generic_name = "vhost-user-vsock-pci",
|
||||
- .transitional_name = "vhost-user-vsock-pci-transitional",
|
||||
.non_transitional_name = "vhost-user-vsock-pci-non-transitional",
|
||||
.instance_size = sizeof(VHostUserVSockPCI),
|
||||
.instance_init = vhost_user_vsock_pci_instance_init,
|
50
0106-vhost-vsock-ccw-force-virtio-version-1.patch
Normal file
50
0106-vhost-vsock-ccw-force-virtio-version-1.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Date: Mon, 21 Sep 2020 14:25:06 +0200
|
||||
Subject: [PATCH] vhost-vsock-ccw: force virtio version 1
|
||||
|
||||
virtio-vsock was introduced after the release of VIRTIO 1.0
|
||||
specifications, so it should be 'modern-only'.
|
||||
|
||||
This patch forces virtio version 1 as done for vhost-vsock-pci.
|
||||
|
||||
To avoid migration issues, we force virtio version 1 only when
|
||||
legacy check is enabled in the new machine types (>= 5.1).
|
||||
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Suggested-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
|
||||
Message-Id: <20200921122506.82515-5-sgarzare@redhat.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
(cherry picked from commit a6704a34cf02add13964149e0de6453ae62bd9db)
|
||||
---
|
||||
hw/s390x/vhost-vsock-ccw.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/hw/s390x/vhost-vsock-ccw.c b/hw/s390x/vhost-vsock-ccw.c
|
||||
index 0822ecca89..246416a8f9 100644
|
||||
--- a/hw/s390x/vhost-vsock-ccw.c
|
||||
+++ b/hw/s390x/vhost-vsock-ccw.c
|
||||
@@ -40,9 +40,21 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
|
||||
static void vhost_vsock_ccw_instance_init(Object *obj)
|
||||
{
|
||||
VHostVSockCCWState *dev = VHOST_VSOCK_CCW(obj);
|
||||
+ VirtioCcwDevice *ccw_dev = VIRTIO_CCW_DEVICE(obj);
|
||||
+ VirtIODevice *virtio_dev;
|
||||
|
||||
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
|
||||
TYPE_VHOST_VSOCK);
|
||||
+
|
||||
+ virtio_dev = VIRTIO_DEVICE(&dev->vdev);
|
||||
+
|
||||
+ /*
|
||||
+ * To avoid migration issues, we force virtio version 1 only when
|
||||
+ * legacy check is enabled in the new machine types (>= 5.1).
|
||||
+ */
|
||||
+ if (!virtio_legacy_check_disabled(virtio_dev)) {
|
||||
+ ccw_dev->force_revision_1 = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
static const TypeInfo vhost_vsock_ccw_info = {
|
39
qemu.spec
39
qemu.spec
@ -184,25 +184,13 @@
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 5.1.0
|
||||
Release: 6%{?rcrel}%{?dist}
|
||||
Release: 7%{?rcrel}%{?dist}
|
||||
Epoch: 2
|
||||
License: GPLv2 and BSD and MIT and CC-BY
|
||||
URL: http://www.qemu.org/
|
||||
|
||||
Source0: http://wiki.qemu-project.org/download/%{name}-%{version}%{?rcstr}.tar.xz
|
||||
|
||||
Patch1: 0001-linux-user-fix-implicit-conversion-from-enumeration-.patch
|
||||
Patch2: 0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch
|
||||
Patch3: 0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch
|
||||
Patch4: 0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch
|
||||
Patch5: 0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch
|
||||
Patch6: 0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch
|
||||
Patch7: 0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch
|
||||
Patch8: 0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch
|
||||
Patch9: 0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch
|
||||
Patch10: 0010-virtiofsd-drop-CAP_DAC_READ_SEARCH.patch
|
||||
Patch11: 0011-virtiofsd-avoid-proc-self-fd-tempdir.patch
|
||||
|
||||
# guest agent service
|
||||
Source10: qemu-guest-agent.service
|
||||
Source17: qemu-ga.sysconfig
|
||||
@ -220,6 +208,26 @@ Source20: kvm-x86.modprobe.conf
|
||||
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
|
||||
Source21: 95-kvm-ppc64-memlock.conf
|
||||
|
||||
# Add btrfs ioctls to linux-user (bz #1872918)
|
||||
Patch0001: 0001-linux-user-fix-implicit-conversion-from-enumeration-.patch
|
||||
Patch0002: 0002-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch
|
||||
Patch0003: 0003-linux-user-Add-support-for-a-group-of-btrfs-ioctls-u.patch
|
||||
Patch0004: 0004-linux-user-Add-support-for-btrfs-ioctls-used-to-mani.patch
|
||||
Patch0005: 0005-linux-user-Add-support-for-btrfs-ioctls-used-to-get-.patch
|
||||
Patch0006: 0006-linux-user-Add-support-for-a-group-of-btrfs-inode-io.patch
|
||||
Patch0007: 0007-linux-user-Add-support-for-two-btrfs-ioctls-used-for.patch
|
||||
Patch0008: 0008-linux-user-Add-support-for-btrfs-ioctls-used-to-mana.patch
|
||||
Patch0009: 0009-linux-user-Add-support-for-btrfs-ioctls-used-to-scru.patch
|
||||
|
||||
# virtiofsd caps fixes
|
||||
Patch0101: 0101-virtiofsd-drop-CAP_DAC_READ_SEARCH.patch
|
||||
Patch0102: 0102-virtiofsd-avoid-proc-self-fd-tempdir.patch
|
||||
# vhost-vsock-pci regressions (bz #1902057)
|
||||
Patch0103: 0103-virtio-skip-legacy-support-check-on-machine-types-le.patch
|
||||
Patch0104: 0104-vhost-vsock-pci-force-virtio-version-1.patch
|
||||
Patch0105: 0105-vhost-user-vsock-pci-force-virtio-version-1.patch
|
||||
Patch0106: 0106-vhost-vsock-ccw-force-virtio-version-1.patch
|
||||
|
||||
|
||||
BuildRequires: gcc
|
||||
# documentation deps
|
||||
@ -1907,6 +1915,9 @@ getent passwd qemu >/dev/null || \
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 03 2020 Cole Robinson <crobinso@redhat.com> - 5.1.0-7
|
||||
- vhost-vsock-pci regressions (bz #1902057)
|
||||
|
||||
* Mon Nov 09 2020 Cole Robinson <aintdiscole@gmail.com> - 5.1.0-6
|
||||
- virtiofsd caps fixes
|
||||
|
||||
@ -1920,7 +1931,7 @@ getent passwd qemu >/dev/null || \
|
||||
- Make QEMU sanity check a build blocker
|
||||
|
||||
* Thu Sep 3 2020 Daniel P. Berrangé <berrange@redhat.com> - 5.1.0-4
|
||||
- Add btrfs ioctls to linux-user (rhbz #1872918)
|
||||
- Add btrfs ioctls to linux-user (bz #1872918)
|
||||
|
||||
* Tue Aug 18 2020 Tom Stellard <tstellar@redhat.com> - 5.1.0-3
|
||||
- Add BuildRequires: gcc
|
||||
|
Loading…
x
Reference in New Issue
Block a user