* Mon Jan 10 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-3

- kvm-hw-arm-virt-Register-iommu-as-a-class-property.patch [bz#2031044]
- kvm-hw-arm-virt-Register-its-as-a-class-property.patch [bz#2031044]
- kvm-hw-arm-virt-Rename-default_bus_bypass_iommu.patch [bz#2031044]
- kvm-hw-arm-virt-Expose-the-RAS-option.patch [bz#2031044]
- kvm-hw-arm-virt-Add-9.0-machine-type-and-remove-8.5-one.patch [bz#2031044]
- kvm-hw-arm-virt-Check-no_tcg_its-and-minor-style-changes.patch [bz#2031044]
- Resolves: bz#2031044
  (Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64])
This commit is contained in:
Miroslav Rezanina 2022-01-10 02:27:30 -05:00
parent 34dbcea312
commit e9000b6628
7 changed files with 403 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From 6b0e129f0758ccd076d1ecbf85c8f1e863788981 Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Mon, 20 Dec 2021 10:11:47 +0100
Subject: [PATCH 5/6] hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [5/6] f573a2fb44882a010e2c6bf5f561f29d54e6e9b5 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
Add 9.0 machine type and remove 8.5 one.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d433139479..d537706a86 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3236,14 +3236,8 @@ static void rhel_machine_init(void)
}
type_init(rhel_machine_init);
-static void rhel850_virt_options(MachineClass *mc)
+static void rhel900_virt_options(MachineClass *mc)
{
- VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
-
compat_props_add(mc->compat_props, arm_rhel_compat, arm_rhel_compat_len);
- compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len);
- mc->smp_props.prefer_sockets = true;
- vmc->no_cpu_topology = true;
- vmc->no_tcg_its = true;
}
-DEFINE_RHEL_MACHINE_AS_LATEST(8, 5, 0)
+DEFINE_RHEL_MACHINE_AS_LATEST(9, 0, 0)
--
2.27.0

View File

@ -0,0 +1,88 @@
From 4098f7b5aea8871a655bab43d5114d067662e6c5 Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Wed, 5 Jan 2022 16:17:10 +0100
Subject: [PATCH 6/6] hw/arm/virt: Check no_tcg_its and minor style changes
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [6/6] 4480d569463fd3f637404539d3bd06b59cafbc88 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
Truly allow TCG ITS instantiation according to the no_tcg_its
class flag. Otherwise it is always set to false.
We also take benefit of this patch to do some minor non
functional style changes to be closer to the upstream code.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d537706a86..0e691cbe81 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3163,6 +3163,7 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"in ACPI table header."
"The string may be up to 6 bytes in size");
+
object_class_property_add_str(oc, "x-oem-table-id",
virt_get_oem_table_id,
virt_set_oem_table_id);
@@ -3170,6 +3171,7 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Override the default value of field OEM Table ID "
"in ACPI table header."
"The string may be up to 8 bytes in size");
+
}
static void rhel_virt_instance_init(Object *obj)
@@ -3194,26 +3196,32 @@ static void rhel_virt_instance_init(Object *obj)
} else {
/* Default allows ITS instantiation */
vms->its = true;
+
+ if (vmc->no_tcg_its) {
+ vms->tcg_its = false;
+ } else {
+ vms->tcg_its = true;
+ }
}
/* Default disallows iommu instantiation */
vms->iommu = VIRT_IOMMU_NONE;
+ /* The default root bus is attached to iommu by default */
+ vms->default_bus_bypass_iommu = false;
+
/* Default disallows RAS instantiation and is non-configurable for RHEL */
vms->ras = false;
/* MTE is disabled by default and non-configurable for RHEL */
vms->mte = false;
- /* The default root bus is attached to iommu by default */
- vms->default_bus_bypass_iommu = false;
-
vms->irqmap = a15irqmap;
virt_flash_create(vms);
+
vms->oem_id = g_strndup(ACPI_BUILD_APPNAME6, 6);
vms->oem_table_id = g_strndup(ACPI_BUILD_APPNAME8, 8);
-
}
static const TypeInfo rhel_machine_info = {
--
2.27.0

View File

@ -0,0 +1,60 @@
From 914d9f9eea5d0a944aa93682b03d3189ad37ec9b Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Mon, 20 Dec 2021 15:34:22 +0100
Subject: [PATCH 4/6] hw/arm/virt: Expose the 'RAS' option
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [4/6] c8704564d31b23a0f08a6ced946c9a81e2e72c11 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
In RHEL9.0 we want to expose the 'RAS' option.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index c99ca93e75..d433139479 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2348,7 +2348,6 @@ static void virt_set_acpi(Object *obj, Visitor *v, const char *name,
visit_type_OnOffAuto(v, name, &vms->acpi, errp);
}
-#if 0 /* Disabled for Red Hat Enterprise Linux */
static bool virt_get_ras(Object *obj, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -2363,6 +2362,7 @@ static void virt_set_ras(Object *obj, bool value, Error **errp)
vms->ras = value;
}
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static bool virt_get_mte(Object *obj, Error **errp)
{
VirtMachineState *vms = VIRT_MACHINE(obj);
@@ -3143,6 +3143,12 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Set on/off to enable/disable "
"bypass_iommu for default root bus");
+ object_class_property_add_bool(oc, "ras", virt_get_ras,
+ virt_set_ras);
+ object_class_property_set_description(oc, "ras",
+ "Set on/off to enable/disable reporting host memory errors "
+ "to a KVM guest using ACPI and guest external abort exceptions");
+
object_class_property_add_bool(oc, "its", virt_get_its,
virt_set_its);
object_class_property_set_description(oc, "its",
--
2.27.0

View File

@ -0,0 +1,81 @@
From 545076d67ef27203e08538123d8bc3798caf9505 Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Mon, 20 Dec 2021 15:50:44 +0100
Subject: [PATCH 1/6] hw/arm/virt: Register "iommu" as a class property
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [1/6] 2b6a22ebddd2da7505961ff4ffe90424f7489300 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
Register the "iommu" option as a class property. This mirrors what
was done in upstream commit b91def7b ("arm/virt: Register
most properties as class properties").
While we are at it we also move the "x-oem-id" and "x-oem-table-id"
registrations at the very end of the rhel_machine_class_init()
function. This makes our life easier when comparing with upstream.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 6ba9a2c2e1..7e227b1fa4 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3131,6 +3131,18 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Set GIC version. "
"Valid values are 2, 3, host and max");
+ object_class_property_add_str(oc, "iommu", virt_get_iommu, virt_set_iommu);
+ object_class_property_set_description(oc, "iommu",
+ "Set the IOMMU type. "
+ "Valid values are none and smmuv3");
+
+ object_class_property_add_bool(oc, "default_bus_bypass_iommu",
+ virt_get_default_bus_bypass_iommu,
+ virt_set_default_bus_bypass_iommu);
+ object_class_property_set_description(oc, "default_bus_bypass_iommu",
+ "Set on/off to enable/disable "
+ "bypass_iommu for default root bus");
+
object_class_property_add_str(oc, "x-oem-id",
virt_get_oem_id,
virt_set_oem_id);
@@ -3146,13 +3158,6 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Override the default value of field OEM Table ID "
"in ACPI table header."
"The string may be up to 8 bytes in size");
- object_class_property_add_bool(oc, "default_bus_bypass_iommu",
- virt_get_default_bus_bypass_iommu,
- virt_set_default_bus_bypass_iommu);
- object_class_property_set_description(oc, "default_bus_bypass_iommu",
- "Set on/off to enable/disable "
- "bypass_iommu for default root bus");
-
}
static void rhel_virt_instance_init(Object *obj)
@@ -3186,10 +3191,6 @@ static void rhel_virt_instance_init(Object *obj)
/* Default disallows iommu instantiation */
vms->iommu = VIRT_IOMMU_NONE;
- object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu);
- object_property_set_description(obj, "iommu",
- "Set the IOMMU type. "
- "Valid values are none and smmuv3");
/* Default disallows RAS instantiation and is non-configurable for RHEL */
vms->ras = false;
--
2.27.0

View File

@ -0,0 +1,57 @@
From 789933e2598f9a525c2a638feca974ca1730a859 Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Mon, 20 Dec 2021 16:04:59 +0100
Subject: [PATCH 2/6] hw/arm/virt: Register "its" as a class property
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [2/6] dbd3e994553f00cd19842824f6bd763863a4e484 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
Register "its" as a class property. This mirrors what was done
in commit 27edeeaafe43 ("virt: Register "its" as class property").
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 7e227b1fa4..984151b7dd 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3143,6 +3143,12 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Set on/off to enable/disable "
"bypass_iommu for default root bus");
+ object_class_property_add_bool(oc, "its", virt_get_its,
+ virt_set_its);
+ object_class_property_set_description(oc, "its",
+ "Set on/off to enable/disable "
+ "ITS instantiation");
+
object_class_property_add_str(oc, "x-oem-id",
virt_get_oem_id,
virt_set_oem_id);
@@ -3182,11 +3188,6 @@ static void rhel_virt_instance_init(Object *obj)
} else {
/* Default allows ITS instantiation */
vms->its = true;
- object_property_add_bool(obj, "its", virt_get_its,
- virt_set_its);
- object_property_set_description(obj, "its",
- "Set on/off to enable/disable "
- "ITS instantiation");
}
/* Default disallows iommu instantiation */
--
2.27.0

View File

@ -0,0 +1,46 @@
From 94987c271c3bdc37216c5baa4c5766b9b7f053a1 Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Mon, 20 Dec 2021 15:58:38 +0100
Subject: [PATCH 3/6] hw/arm/virt: Rename default_bus_bypass_iommu
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 57: hw/arm/virt: Add 9.0 machine type and remove 8.5 one
RH-Commit: [3/6] 6b66844ae4629d8c879f7c6abbc5e5017a162e16 (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2031044
RH-Acked-by: Gavin Shan <gshan@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
branch: c9s
Brew: 42213566
Upstream: no
Rename "default_bus_bypass_iommu" into "default-bus-bypass-iommu".
This mirrors what was done in upstream commit:
9dad363a223 ("hw/arm/virt: Rename default_bus_bypass_iommu")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/virt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 984151b7dd..c99ca93e75 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -3136,10 +3136,10 @@ static void rhel_machine_class_init(ObjectClass *oc, void *data)
"Set the IOMMU type. "
"Valid values are none and smmuv3");
- object_class_property_add_bool(oc, "default_bus_bypass_iommu",
+ object_class_property_add_bool(oc, "default-bus-bypass-iommu",
virt_get_default_bus_bypass_iommu,
virt_set_default_bus_bypass_iommu);
- object_class_property_set_description(oc, "default_bus_bypass_iommu",
+ object_class_property_set_description(oc, "default-bus-bypass-iommu",
"Set on/off to enable/disable "
"bypass_iommu for default root bus");
--
2.27.0

View File

@ -130,7 +130,7 @@ Obsoletes: %{name}-block-iscsi <= %{version} \
Summary: QEMU is a machine emulator and virtualizer
Name: qemu-kvm
Version: 6.2.0
Release: 2%{?rcrel}%{?dist}%{?cc_suffix}
Release: 3%{?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)
@ -181,6 +181,18 @@ Patch0025: 0025-compat-Update-hw_compat_rhel_8_5-with-6.2.0-RC2-chan.patch
Patch26: kvm-redhat-Add-rhel8.6.0-and-rhel9.0.0-machine-types-for.patch
# For bz#2014484 - [RHEL9] Enable virtio-mem as tech-preview on x86-64 - QEMU
Patch27: kvm-redhat-Enable-virtio-mem-as-tech-preview-on-x86-64.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch28: kvm-hw-arm-virt-Register-iommu-as-a-class-property.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch29: kvm-hw-arm-virt-Register-its-as-a-class-property.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch30: kvm-hw-arm-virt-Rename-default_bus_bypass_iommu.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch31: kvm-hw-arm-virt-Expose-the-RAS-option.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch32: kvm-hw-arm-virt-Add-9.0-machine-type-and-remove-8.5-one.patch
# For bz#2031044 - Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64]
Patch33: kvm-hw-arm-virt-Check-no_tcg_its-and-minor-style-changes.patch
%if %{have_clang}
BuildRequires: clang
@ -1159,6 +1171,16 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
%endif
%changelog
* Mon Jan 10 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-3
- kvm-hw-arm-virt-Register-iommu-as-a-class-property.patch [bz#2031044]
- kvm-hw-arm-virt-Register-its-as-a-class-property.patch [bz#2031044]
- kvm-hw-arm-virt-Rename-default_bus_bypass_iommu.patch [bz#2031044]
- kvm-hw-arm-virt-Expose-the-RAS-option.patch [bz#2031044]
- kvm-hw-arm-virt-Add-9.0-machine-type-and-remove-8.5-one.patch [bz#2031044]
- kvm-hw-arm-virt-Check-no_tcg_its-and-minor-style-changes.patch [bz#2031044]
- Resolves: bz#2031044
(Add rhel-9.0.0 machine types for RHEL 9.0 [aarch64])
* Fri Jan 07 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-2
- kvm-redhat-Add-rhel8.6.0-and-rhel9.0.0-machine-types-for.patch [bz#2008060]
- kvm-redhat-Enable-virtio-mem-as-tech-preview-on-x86-64.patch [bz#2014484]