* Tue May 28 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.0.0-3.el8

- kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch [bz#1709726]
- kvm-compat-Generic-hw_compat_rhel_8_0.patch [bz#1709726]
- kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch [bz#1709726]
- kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch [bz#1709726]
- Resolves: bz#1709726
  (Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'")
This commit is contained in:
Danilo C. L. de Paula 2019-05-28 22:25:31 +01:00
parent 46b360cff9
commit 115fdcbf37
5 changed files with 327 additions and 1 deletions

View File

@ -0,0 +1,79 @@
From f19738e4bf8b9d5fb44ef30042cdad31b92edb22 Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Fri, 24 May 2019 12:13:02 +0100
Subject: [PATCH 2/4] compat: Generic hw_compat_rhel_8_0
RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20190524121304.15530-3-lvivier@redhat.com>
Patchwork-id: 88201
O-Subject: [RHEL-AV qemu-kvm PATCH v4 2/4] compat: Generic hw_compat_rhel_8_0
Bugzilla: 1709726
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/core/machine.c | 30 ++++++++++++++++++++++++++++++
include/hw/boards.h | 3 +++
2 files changed, 33 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index e808151..c4aa354 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -291,6 +291,36 @@ GlobalProperty hw_compat_rhel_7_6[] = {
};
const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6);
+/* The same as hw_compat_3_1
+ * format of array has been changed by:
+ * 6c36bddf5340 ("machine: Use shorter format for GlobalProperty arrays")
+ */
+GlobalProperty hw_compat_rhel_8_0[] = {
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "pcie-root-port", "x-speed", "2_5" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "pcie-root-port", "x-width", "1" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "memory-backend-file", "x-use-canonical-path-for-ramblock-id", "true" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "memory-backend-memfd", "x-use-canonical-path-for-ramblock-id", "true" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "tpm-crb", "ppi", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "tpm-tis", "ppi", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "usb-kbd", "serial", "42" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "usb-mouse", "serial", "42" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "usb-tablet", "serial", "42" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "virtio-blk-device", "discard", "false" },
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
+ { "virtio-blk-device", "write-zeroes", "false" },
+};
+const size_t hw_compat_rhel_8_0_len = G_N_ELEMENTS(hw_compat_rhel_8_0);
+
GlobalProperty hw_compat_3_1[] = {
{ "pcie-root-port", "x-speed", "2_5" },
diff --git a/include/hw/boards.h b/include/hw/boards.h
index b292365..f159e9e 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -337,6 +337,9 @@ extern const size_t hw_compat_2_2_len;
extern GlobalProperty hw_compat_2_1[];
extern const size_t hw_compat_2_1_len;
+extern GlobalProperty hw_compat_rhel_8_0[];
+extern const size_t hw_compat_rhel_8_0_len;
+
extern GlobalProperty hw_compat_rhel_7_6[];
extern const size_t hw_compat_rhel_7_6_len;
--
1.8.3.1

View File

@ -0,0 +1,73 @@
From 89f01dab29d3c9a833c9c36a8f2151b6f97696c7 Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Fri, 24 May 2019 12:13:04 +0100
Subject: [PATCH 4/4] redhat: define pseries-rhel8.1.0 machine type
RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20190524121304.15530-5-lvivier@redhat.com>
Patchwork-id: 88203
O-Subject: [RHEL-AV qemu-kvm PATCH v4 4/4] redhat: define pseries-rhel8.1.0 machine type
Bugzilla: 1709726
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
update pseries-rhel8.0.0 like pseries-3.1 except
for SPAPR_CAP_CFPC, SPAPR_CAP_SBBC, SPAPR_CAP_IBS
that have already been backported.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/ppc/spapr.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 67c9e01..8adcb97 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4670,15 +4670,39 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
#endif
/*
+ * pseries-rhel8.1.0
+ */
+
+static void spapr_machine_rhel810_class_options(MachineClass *mc)
+{
+ /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(rhel810, "rhel8.1.0", true);
+
+/*
* pseries-rhel8.0.0
+ * like spapr_compat_3_1
+ * except SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and SPAPR_CAP_IBS
+ * that have been backported to pseries-rhel8.0.0
*/
static void spapr_machine_rhel800_class_options(MachineClass *mc)
{
- /* Defaults for the latest behaviour inherited from the base class */
+ SpaprMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+ spapr_machine_rhel810_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_0,
+ hw_compat_rhel_8_0_len);
+
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0");
+ smc->update_dt_enabled = false;
+ smc->dr_phb_enabled = false;
+ smc->broken_host_serial_model = true;
+ smc->default_caps.caps[SPAPR_CAP_LARGE_DECREMENTER] = SPAPR_CAP_OFF;
}
-DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", true);
+DEFINE_SPAPR_MACHINE(rhel800, "rhel8.0.0", false);
/*
* pseries-rhel7.6.0
--
1.8.3.1

View File

@ -0,0 +1,104 @@
From 479ad3075d0d2832f5327b917c8279feaae5f6d3 Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Fri, 24 May 2019 12:13:01 +0100
Subject: [PATCH 1/4] redhat: fix cut'n'paste garbage in hw_compat comments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20190524121304.15530-2-lvivier@redhat.com>
Patchwork-id: 88200
O-Subject: [RHEL-AV qemu-kvm PATCH v4 1/4] redhat: fix cut'n'paste garbage in hw_compat comments
Bugzilla: 1709726
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/core/machine.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index fd1594d..e808151 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -25,12 +25,12 @@
#include "hw/mem/nvdimm.h"
/* Mostly like hw_compat_2_1 but:
- * * we don't need virtio-scsi-pci since 7.0 already had that on
- * *
- * * RH: Note, qemu-extended-regs should have been enabled in the 7.1
- * * machine type, but was accidentally turned off in 7.2 onwards.
- * *
- * */
+ * we don't need virtio-scsi-pci since 7.0 already had that on
+ *
+ * RH: Note, qemu-extended-regs should have been enabled in the 7.1
+ * machine type, but was accidentally turned off in 7.2 onwards.
+ *
+ */
GlobalProperty hw_compat_rhel_7_1[] = {
{ /* COMPAT_RHEL7.1 */
.driver = "intel-hda-generic",
@@ -81,8 +81,8 @@ GlobalProperty hw_compat_rhel_7_1[] = {
const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1);
/* Mostly like hw_compat_2_4 + 2_3 but:
- * * we don't need "any_layout" as it has been backported to 7.2
- * */
+ * we don't need "any_layout" as it has been backported to 7.2
+ */
GlobalProperty hw_compat_rhel_7_2[] = {
{
@@ -144,9 +144,9 @@ GlobalProperty hw_compat_rhel_7_2[] = {
const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2);
/* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except
- * * disable-modern, disable-legacy, page-per-vq have already been
- * * backported to RHEL7.3
- * */
+ * disable-modern, disable-legacy, page-per-vq have already been
+ * backported to RHEL7.3
+ */
GlobalProperty hw_compat_rhel_7_3[] = {
{ /* HW_COMPAT_RHEL7_3 */
.driver = "virtio-mmio",
@@ -209,9 +209,9 @@ GlobalProperty hw_compat_rhel_7_3[] = {
const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3);
/* Mostly like hw_compat_2_9 except
- * * x-mtu-bypass-backend, x-migrate-msix has already been
- * * backported to RHEL7.4. shpc was already on in 7.4.
- * */
+ * x-mtu-bypass-backend, x-migrate-msix has already been
+ * backported to RHEL7.4. shpc was already on in 7.4.
+ */
GlobalProperty hw_compat_rhel_7_4[] = {
{ /* HW_COMPAT_RHEL7_4 */
.driver = "intel-iommu",
@@ -261,11 +261,11 @@ GlobalProperty hw_compat_rhel_7_5[] = {
const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5);
/* The same as hw_compat_3_0 + hw_compat_2_12
- * * except that
- * * there's nothing in 3_0
- * * migration.decompress-error-check=off was in 7.5 from bz 1584139
- * *
- * */
+ * except that
+ * there's nothing in 3_0
+ * migration.decompress-error-check=off was in 7.5 from bz 1584139
+ *
+ */
GlobalProperty hw_compat_rhel_7_6[] = {
{ /* HW_COMPAT_RHEL7_6 from HW_COMPAT_2_12 */
.driver = "hda-audio",
--
1.8.3.1

View File

@ -0,0 +1,54 @@
From 2511c637a95e2a5f2a471c03a4dafcb14fbe4db8 Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Fri, 24 May 2019 12:13:03 +0100
Subject: [PATCH 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1
RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20190524121304.15530-4-lvivier@redhat.com>
Patchwork-id: 88199
O-Subject: [RHEL-AV qemu-kvm PATCH v4 3/4] redhat: sync pseries-rhel7.6.0 with rhel-av-8.0.1
Bugzilla: 1709726
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
The default values for SPAPR_CAP_CFPC, SPAPR_CAP_SBBC and
SPAPR_CAP_IBS are SPAPR_CAP_WORKAROUND in pseries-4.0 and
SPAPR_CAP_BROKEN in pseries-3.1, but the change has been
backported to pseries-rhel8.0.0 in rhel-av-8.0.1 so it has
to be reset to SPAPR_CAP_BROKEN in pseries-rhe7.6.0 rather
than in pseries-rhel8.0.0.
This patch also removes default_cpu_type to POWER8 as it will
be set in pseries-rhel8.0.0 (POWER9 appears with pseries-4.0)
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/ppc/spapr.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index daa5920..67c9e01 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4719,8 +4719,14 @@ static void spapr_machine_rhel760_class_options(MachineClass *mc)
* yet. Postpone this to machine init (see default_caps_with_cpu()).
*/
smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE] = 0;
- /* Defaults for the latest behaviour inherited from the base class */
- mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power8_v2.0");
+
+ /* SPAPR_CAP_WORKAROUND enabled in pseries-rhel800 by
+ * f21757edc554
+ * "Enable mitigations by default for pseries-4.0 machine type")
+ */
+ smc->default_caps.caps[SPAPR_CAP_CFPC] = SPAPR_CAP_BROKEN;
+ smc->default_caps.caps[SPAPR_CAP_SBBC] = SPAPR_CAP_BROKEN;
+ smc->default_caps.caps[SPAPR_CAP_IBS] = SPAPR_CAP_BROKEN;
}
DEFINE_SPAPR_MACHINE(rhel760, "rhel7.6.0", false);
--
1.8.3.1

View File

@ -69,7 +69,7 @@ Obsoletes: %1-rhev
Summary: QEMU is a machine emulator and virtualizer
Name: qemu-kvm
Version: 4.0.0
Release: 2%{?dist}
Release: 3%{?dist}
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
Epoch: 15
License: GPLv2 and GPLv2+ and CC-BY
@ -130,6 +130,14 @@ Patch0022: 0022-redhat-Post-rebase-synchronization.patch
# For bz#1703310 - CVE-2018-12127 virt:8.0.0/qemu-kvm: hardware: Micro-architectural Load Port Data Sampling - Information Leak (MLPDS) [rhel-av-8]
# For bz#1707274 - CVE-2019-11091 virt:8.0.0/qemu-kvm: hardware: Microarchitectural Data Sampling Uncacheable Memory (MDSUM) [rhel-av-8.1.0]
Patch23: kvm-target-i386-define-md-clear-bit.patch
# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'"
Patch24: kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch
# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'"
Patch25: kvm-compat-Generic-hw_compat_rhel_8_0.patch
# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'"
Patch26: kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch
# For bz#1709726 - Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'"
Patch27: kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch
BuildRequires: zlib-devel
BuildRequires: glib2-devel
@ -1056,6 +1064,14 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
%changelog
* Tue May 28 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.0.0-3.el8
- kvm-redhat-fix-cut-n-paste-garbage-in-hw_compat-comments.patch [bz#1709726]
- kvm-compat-Generic-hw_compat_rhel_8_0.patch [bz#1709726]
- kvm-redhat-sync-pseries-rhel7.6.0-with-rhel-av-8.0.1.patch [bz#1709726]
- kvm-redhat-define-pseries-rhel8.1.0-machine-type.patch [bz#1709726]
- Resolves: bz#1709726
(Forward and backward migration failed with "qemu-kvm: error while loading state for instance 0x0 of device 'spapr'")
* Sat May 25 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.0.0-2.el8
- kvm-target-i386-define-md-clear-bit.patch [bz#1703297 bz#1703304 bz#1703310 bz#1707274]
- Resolves: bz#1703297