From 408bed44fe02b53549e514966ba19cacc9873d43 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Thu, 12 Jan 2023 09:06:23 -0500 Subject: [PATCH] * Thu Jan 12 2023 Miroslav Rezanina - 7.2.0-4 - kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch [bz#2155749] - kvm-Update-QGA-service-for-new-command-line.patch [bz#2156515] - Resolves: bz#2155749 ([regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng device between RHEL8.8 and RHEL9.2/MSI-X) - Resolves: bz#2156515 ([guest-agent] Replace '-blacklist' to '-block-rpcs' in qemu-ga config file) --- ...pci-fix-migration-compat-for-vectors.patch | 53 +++++++++++++++++++ qemu-ga.sysconfig | 8 +-- qemu-guest-agent.service | 2 +- qemu-kvm.spec | 12 ++++- 4 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch diff --git a/kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch b/kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch new file mode 100644 index 0000000..0555a68 --- /dev/null +++ b/kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch @@ -0,0 +1,53 @@ +From 35ffe28a91a2ef08dd181d1a22695050ccbb6995 Mon Sep 17 00:00:00 2001 +From: "Dr. David Alan Gilbert" +Date: Mon, 9 Jan 2023 16:04:43 +0000 +Subject: [PATCH 1/2] virtio-rng-pci: fix migration compat for vectors + +RH-Author: Dr. David Alan Gilbert +RH-MergeRequest: 131: virtio-rng-pci: fix migration compat for vectors +RH-Bugzilla: 2155749 +RH-Acked-by: Miroslav Rezanina +RH-Acked-by: Stefan Hajnoczi +RH-Acked-by: Thomas Huth +RH-Commit: [1/1] 1a866491dd191b073d71ae1aa5f4d76ee885de6d (dagrh/c-9-s-qemu-kvm) + +Fixup the migration compatibility for existing machine types +so that they do not enable msi-x. + +Symptom: + +(qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0 +qemu: Failed to load PCIDevice:config +qemu: Failed to load virtio-rng:virtio +qemu: error while loading state for instance 0x0 of device '0000:00:03.0/virtio-rng' +qemu: load of migration failed: Invalid argument + +Note: This fix will break migration from 7.2->7.2-fixed with this patch + +bz: https://bugzilla.redhat.com/show_bug.cgi?id=2155749 +Fixes: 9ea02e8f1 ("virtio-rng-pci: Allow setting nvectors, so we can use MSI-X") + +This downstream fix is the equivalent of an upstream fix I've posted to +the 7.2 machine type compatibility. + +Signed-off-by: Dr. David Alan Gilbert +--- + hw/core/machine.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/hw/core/machine.c b/hw/core/machine.c +index 3d851d34da..7adbac6f87 100644 +--- a/hw/core/machine.c ++++ b/hw/core/machine.c +@@ -56,6 +56,8 @@ GlobalProperty hw_compat_rhel_9_1[] = { + { "nvme-ns", "eui64-default", "on"}, + /* hw_compat_rhel_9_1 from hw_compat_7_1 */ + { "virtio-device", "queue_reset", "false" }, ++ /* hw_compat_rhel_9_1 bz 2155749 */ ++ { "virtio-rng-pci", "vectors", "0" }, + }; + const size_t hw_compat_rhel_9_1_len = G_N_ELEMENTS(hw_compat_rhel_9_1); + +-- +2.31.1 + diff --git a/qemu-ga.sysconfig b/qemu-ga.sysconfig index 67bad0c..a78b428 100644 --- a/qemu-ga.sysconfig +++ b/qemu-ga.sysconfig @@ -1,11 +1,11 @@ # This is a systemd environment file, not a shell script. # It provides settings for "/lib/systemd/system/qemu-guest-agent.service". -# Comma-separated blacklist of RPCs to disable, or empty list to enable all. +# Comma-separated blocked RPCs to disable, or empty list to enable all. # -# You can get the list of RPC commands using "qemu-ga --blacklist='?'". -# There should be no spaces between commas and commands in the blacklist. -BLACKLIST_RPC=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,guest-file-flush,guest-exec,guest-exec-status +# You can get the list of RPC commands using "qemu-ga --block-rpcs='?'". +# There should be no spaces between commas and commands in the block list. +BLOCK_RPCS=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,guest-file-flush,guest-exec,guest-exec-status # Fsfreeze hook script specification. # diff --git a/qemu-guest-agent.service b/qemu-guest-agent.service index b3157d5..244da02 100644 --- a/qemu-guest-agent.service +++ b/qemu-guest-agent.service @@ -10,7 +10,7 @@ EnvironmentFile=/etc/sysconfig/qemu-ga ExecStart=/usr/bin/qemu-ga \ --method=virtio-serial \ --path=/dev/virtio-ports/org.qemu.guest_agent.0 \ - --blacklist=${BLACKLIST_RPC} \ + --block-rpcs=${BLOCK_RPCS} \ -F${FSFREEZE_HOOK_PATHNAME} Restart=always RestartSec=0 diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 49a09a7..e143966 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -148,7 +148,7 @@ Obsoletes: %{name}-block-ssh <= %{epoch}:%{version} \ Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 7.2.0 -Release: 3%{?rcrel}%{?dist}%{?cc_suffix} +Release: 4%{?rcrel}%{?dist}%{?cc_suffix} # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped # Epoch 15 used for RHEL 8 # Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5) @@ -208,6 +208,8 @@ Patch29: kvm-hw-arm-virt-Add-compact-highmem-property.patch Patch30: kvm-hw-arm-virt-Add-properties-to-disable-high-memory-re.patch # For bz#2113840 - [RHEL9.2] Memory mapping optimization for virt machine Patch31: kvm-hw-arm-virt-Enable-compat-high-memory-region-address.patch +# For bz#2155749 - [regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng device between RHEL8.8 and RHEL9.2/MSI-X +Patch32: kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch %if %{have_clang} BuildRequires: clang @@ -1236,6 +1238,14 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Thu Jan 12 2023 Miroslav Rezanina - 7.2.0-4 +- kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch [bz#2155749] +- kvm-Update-QGA-service-for-new-command-line.patch [bz#2156515] +- Resolves: bz#2155749 + ([regression][stable guest abi][qemu-kvm7.2]Migration failed due to virtio-rng device between RHEL8.8 and RHEL9.2/MSI-X) +- Resolves: bz#2156515 + ([guest-agent] Replace '-blacklist' to '-block-rpcs' in qemu-ga config file) + * Wed Jan 04 2023 Miroslav Rezanina - 7.2.0-3 - kvm-hw-arm-virt-Introduce-virt_set_high_memmap-helper.patch [bz#2113840] - kvm-hw-arm-virt-Rename-variable-size-to-region_size-in-v.patch [bz#2113840]