thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-hw-arm-virt-Check-no_tcg_its-and-minor-style-changes.patch

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