From 4fa7a78aa900988816d07034943be384d57117f0 Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Tue, 3 Aug 2021 10:24:56 +0200
Subject: [PATCH 03/39] Remove RHEL 7.0.0 machine type
RH-Author: quintela1 <quintela@redhat.com>
RH-MergeRequest: 30: Remove RHEL 7.x.0 machine types
RH-Commit: [1/6] f182af372d3c38c3c1960af0d5cd37aba7205848 (juan.quintela/qemu-kvm)
RH-Bugzilla: 1968519
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
Everything is used elsewhere except for cve_2014_5263 fields. Remove those.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
hw/i386/pc.c | 35 -----------------------------------
hw/i386/pc_piix.c | 34 ----------------------------------
hw/usb/hcd-xhci.c | 20 --------------------
hw/usb/hcd-xhci.h | 2 --
include/hw/i386/pc.h | 3 ---
include/hw/usb.h | 3 ---
6 files changed, 97 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index cdbfa84d2e..516ca50353 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -598,41 +598,6 @@ const size_t pc_rhel_7_1_compat_len = G_N_ELEMENTS(pc_rhel_7_1_compat);
* PC_RHEL_7_*_COMPAT apply both to i440fx and q35 types.
*/
-/*
- * RHEL-7 is based on QEMU 1.5.3, so this needs the PC_COMPAT_*
- * between our base and 1.5, less stuff backported to RHEL-7.0
- * (usb-device.msos-desc), less stuff for devices we changed
- * (qemu64-x86_64-cpu) or don't support (hpet, pci-serial-2x,
- * pci-serial-4x) in 7.0.
- */
-GlobalProperty pc_rhel_7_0_compat[] = {
- { "virtio-scsi-pci", "any_layout", "off" },
- { "PIIX4_PM", "memory-hotplug-support", "off" },
- { "apic", "version", stringify(0x11) },
- { "nec-usb-xhci", "superspeed-ports-first", "off" },
- { "nec-usb-xhci", "force-pcie-endcap", "on" },
- { "pci-serial", "prog_if", stringify(0) },
- { "virtio-net-pci", "guest_announce", "off" },
- { "ICH9-LPC", "memory-hotplug-support", "off" },
- { "xio3130-downstream", COMPAT_PROP_PCP, "off" },
- { "ioh3420", COMPAT_PROP_PCP, "off" },
- { "PIIX4_PM", "acpi-pci-hotplug-with-bridge-support", "off" },
- { "e1000", "mitigation", "off" },
- { "virtio-net-pci", "ctrl_guest_offloads", "off" },
- { "Conroe" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Penryn" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Nehalem" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Nehalem-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Westmere" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Westmere-IBRS" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Opteron_G1" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Opteron_G2" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Opteron_G3" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Opteron_G4" "-" TYPE_X86_CPU, "x2apic", "on" },
- { "Opteron_G5" "-" TYPE_X86_CPU, "x2apic", "on" },
-};
-const size_t pc_rhel_7_0_compat_len = G_N_ELEMENTS(pc_rhel_7_0_compat);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 5d61c9b833..b4e8034671 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1116,37 +1116,3 @@ static void pc_machine_rhel710_options(MachineClass *m)
DEFINE_PC_MACHINE(rhel710, "pc-i440fx-rhel7.1.0", pc_init_rhel710,
pc_machine_rhel710_options);
-
-static void pc_compat_rhel700(MachineState *machine)
-{
- PCMachineState *pcms = PC_MACHINE(machine);
- PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
-
- pc_compat_rhel710(machine);
-
- /* Upstream enables it for everyone, we're a little more selective */
- x86_cpu_change_kvm_default("x2apic", NULL);
- x86_cpu_change_kvm_default("svm", NULL);
- pcmc->legacy_acpi_table_size = 6418; /* see pc_compat_2_0() */
- pcmc->smbios_legacy_mode = true;
- pcmc->has_reserved_memory = false;
- migrate_cve_2014_5263_xhci_fields = true;
-}
-
-static void pc_init_rhel700(MachineState *machine)
-{
- pc_compat_rhel700(machine);
- pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
- TYPE_I440FX_PCI_DEVICE);
-}
-
-static void pc_machine_rhel700_options(MachineClass *m)
-{
- pc_machine_rhel710_options(m);
- m->family = "pc_piix_Y";
- m->desc = "RHEL 7.0.0 PC (i440FX + PIIX, 1996)";
- compat_props_add(m->compat_props, pc_rhel_7_0_compat, pc_rhel_7_0_compat_len);
-}
-
-DEFINE_PC_MACHINE(rhel700, "pc-i440fx-rhel7.0.0", pc_init_rhel700,
- pc_machine_rhel700_options);
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 6d1f278aad..46212b1e69 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3490,27 +3490,9 @@ static const VMStateDescription vmstate_xhci_slot = {
}
};
-static int xhci_event_pre_save(void *opaque)
-{
- XHCIEvent *s = opaque;
-
- s->cve_2014_5263_a = ((uint8_t *)&s->type)[0];
- s->cve_2014_5263_b = ((uint8_t *)&s->type)[1];
-
- return 0;
-}
-
-bool migrate_cve_2014_5263_xhci_fields;
-
-static bool xhci_event_cve_2014_5263(void *opaque, int version_id)
-{
- return migrate_cve_2014_5263_xhci_fields;
-}
-
static const VMStateDescription vmstate_xhci_event = {
.name = "xhci-event",
.version_id = 1,
- .pre_save = xhci_event_pre_save,
.fields = (VMStateField[]) {
VMSTATE_UINT32(type, XHCIEvent),
VMSTATE_UINT32(ccode, XHCIEvent),
@@ -3519,8 +3501,6 @@ static const VMStateDescription vmstate_xhci_event = {
VMSTATE_UINT32(flags, XHCIEvent),
VMSTATE_UINT8(slotid, XHCIEvent),
VMSTATE_UINT8(epid, XHCIEvent),
- VMSTATE_UINT8_TEST(cve_2014_5263_a, XHCIEvent, xhci_event_cve_2014_5263),
- VMSTATE_UINT8_TEST(cve_2014_5263_b, XHCIEvent, xhci_event_cve_2014_5263),
VMSTATE_END_OF_LIST()
}
};
diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h
index f450ffd13b..7bba361f3b 100644
--- a/hw/usb/hcd-xhci.h
+++ b/hw/usb/hcd-xhci.h
@@ -149,8 +149,6 @@ typedef struct XHCIEvent {
uint32_t flags;
uint8_t slotid;
uint8_t epid;
- uint8_t cve_2014_5263_a;
- uint8_t cve_2014_5263_b;
} XHCIEvent;
typedef struct XHCIInterrupter {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 1980c93f41..2d17daf71f 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -314,9 +314,6 @@ extern const size_t pc_rhel_7_2_compat_len;
extern GlobalProperty pc_rhel_7_1_compat[];
extern const size_t pc_rhel_7_1_compat_len;
-extern GlobalProperty pc_rhel_7_0_compat[];
-extern const size_t pc_rhel_7_0_compat_len;
-
/* Helper for setting model-id for CPU models that changed model-id
* depending on QEMU versions up to QEMU 2.4.
*/
diff --git a/include/hw/usb.h b/include/hw/usb.h
index edb2cd94b6..436e07b304 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -577,7 +577,4 @@ void usb_pcap_init(FILE *fp);
void usb_pcap_ctrl(USBPacket *p, bool setup);
void usb_pcap_data(USBPacket *p, bool setup);
-/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
-extern bool migrate_cve_2014_5263_xhci_fields;
-
#endif
--
2.27.0