cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
a83cc2
From 224b28d337f36a937b34685519d7b657974a95d0 Mon Sep 17 00:00:00 2001
a83cc2
From: Juan Quintela <quintela@redhat.com>
a83cc2
Date: Tue, 3 Aug 2021 10:46:56 +0200
a83cc2
Subject: [PATCH 04/39] Remove RHEL 7.1.0 machine type
a83cc2
a83cc2
RH-Author: quintela1 <quintela@redhat.com>
a83cc2
RH-MergeRequest: 30: Remove RHEL 7.x.0 machine types
a83cc2
RH-Commit: [2/6] af1d8896d63756d1acc5af8658465808c4a13ca3 (juan.quintela/qemu-kvm)
a83cc2
RH-Bugzilla: 1968519
a83cc2
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
a83cc2
RH-Acked-by: Thomas Huth <thuth@redhat.com>
a83cc2
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
a83cc2
migrate_pre_2_2 was a redhat artifact, removed.
a83cc2
broken_reserved_end is already fixed, nothing to do.
a83cc2
a83cc2
Signed-off-by: Juan Quintela <quintela@redhat.com>
a83cc2
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
a83cc2
---
a83cc2
 hw/char/serial.c      | 12 ----------
a83cc2
 hw/core/machine.c     | 23 -------------------
a83cc2
 hw/i386/pc.c          | 51 -------------------------------------------
a83cc2
 hw/i386/pc_piix.c     | 41 ----------------------------------
a83cc2
 hw/rtc/mc146818rtc.c  |  4 ----
a83cc2
 include/hw/boards.h   |  3 ---
a83cc2
 include/hw/i386/pc.h  |  3 ---
a83cc2
 migration/migration.c |  2 --
a83cc2
 migration/migration.h |  5 -----
a83cc2
 9 files changed, 144 deletions(-)
a83cc2
a83cc2
diff --git a/hw/char/serial.c b/hw/char/serial.c
a83cc2
index cc378142a3..3e4344cb2a 100644
a83cc2
--- a/hw/char/serial.c
a83cc2
+++ b/hw/char/serial.c
a83cc2
@@ -690,9 +690,6 @@ static int serial_post_load(void *opaque, int version_id)
a83cc2
 static bool serial_thr_ipending_needed(void *opaque)
a83cc2
 {
a83cc2
     SerialState *s = opaque;
a83cc2
-    if (migrate_pre_2_2) {
a83cc2
-        return false;
a83cc2
-    }
a83cc2
 
a83cc2
     if (s->ier & UART_IER_THRI) {
a83cc2
         bool expected_value = ((s->iir & UART_IIR_ID) == UART_IIR_THRI);
a83cc2
@@ -774,9 +771,6 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
a83cc2
 static bool serial_fifo_timeout_timer_needed(void *opaque)
a83cc2
 {
a83cc2
     SerialState *s = (SerialState *)opaque;
a83cc2
-    if (migrate_pre_2_2) {
a83cc2
-        return false;
a83cc2
-    }
a83cc2
 
a83cc2
     return timer_pending(s->fifo_timeout_timer);
a83cc2
 }
a83cc2
@@ -795,9 +789,6 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
a83cc2
 static bool serial_timeout_ipending_needed(void *opaque)
a83cc2
 {
a83cc2
     SerialState *s = (SerialState *)opaque;
a83cc2
-    if (migrate_pre_2_2) {
a83cc2
-        return false;
a83cc2
-    }
a83cc2
 
a83cc2
     return s->timeout_ipending != 0;
a83cc2
 }
a83cc2
@@ -816,9 +807,6 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
a83cc2
 static bool serial_poll_needed(void *opaque)
a83cc2
 {
a83cc2
     SerialState *s = (SerialState *)opaque;
a83cc2
-    if (migrate_pre_2_2) {
a83cc2
-        return false;
a83cc2
-    }
a83cc2
 
a83cc2
     return s->poll_msl >= 0;
a83cc2
 }
a83cc2
diff --git a/hw/core/machine.c b/hw/core/machine.c
a83cc2
index 6c534e14fa..cc7c826593 100644
a83cc2
--- a/hw/core/machine.c
a83cc2
+++ b/hw/core/machine.c
a83cc2
@@ -270,29 +270,6 @@ GlobalProperty hw_compat_rhel_7_2[] = {
a83cc2
 };
a83cc2
 const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2);
a83cc2
 
a83cc2
-/* Mostly like hw_compat_2_1 but:
a83cc2
- *    we don't need virtio-scsi-pci since 7.0 already had that on
a83cc2
- *
a83cc2
- * RH: Note, qemu-extended-regs should have been enabled in the 7.1
a83cc2
- * machine type, but was accidentally turned off in 7.2 onwards.
a83cc2
- */
a83cc2
-GlobalProperty hw_compat_rhel_7_1[] = {
a83cc2
-    { "intel-hda-generic", "old_msi_addr", "on" },
a83cc2
-    { "VGA", "qemu-extended-regs", "off" },
a83cc2
-    { "secondary-vga", "qemu-extended-regs", "off" },
a83cc2
-    { "usb-mouse", "usb_version", stringify(1) },
a83cc2
-    { "usb-kbd", "usb_version", stringify(1) },
a83cc2
-    { "virtio-pci",  "virtio-pci-bus-master-bug-migration", "on" },
a83cc2
-    { "virtio-blk-pci", "any_layout", "off" },
a83cc2
-    { "virtio-balloon-pci", "any_layout", "off" },
a83cc2
-    { "virtio-serial-pci", "any_layout", "off" },
a83cc2
-    { "virtio-9p-pci", "any_layout", "off" },
a83cc2
-    { "virtio-rng-pci", "any_layout", "off" },
a83cc2
-    /* HW_COMPAT_RHEL7_1 - introduced with 2.10.0 */
a83cc2
-    { "migration", "send-configuration", "off" },
a83cc2
-};
a83cc2
-const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1);
a83cc2
-
a83cc2
 GlobalProperty hw_compat_5_2[] = {
a83cc2
     { "ICH9-LPC", "smm-compat", "on"},
a83cc2
     { "PIIX4_PM", "smm-compat", "on"},
a83cc2
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
a83cc2
index 516ca50353..3c1f5be4fa 100644
a83cc2
--- a/hw/i386/pc.c
a83cc2
+++ b/hw/i386/pc.c
a83cc2
@@ -541,57 +541,6 @@ GlobalProperty pc_rhel_7_2_compat[] = {
a83cc2
 };
a83cc2
 const size_t pc_rhel_7_2_compat_len = G_N_ELEMENTS(pc_rhel_7_2_compat);
a83cc2
 
a83cc2
-GlobalProperty pc_rhel_7_1_compat[] = {
a83cc2
-    { "kvm64" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "kvm32" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Conroe" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Penryn" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Nehalem-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Westmere" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Westmere-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "SandyBridge-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Haswell" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Haswell-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Broadwell-IBRS" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" },
a83cc2
-    { "Haswell" "-" TYPE_X86_CPU,  "f16c", "off" },
a83cc2
-    { "Haswell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" },
a83cc2
-    { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" },
a83cc2
-    { "Haswell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" },
a83cc2
-    { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" },
a83cc2
-    { "Broadwell-IBRS" "-" TYPE_X86_CPU, "f16c", "off" },
a83cc2
-    { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" },
a83cc2
-    { "Broadwell-IBRS" "-" TYPE_X86_CPU, "rdrand", "off" },
a83cc2
-    { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" },
a83cc2
-    { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" },
a83cc2
-    { "qemu64" "-" TYPE_X86_CPU, "min-level", stringify(4) },
a83cc2
-    { "kvm64" "-" TYPE_X86_CPU, "min-level", stringify(5) },
a83cc2
-    { "pentium3" "-" TYPE_X86_CPU, "min-level", stringify(2) },
a83cc2
-    { "n270" "-" TYPE_X86_CPU, "min-level", stringify(5) },
a83cc2
-    { "Conroe" "-" TYPE_X86_CPU, "min-level", stringify(4) },
a83cc2
-    { "Penryn" "-" TYPE_X86_CPU, "min-level", stringify(4) },
a83cc2
-    { "Nehalem" "-" TYPE_X86_CPU, "min-level", stringify(4) },
a83cc2
-    { "n270" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-    { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", stringify(0x8000000a) },
a83cc2
-};
a83cc2
-const size_t pc_rhel_7_1_compat_len = G_N_ELEMENTS(pc_rhel_7_1_compat);
a83cc2
-
a83cc2
 /*
a83cc2
  * The PC_RHEL_*_COMPAT serve the same purpose for RHEL-7 machine
a83cc2
  * types as the PC_COMPAT_* do for upstream types.
a83cc2
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
a83cc2
index b4e8034671..2a6a28f1e5 100644
a83cc2
--- a/hw/i386/pc_piix.c
a83cc2
+++ b/hw/i386/pc_piix.c
a83cc2
@@ -1075,44 +1075,3 @@ static void pc_machine_rhel720_options(MachineClass *m)
a83cc2
 
a83cc2
 DEFINE_PC_MACHINE(rhel720, "pc-i440fx-rhel7.2.0", pc_init_rhel720,
a83cc2
                   pc_machine_rhel720_options);
a83cc2
-
a83cc2
-static void pc_compat_rhel710(MachineState *machine)
a83cc2
-{
a83cc2
-    PCMachineState *pcms = PC_MACHINE(machine);
a83cc2
-    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
a83cc2
-
a83cc2
-    /* From pc_compat_2_2 */
a83cc2
-    pcmc->rsdp_in_ram = false;
a83cc2
-    machine->suppress_vmdesc = true;
a83cc2
-
a83cc2
-    /* From pc_compat_2_1 */
a83cc2
-    pcmc->smbios_uuid_encoded = false;
a83cc2
-    x86_cpu_change_kvm_default("svm", NULL);
a83cc2
-    pcmc->enforce_aligned_dimm = false;
a83cc2
-
a83cc2
-    /* Disable all the extra subsections that were added in 2.2 */
a83cc2
-    migrate_pre_2_2 = true;
a83cc2
-
a83cc2
-    /* From pc_i440fx_2_4_machine_options */
a83cc2
-    pcmc->broken_reserved_end = true;
a83cc2
-}
a83cc2
-
a83cc2
-static void pc_init_rhel710(MachineState *machine)
a83cc2
-{
a83cc2
-    pc_compat_rhel710(machine);
a83cc2
-    pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
a83cc2
-             TYPE_I440FX_PCI_DEVICE);
a83cc2
-}
a83cc2
-
a83cc2
-static void pc_machine_rhel710_options(MachineClass *m)
a83cc2
-{
a83cc2
-    pc_machine_rhel720_options(m);
a83cc2
-    m->family = "pc_piix_Y";
a83cc2
-    m->desc = "RHEL 7.1.0 PC (i440FX + PIIX, 1996)";
a83cc2
-    m->default_display = "cirrus";
a83cc2
-    compat_props_add(m->compat_props, hw_compat_rhel_7_1, hw_compat_rhel_7_1_len);
a83cc2
-    compat_props_add(m->compat_props, pc_rhel_7_1_compat, pc_rhel_7_1_compat_len);
a83cc2
-}
a83cc2
-
a83cc2
-DEFINE_PC_MACHINE(rhel710, "pc-i440fx-rhel7.1.0", pc_init_rhel710,
a83cc2
-                  pc_machine_rhel710_options);
a83cc2
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
a83cc2
index 4a2e52031b..3a70a988e1 100644
a83cc2
--- a/hw/rtc/mc146818rtc.c
a83cc2
+++ b/hw/rtc/mc146818rtc.c
a83cc2
@@ -824,10 +824,6 @@ static bool rtc_irq_reinject_on_ack_count_needed(void *opaque)
a83cc2
 {
a83cc2
     RTCState *s = (RTCState *)opaque;
a83cc2
 
a83cc2
-    if (migrate_pre_2_2) {
a83cc2
-        return false;
a83cc2
-    }
a83cc2
-
a83cc2
     return s->irq_reinject_on_ack_count != 0;
a83cc2
 }
a83cc2
 
a83cc2
diff --git a/include/hw/boards.h b/include/hw/boards.h
a83cc2
index 90ae100bfc..070db0b9b1 100644
a83cc2
--- a/include/hw/boards.h
a83cc2
+++ b/include/hw/boards.h
a83cc2
@@ -445,7 +445,4 @@ extern const size_t hw_compat_rhel_7_3_len;
a83cc2
 extern GlobalProperty hw_compat_rhel_7_2[];
a83cc2
 extern const size_t hw_compat_rhel_7_2_len;
a83cc2
 
a83cc2
-extern GlobalProperty hw_compat_rhel_7_1[];
a83cc2
-extern const size_t hw_compat_rhel_7_1_len;
a83cc2
-
a83cc2
 #endif
a83cc2
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
a83cc2
index 2d17daf71f..84d985f57c 100644
a83cc2
--- a/include/hw/i386/pc.h
a83cc2
+++ b/include/hw/i386/pc.h
a83cc2
@@ -311,9 +311,6 @@ extern const size_t pc_rhel_7_3_compat_len;
a83cc2
 extern GlobalProperty pc_rhel_7_2_compat[];
a83cc2
 extern const size_t pc_rhel_7_2_compat_len;
a83cc2
 
a83cc2
-extern GlobalProperty pc_rhel_7_1_compat[];
a83cc2
-extern const size_t pc_rhel_7_1_compat_len;
a83cc2
-
a83cc2
 /* Helper for setting model-id for CPU models that changed model-id
a83cc2
  * depending on QEMU versions up to QEMU 2.4.
a83cc2
  */
a83cc2
diff --git a/migration/migration.c b/migration/migration.c
a83cc2
index 9d185f0e28..9cf1cde39d 100644
a83cc2
--- a/migration/migration.c
a83cc2
+++ b/migration/migration.c
a83cc2
@@ -167,8 +167,6 @@ INITIALIZE_MIGRATE_CAPS_SET(check_caps_background_snapshot,
a83cc2
     MIGRATION_CAPABILITY_X_COLO,
a83cc2
     MIGRATION_CAPABILITY_VALIDATE_UUID);
a83cc2
 
a83cc2
-bool migrate_pre_2_2;
a83cc2
-
a83cc2
 /* When we add fault tolerance, we could have several
a83cc2
    migrations at once.  For now we don't need to add
a83cc2
    dynamic creation of migration */
a83cc2
diff --git a/migration/migration.h b/migration/migration.h
a83cc2
index 1b6c69751c..db6708326b 100644
a83cc2
--- a/migration/migration.h
a83cc2
+++ b/migration/migration.h
a83cc2
@@ -368,11 +368,6 @@ bool check_dirty_bitmap_mig_alias_map(const BitmapMigrationNodeAliasList *bbm,
a83cc2
 void migrate_add_address(SocketAddress *address);
a83cc2
 
a83cc2
 int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque);
a83cc2
-/*
a83cc2
- * Disables a load of subsections that were added in 2.2/rh7.2 for backwards
a83cc2
- * migration compatibility.
a83cc2
- */
a83cc2
-extern bool migrate_pre_2_2;
a83cc2
 
a83cc2
 #define qemu_ram_foreach_block \
a83cc2
   #warning "Use foreach_not_ignored_block in migration code"
a83cc2
-- 
a83cc2
2.27.0
a83cc2