thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-Revert-redhat-Add-some-devices-for-exporting-upstrea.patch

0727d3
From 96edd15df257f1d1496397a6fac24b4316570d7e Mon Sep 17 00:00:00 2001
0727d3
From: Jon Maloy <jmaloy@redhat.com>
0727d3
Date: Thu, 14 Apr 2022 16:45:30 -0400
0727d3
Subject: [PATCH 1/3] Revert redhat: Add some devices for exporting upstream
0727d3
 machine types
0727d3
0727d3
RH-Author: Jon Maloy <jmaloy@redhat.com>
0727d3
RH-MergeRequest: 156: Revert redhat: Add some devices for exporting upstream machine types
0727d3
RH-Commit: [1/1] f25d0da3a181136917ead82f5a5c59efe3fa445a (jmaloy/qemu-kvm)
0727d3
RH-Bugzilla: 2065043
0727d3
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
0727d3
RH-Acked-by: Thomas Huth <thuth@redhat.com>
0727d3
RH-Acked-by: Peter Xu <peterx@redhat.com>
0727d3
0727d3
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2065043
0727d3
Upstream: no
0727d3
0727d3
Manual revert of commit 70d3924521c9bfd912bcf1a1fc76f49eb377de46, since
0727d3
the directory structure looks different from rhel-av-8.4.0.z where
0727d3
this commit is taken from. Besides, x86_64-softmmu.mak looks totally
0727d3
different and should not be affected by this reversal.
0727d3
0727d3
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
0727d3
---
0727d3
 configs/devices/x86_64-softmmu/x86_64-rh-devices.mak     | 1 -
0727d3
 .../devices/x86_64-softmmu/x86_64-upstream-devices.mak   | 4 ----
0727d3
 hw/char/parallel.c                                       | 9 ---------
0727d3
 hw/i386/pc_piix.c                                        | 2 +-
0727d3
 hw/i386/pc_q35.c                                         | 2 +-
0727d3
 hw/timer/hpet.c                                          | 8 --------
0727d3
 6 files changed, 2 insertions(+), 24 deletions(-)
0727d3
 delete mode 100644 configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
0727d3
0727d3
diff --git a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
0727d3
index fdbbdf9742..31ce08edab 100644
0727d3
--- a/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
0727d3
+++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak
0727d3
@@ -1,5 +1,4 @@
0727d3
 include ../rh-virtio.mak
0727d3
-include x86_64-upstream-devices.mak
0727d3
 
0727d3
 CONFIG_AC97=y
0727d3
 CONFIG_ACPI=y
0727d3
diff --git a/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak b/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
0727d3
deleted file mode 100644
0727d3
index 2cd20f54d2..0000000000
0727d3
--- a/configs/devices/x86_64-softmmu/x86_64-upstream-devices.mak
0727d3
+++ /dev/null
0727d3
@@ -1,4 +0,0 @@
0727d3
-# We need "isa-parallel"
0727d3
-CONFIG_PARALLEL=y
0727d3
-# We need "hpet"
0727d3
-CONFIG_HPET=y
0727d3
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
0727d3
index e5f108211b..b45e67bfbb 100644
0727d3
--- a/hw/char/parallel.c
0727d3
+++ b/hw/char/parallel.c
0727d3
@@ -29,7 +29,6 @@
0727d3
 #include "chardev/char-parallel.h"
0727d3
 #include "chardev/char-fe.h"
0727d3
 #include "hw/acpi/aml-build.h"
0727d3
-#include "hw/boards.h"
0727d3
 #include "hw/irq.h"
0727d3
 #include "hw/isa/isa.h"
0727d3
 #include "hw/qdev-properties.h"
0727d3
@@ -535,14 +534,6 @@ static void parallel_isa_realizefn(DeviceState *dev, Error **errp)
0727d3
     int base;
0727d3
     uint8_t dummy;
0727d3
 
0727d3
-    /* Restricted for Red Hat Enterprise Linux */
0727d3
-    MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
0727d3
-    if (strstr(mc->name, "rhel")) {
0727d3
-        error_setg(errp, "Device %s is not supported with machine type %s",
0727d3
-                   object_get_typename(OBJECT(dev)), mc->name);
0727d3
-        return;
0727d3
-    }
0727d3
-
0727d3
     if (!qemu_chr_fe_backend_connected(&s->chr)) {
0727d3
         error_setg(errp, "Can't create parallel device, empty char device");
0727d3
         return;
0727d3
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
0727d3
index ab6d03e07a..5f101c8748 100644
0727d3
--- a/hw/i386/pc_piix.c
0727d3
+++ b/hw/i386/pc_piix.c
0727d3
@@ -966,7 +966,7 @@ static void pc_machine_rhel7_options(MachineClass *m)
0727d3
 {
0727d3
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
0727d3
     m->family = "pc_piix_Y";
0727d3
-    m->default_machine_opts = "firmware=bios-256k.bin,hpet=off";
0727d3
+    m->default_machine_opts = "firmware=bios-256k.bin";
0727d3
     pcmc->default_nic_model = "e1000";
0727d3
     pcmc->pci_root_uid = 0;
0727d3
     m->default_display = "std";
0727d3
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
0727d3
index 882fe7a68d..73b0d0d317 100644
0727d3
--- a/hw/i386/pc_q35.c
0727d3
+++ b/hw/i386/pc_q35.c
0727d3
@@ -633,7 +633,7 @@ static void pc_q35_machine_rhel_options(MachineClass *m)
0727d3
     pcmc->pci_root_uid = 0;
0727d3
     m->family = "pc_q35_Z";
0727d3
     m->units_per_default_bus = 1;
0727d3
-    m->default_machine_opts = "firmware=bios-256k.bin,hpet=off";
0727d3
+    m->default_machine_opts = "firmware=bios-256k.bin";
0727d3
     m->default_display = "std";
0727d3
     m->no_floppy = 1;
0727d3
     m->no_parallel = 1;
0727d3
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
0727d3
index 202e032524..9520471be2 100644
0727d3
--- a/hw/timer/hpet.c
0727d3
+++ b/hw/timer/hpet.c
0727d3
@@ -733,14 +733,6 @@ static void hpet_realize(DeviceState *dev, Error **errp)
0727d3
     int i;
0727d3
     HPETTimer *timer;
0727d3
 
0727d3
-    /* Restricted for Red Hat Enterprise Linux */
0727d3
-    MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
0727d3
-    if (strstr(mc->name, "rhel")) {
0727d3
-        error_setg(errp, "Device %s is not supported with machine type %s",
0727d3
-                   object_get_typename(OBJECT(dev)), mc->name);
0727d3
-        return;
0727d3
-    }
0727d3
-
0727d3
     if (!s->intcap) {
0727d3
         warn_report("Hpet's intcap not initialized");
0727d3
     }
0727d3
-- 
0727d3
2.35.1
0727d3