2021-12-16 07:06:10 +00:00
|
|
|
From afe0cbc5cdb98998b37cf48e9a1c87a110d9fbb3 Mon Sep 17 00:00:00 2001
|
2018-11-08 17:02:33 +00:00
|
|
|
From: Miroslav Rezanina <mrezanin@redhat.com>
|
2018-11-29 12:09:34 +00:00
|
|
|
Date: Fri, 19 Oct 2018 13:10:31 +0200
|
2018-11-08 17:02:33 +00:00
|
|
|
Subject: Add x86_64 machine types
|
|
|
|
|
|
|
|
Adding changes to add RHEL machine types for x86_64 architecture.
|
|
|
|
|
|
|
|
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
2021-09-02 06:44:51 +00:00
|
|
|
|
2021-12-16 07:06:10 +00:00
|
|
|
Rebase notes (6.1.0):
|
2021-09-02 06:44:51 +00:00
|
|
|
- Update qemu64 cpu spec
|
|
|
|
|
2021-12-16 07:06:10 +00:00
|
|
|
Merged patches (6.1.0):
|
2021-09-02 06:44:51 +00:00
|
|
|
- 59c284ad3b x86: Add x86 rhel8.5 machine types
|
|
|
|
- a8868b42fe redhat: x86: Enable 'kvm-asyncpf-int' by default
|
|
|
|
- a3995e2eff Remove RHEL 7.0.0 machine type (only x86_64 changes)
|
|
|
|
- ad3190a79b Remove RHEL 7.1.0 machine type (only x86_64 changes)
|
|
|
|
- 84bbe15d4e Remove RHEL 7.2.0 machine type (only x86_64 changes)
|
|
|
|
- 0215eb3356 Remove RHEL 7.3.0 machine types (only x86_64 changes)
|
|
|
|
- af69d1ca6e Remove RHEL 7.4.0 machine types (only x86_64 changes)
|
|
|
|
- 8f7a74ab78 Remove RHEL 7.5.0 machine types (only x86_64 changes)
|
2018-11-08 17:02:33 +00:00
|
|
|
---
|
2021-09-02 06:44:51 +00:00
|
|
|
hw/i386/pc.c | 114 +++++++++++++++++++++++-
|
|
|
|
hw/i386/pc_piix.c | 68 +++++++++++++-
|
|
|
|
hw/i386/pc_q35.c | 177 ++++++++++++++++++++++++++++++++++++-
|
2021-04-30 07:28:51 +00:00
|
|
|
include/hw/boards.h | 2 +
|
2021-09-02 06:44:51 +00:00
|
|
|
include/hw/i386/pc.h | 21 +++++
|
|
|
|
target/i386/kvm/kvm-cpu.c | 1 +
|
2021-04-30 07:28:51 +00:00
|
|
|
target/i386/kvm/kvm.c | 4 +
|
|
|
|
tests/qtest/pvpanic-test.c | 5 +-
|
2021-09-02 06:44:51 +00:00
|
|
|
8 files changed, 385 insertions(+), 7 deletions(-)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
|
2021-12-16 07:06:10 +00:00
|
|
|
index a2ef40ecbc..b6d2db8d04 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/i386/pc.c
|
|
|
|
+++ b/hw/i386/pc.c
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -371,6 +371,116 @@ GlobalProperty pc_compat_1_4[] = {
|
2019-05-07 21:00:36 +00:00
|
|
|
};
|
|
|
|
const size_t pc_compat_1_4_len = G_N_ELEMENTS(pc_compat_1_4);
|
|
|
|
|
|
|
|
+/* This macro is for changes to properties that are RHEL specific,
|
|
|
|
+ * different to the current upstream and to be applied to the latest
|
|
|
|
+ * machine type.
|
|
|
|
+ */
|
|
|
|
+GlobalProperty pc_rhel_compat[] = {
|
2019-08-15 04:45:41 +00:00
|
|
|
+ { TYPE_X86_CPU, "host-phys-bits", "on" },
|
|
|
|
+ { TYPE_X86_CPU, "host-phys-bits-limit", "48" },
|
2020-05-13 01:03:43 +00:00
|
|
|
+ { TYPE_X86_CPU, "vmx-entry-load-perf-global-ctrl", "off" },
|
|
|
|
+ { TYPE_X86_CPU, "vmx-exit-load-perf-global-ctrl", "off" },
|
2019-08-15 04:45:41 +00:00
|
|
|
+ /* bz 1508330 */
|
|
|
|
+ { "vfio-pci", "x-no-geforce-quirks", "on" },
|
2021-09-02 06:44:51 +00:00
|
|
|
+ /* bz 1941397 */
|
|
|
|
+ { TYPE_X86_CPU, "kvm-asyncpf-int", "on" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_compat_len = G_N_ELEMENTS(pc_rhel_compat);
|
|
|
|
+
|
2021-09-02 06:44:51 +00:00
|
|
|
+GlobalProperty pc_rhel_8_4_compat[] = {
|
|
|
|
+ /* pc_rhel_8_4_compat from pc_compat_5_2 */
|
|
|
|
+ { "ICH9-LPC", "x-smi-cpu-hotunplug", "off" },
|
|
|
|
+ { TYPE_X86_CPU, "kvm-asyncpf-int", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_8_4_compat_len = G_N_ELEMENTS(pc_rhel_8_4_compat);
|
|
|
|
+
|
2021-04-30 07:28:51 +00:00
|
|
|
+GlobalProperty pc_rhel_8_3_compat[] = {
|
|
|
|
+ /* pc_rhel_8_3_compat from pc_compat_5_1 */
|
|
|
|
+ { "ICH9-LPC", "x-smi-cpu-hotplug", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_8_3_compat_len = G_N_ELEMENTS(pc_rhel_8_3_compat);
|
|
|
|
+
|
2020-11-13 13:09:35 +00:00
|
|
|
+GlobalProperty pc_rhel_8_2_compat[] = {
|
|
|
|
+ /* pc_rhel_8_2_compat from pc_compat_4_2 */
|
|
|
|
+ { "mch", "smbase-smram", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_8_2_compat_len = G_N_ELEMENTS(pc_rhel_8_2_compat);
|
|
|
|
+
|
2019-12-13 13:10:42 +00:00
|
|
|
+/* pc_rhel_8_1_compat is empty since pc_4_1_compat is */
|
|
|
|
+GlobalProperty pc_rhel_8_1_compat[] = { };
|
|
|
|
+const size_t pc_rhel_8_1_compat_len = G_N_ELEMENTS(pc_rhel_8_1_compat);
|
|
|
|
+
|
2019-11-15 14:35:04 +00:00
|
|
|
+GlobalProperty pc_rhel_8_0_compat[] = {
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "intel-iommu", "dma-drain", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G3" "-" TYPE_X86_CPU, "rdtscp", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G4" "-" TYPE_X86_CPU, "rdtscp", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G4" "-" TYPE_X86_CPU, "npt", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G4" "-" TYPE_X86_CPU, "nrip-save", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G5" "-" TYPE_X86_CPU, "rdtscp", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G5" "-" TYPE_X86_CPU, "npt", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Opteron_G5" "-" TYPE_X86_CPU, "nrip-save", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "EPYC" "-" TYPE_X86_CPU, "npt", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "EPYC" "-" TYPE_X86_CPU, "nrip-save", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "EPYC-IBPB" "-" TYPE_X86_CPU, "npt", "off" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "EPYC-IBPB" "-" TYPE_X86_CPU, "nrip-save", "off" },
|
|
|
|
+ /** The mpx=on entries from pc_compat_3_1 are in pc_rhel_7_6_compat **/
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { "Cascadelake-Server" "-" TYPE_X86_CPU, "stepping", "5" },
|
|
|
|
+ /* pc_rhel_8_0_compat from pc_compat_3_1 */
|
|
|
|
+ { TYPE_X86_CPU, "x-intel-pt-auto-level", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_8_0_compat_len = G_N_ELEMENTS(pc_rhel_8_0_compat);
|
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+/* Similar to PC_COMPAT_3_0 + PC_COMPAT_2_12, but:
|
|
|
|
+ * all of the 2_12 stuff was already in 7.6 from bz 1481253
|
|
|
|
+ * x-migrate-smi-count comes from PC_COMPAT_2_11 but
|
|
|
|
+ * is really tied to kernel version so keep it off on 7.x
|
|
|
|
+ * machine types irrespective of host.
|
|
|
|
+ */
|
|
|
|
+GlobalProperty pc_rhel_7_6_compat[] = {
|
2019-08-15 04:45:41 +00:00
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_3_0 */
|
|
|
|
+ { TYPE_X86_CPU, "x-hv-synic-kvm-only", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_3_0 */
|
|
|
|
+ { "Skylake-Server" "-" TYPE_X86_CPU, "pku", "off" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_3_0 */
|
|
|
|
+ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "pku", "off" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { TYPE_X86_CPU, "x-migrate-smi-count", "off" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Skylake-Client" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Skylake-Client-IBRS" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Skylake-Server" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Skylake-Server-IBRS" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Cascadelake-Server" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Icelake-Client" "-" TYPE_X86_CPU, "mpx", "on" },
|
|
|
|
+ /* pc_rhel_7_6_compat from pc_compat_2_11 */
|
|
|
|
+ { "Icelake-Server" "-" TYPE_X86_CPU, "mpx", "on" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
|
|
|
+const size_t pc_rhel_7_6_compat_len = G_N_ELEMENTS(pc_rhel_7_6_compat);
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * The PC_RHEL_*_COMPAT serve the same purpose for RHEL-7 machine
|
|
|
|
+ * types as the PC_COMPAT_* do for upstream types.
|
|
|
|
+ * PC_RHEL_7_*_COMPAT apply both to i440fx and q35 types.
|
|
|
|
+ */
|
|
|
|
+
|
2020-05-13 01:03:43 +00:00
|
|
|
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
|
2019-05-07 21:00:36 +00:00
|
|
|
{
|
2020-05-13 01:03:43 +00:00
|
|
|
GSIState *s;
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -1694,6 +1804,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
2019-05-07 21:00:36 +00:00
|
|
|
pcmc->pvh_enabled = true;
|
2020-11-13 13:09:35 +00:00
|
|
|
pcmc->kvmclock_create_always = true;
|
2018-11-08 17:02:33 +00:00
|
|
|
assert(!mc->get_hotplug_handler);
|
2019-05-07 21:00:36 +00:00
|
|
|
+ mc->async_pf_vmexit_disable = false;
|
|
|
|
mc->get_hotplug_handler = pc_get_hotplug_handler;
|
2019-11-15 14:35:04 +00:00
|
|
|
mc->hotplug_allowed = pc_hotplug_allowed;
|
|
|
|
mc->cpu_index_to_instance_props = x86_cpu_index_to_props;
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -1704,7 +1815,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
|
|
|
|
mc->has_hotpluggable_cpus = true;
|
2020-11-13 13:09:35 +00:00
|
|
|
mc->default_boot_order = "cad";
|
2018-11-08 17:02:33 +00:00
|
|
|
mc->block_default_type = IF_IDE;
|
|
|
|
- mc->max_cpus = 255;
|
|
|
|
+ /* 240: max CPU count for RHEL */
|
|
|
|
+ mc->max_cpus = 240;
|
|
|
|
mc->reset = pc_machine_reset;
|
2019-11-15 14:35:04 +00:00
|
|
|
mc->wakeup = pc_machine_wakeup;
|
2018-11-08 17:02:33 +00:00
|
|
|
hc->pre_plug = pc_machine_device_pre_plug_cb;
|
|
|
|
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
2021-12-16 07:06:10 +00:00
|
|
|
index dda3f64f19..dabc6c1933 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/i386/pc_piix.c
|
|
|
|
+++ b/hw/i386/pc_piix.c
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -50,6 +50,7 @@
|
2018-11-08 17:02:33 +00:00
|
|
|
#include "qapi/error.h"
|
|
|
|
#include "qemu/error-report.h"
|
2020-07-08 13:37:45 +00:00
|
|
|
#include "sysemu/xen.h"
|
2018-11-08 17:02:33 +00:00
|
|
|
+#include "migration/migration.h"
|
|
|
|
#ifdef CONFIG_XEN
|
|
|
|
#include <xen/hvm/hvm_info_table.h>
|
|
|
|
#include "hw/xen/xen_pt.h"
|
2021-09-02 06:44:51 +00:00
|
|
|
@@ -174,8 +175,8 @@ static void pc_init1(MachineState *machine,
|
2018-11-08 17:02:33 +00:00
|
|
|
if (pcmc->smbios_defaults) {
|
|
|
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
|
|
|
/* These values are guest ABI, do not change */
|
|
|
|
- smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
|
|
|
|
- mc->name, pcmc->smbios_legacy_mode,
|
|
|
|
+ smbios_set_defaults("Red Hat", "KVM",
|
|
|
|
+ mc->desc, pcmc->smbios_legacy_mode,
|
|
|
|
pcmc->smbios_uuid_encoded,
|
2020-05-13 01:03:43 +00:00
|
|
|
pcmc->smbios_stream_product,
|
|
|
|
pcmc->smbios_stream_version,
|
2021-09-02 06:44:51 +00:00
|
|
|
@@ -314,6 +315,7 @@ static void pc_init1(MachineState *machine,
|
2019-11-15 14:35:04 +00:00
|
|
|
* hw_compat_*, pc_compat_*, or * pc_*_machine_options().
|
2018-11-08 17:02:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
2019-05-07 21:00:36 +00:00
|
|
|
static void pc_compat_2_3_fn(MachineState *machine)
|
2018-11-08 17:02:33 +00:00
|
|
|
{
|
2020-05-13 01:03:43 +00:00
|
|
|
X86MachineState *x86ms = X86_MACHINE(machine);
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -951,3 +953,65 @@ static void xenfv_3_1_machine_options(MachineClass *m)
|
2020-05-13 01:03:43 +00:00
|
|
|
DEFINE_PC_MACHINE(xenfv, "xenfv-3.1", pc_xen_hvm_init,
|
|
|
|
xenfv_3_1_machine_options);
|
2018-11-08 17:02:33 +00:00
|
|
|
#endif
|
|
|
|
+#endif /* Disabled for Red Hat Enterprise Linux */
|
|
|
|
+
|
|
|
|
+/* Red Hat Enterprise Linux machine types */
|
|
|
|
+
|
|
|
|
+/* Options for the latest rhel7 machine type */
|
|
|
|
+static void pc_machine_rhel7_options(MachineClass *m)
|
|
|
|
+{
|
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
|
|
|
+ m->family = "pc_piix_Y";
|
2021-04-30 07:28:51 +00:00
|
|
|
+ m->default_machine_opts = "firmware=bios-256k.bin,hpet=off";
|
2018-11-08 17:02:33 +00:00
|
|
|
+ pcmc->default_nic_model = "e1000";
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pcmc->pci_root_uid = 0;
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->default_display = "std";
|
2019-05-07 21:00:36 +00:00
|
|
|
+ m->no_parallel = 1;
|
2020-11-13 13:09:35 +00:00
|
|
|
+ m->numa_mem_supported = true;
|
|
|
|
+ m->auto_enable_numa_with_memdev = false;
|
2019-11-15 14:35:04 +00:00
|
|
|
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
|
2019-05-07 21:00:36 +00:00
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len);
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->alias = "pc";
|
|
|
|
+ m->is_default = 1;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_init_rhel760(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_init1(machine, TYPE_I440FX_PCI_HOST_BRIDGE, \
|
|
|
|
+ TYPE_I440FX_PCI_DEVICE);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_machine_rhel760_options(MachineClass *m)
|
|
|
|
+{
|
2019-11-15 14:35:04 +00:00
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2018-11-08 17:02:33 +00:00
|
|
|
+ pc_machine_rhel7_options(m);
|
|
|
|
+ m->desc = "RHEL 7.6.0 PC (i440FX + PIIX, 1996)";
|
2019-05-07 21:00:36 +00:00
|
|
|
+ m->async_pf_vmexit_disable = true;
|
2019-11-15 14:35:04 +00:00
|
|
|
+ m->smbus_no_migration_support = true;
|
|
|
|
+ pcmc->pvh_enabled = false;
|
|
|
|
+ pcmc->default_cpu_version = CPU_VERSION_LEGACY;
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pcmc->kvmclock_create_always = false;
|
|
|
|
+ /* From pc_i440fx_5_1_machine_options() */
|
|
|
|
+ pcmc->pci_root_uid = 1;
|
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_4,
|
|
|
|
+ hw_compat_rhel_8_4_len);
|
2021-09-02 06:44:51 +00:00
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_4_compat,
|
|
|
|
+ pc_rhel_8_4_compat_len);
|
2021-04-30 07:28:51 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_3,
|
|
|
|
+ hw_compat_rhel_8_3_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_3_compat,
|
|
|
|
+ pc_rhel_8_3_compat_len);
|
2020-11-13 13:09:35 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_2,
|
|
|
|
+ hw_compat_rhel_8_2_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_2_compat,
|
|
|
|
+ pc_rhel_8_2_compat_len);
|
2019-12-13 13:10:42 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_1, hw_compat_rhel_8_1_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_1_compat, pc_rhel_8_1_compat_len);
|
2019-11-15 14:35:04 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_0_compat, pc_rhel_8_0_compat_len);
|
2019-05-07 21:00:36 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_7_6_compat, pc_rhel_7_6_compat_len);
|
2018-11-08 17:02:33 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(rhel760, "pc-i440fx-rhel7.6.0", pc_init_rhel760,
|
|
|
|
+ pc_machine_rhel760_options);
|
|
|
|
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
2021-12-16 07:06:10 +00:00
|
|
|
index 235054a643..04c911da18 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/i386/pc_q35.c
|
|
|
|
+++ b/hw/i386/pc_q35.c
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -197,8 +197,8 @@ static void pc_q35_init(MachineState *machine)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
if (pcmc->smbios_defaults) {
|
|
|
|
/* These values are guest ABI, do not change */
|
|
|
|
- smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
|
|
|
|
- mc->name, pcmc->smbios_legacy_mode,
|
|
|
|
+ smbios_set_defaults("Red Hat", "KVM",
|
|
|
|
+ mc->desc, pcmc->smbios_legacy_mode,
|
|
|
|
pcmc->smbios_uuid_encoded,
|
2020-05-13 01:03:43 +00:00
|
|
|
pcmc->smbios_stream_product,
|
|
|
|
pcmc->smbios_stream_version,
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -342,6 +342,7 @@ static void pc_q35_init(MachineState *machine)
|
2018-11-08 17:02:33 +00:00
|
|
|
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn)
|
|
|
|
|
|
|
|
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
|
|
static void pc_q35_machine_options(MachineClass *m)
|
|
|
|
{
|
|
|
|
PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -620,3 +621,175 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
DEFINE_Q35_MACHINE(v2_4, "pc-q35-2.4", NULL,
|
|
|
|
pc_q35_2_4_machine_options);
|
|
|
|
+#endif /* Disabled for Red Hat Enterprise Linux */
|
|
|
|
+
|
|
|
|
+/* Red Hat Enterprise Linux machine types */
|
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+/* Options for the latest rhel q35 machine type */
|
|
|
|
+static void pc_q35_machine_rhel_options(MachineClass *m)
|
2018-11-08 17:02:33 +00:00
|
|
|
+{
|
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
|
|
|
+ pcmc->default_nic_model = "e1000e";
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pcmc->pci_root_uid = 0;
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->family = "pc_q35_Z";
|
2019-11-15 14:35:04 +00:00
|
|
|
+ m->units_per_default_bus = 1;
|
2021-04-30 07:28:51 +00:00
|
|
|
+ m->default_machine_opts = "firmware=bios-256k.bin,hpet=off";
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->default_display = "std";
|
|
|
|
+ m->no_floppy = 1;
|
2019-05-07 21:00:36 +00:00
|
|
|
+ m->no_parallel = 1;
|
2019-11-15 14:35:04 +00:00
|
|
|
+ pcmc->default_cpu_version = 1;
|
|
|
|
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
|
|
|
|
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
|
|
|
|
+ machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->alias = "q35";
|
2021-04-30 07:28:51 +00:00
|
|
|
+ m->max_cpus = 710;
|
2019-05-07 21:00:36 +00:00
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_compat, pc_rhel_compat_len);
|
2018-11-08 17:02:33 +00:00
|
|
|
+}
|
|
|
|
+
|
2021-09-02 06:44:51 +00:00
|
|
|
+static void pc_q35_init_rhel850(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel850_options(MachineClass *m)
|
|
|
|
+{
|
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
|
|
|
+ pc_q35_machine_rhel_options(m);
|
|
|
|
+ m->desc = "RHEL-8.5.0 PC (Q35 + ICH9, 2009)";
|
|
|
|
+ pcmc->smbios_stream_product = "RHEL-AV";
|
|
|
|
+ pcmc->smbios_stream_version = "8.5.0";
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel850, "pc-q35-rhel8.5.0", pc_q35_init_rhel850,
|
|
|
|
+ pc_q35_machine_rhel850_options);
|
|
|
|
+
|
|
|
|
+
|
2021-04-30 07:28:51 +00:00
|
|
|
+static void pc_q35_init_rhel840(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel840_options(MachineClass *m)
|
|
|
|
+{
|
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2021-09-02 06:44:51 +00:00
|
|
|
+ pc_q35_machine_rhel850_options(m);
|
2021-04-30 07:28:51 +00:00
|
|
|
+ m->desc = "RHEL-8.4.0 PC (Q35 + ICH9, 2009)";
|
2021-09-02 06:44:51 +00:00
|
|
|
+ m->alias = NULL;
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pcmc->smbios_stream_product = "RHEL-AV";
|
|
|
|
+ pcmc->smbios_stream_version = "8.4.0";
|
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_4,
|
|
|
|
+ hw_compat_rhel_8_4_len);
|
2021-09-02 06:44:51 +00:00
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_4_compat,
|
|
|
|
+ pc_rhel_8_4_compat_len);
|
2021-04-30 07:28:51 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel840, "pc-q35-rhel8.4.0", pc_q35_init_rhel840,
|
|
|
|
+ pc_q35_machine_rhel840_options);
|
|
|
|
+
|
|
|
|
+
|
2020-11-13 13:09:35 +00:00
|
|
|
+static void pc_q35_init_rhel830(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel830_options(MachineClass *m)
|
|
|
|
+{
|
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pc_q35_machine_rhel840_options(m);
|
2020-11-13 13:09:35 +00:00
|
|
|
+ m->desc = "RHEL-8.3.0 PC (Q35 + ICH9, 2009)";
|
|
|
|
+ pcmc->smbios_stream_product = "RHEL-AV";
|
|
|
|
+ pcmc->smbios_stream_version = "8.3.0";
|
2021-04-30 07:28:51 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_3,
|
|
|
|
+ hw_compat_rhel_8_3_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_3_compat,
|
|
|
|
+ pc_rhel_8_3_compat_len);
|
|
|
|
+ /* From pc_q35_5_1_machine_options() */
|
|
|
|
+ pcmc->kvmclock_create_always = false;
|
|
|
|
+ /* From pc_q35_5_1_machine_options() */
|
|
|
|
+ pcmc->pci_root_uid = 1;
|
2020-11-13 13:09:35 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel830, "pc-q35-rhel8.3.0", pc_q35_init_rhel830,
|
|
|
|
+ pc_q35_machine_rhel830_options);
|
|
|
|
+
|
2019-12-13 13:10:42 +00:00
|
|
|
+static void pc_q35_init_rhel820(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel820_options(MachineClass *m)
|
|
|
|
+{
|
2020-05-13 01:03:43 +00:00
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2021-04-30 07:28:51 +00:00
|
|
|
+ pc_q35_machine_rhel830_options(m);
|
2019-12-13 13:10:42 +00:00
|
|
|
+ m->desc = "RHEL-8.2.0 PC (Q35 + ICH9, 2009)";
|
2020-11-13 13:09:35 +00:00
|
|
|
+ m->numa_mem_supported = true;
|
|
|
|
+ m->auto_enable_numa_with_memdev = false;
|
2020-05-13 01:03:43 +00:00
|
|
|
+ pcmc->smbios_stream_product = "RHEL-AV";
|
|
|
|
+ pcmc->smbios_stream_version = "8.2.0";
|
2020-11-13 13:09:35 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_2,
|
|
|
|
+ hw_compat_rhel_8_2_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_2_compat,
|
|
|
|
+ pc_rhel_8_2_compat_len);
|
2019-12-13 13:10:42 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel820, "pc-q35-rhel8.2.0", pc_q35_init_rhel820,
|
|
|
|
+ pc_q35_machine_rhel820_options);
|
|
|
|
+
|
2019-11-15 14:35:04 +00:00
|
|
|
+static void pc_q35_init_rhel810(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel810_options(MachineClass *m)
|
|
|
|
+{
|
2020-05-13 01:03:43 +00:00
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
2019-12-13 13:10:42 +00:00
|
|
|
+ pc_q35_machine_rhel820_options(m);
|
2019-11-15 14:35:04 +00:00
|
|
|
+ m->desc = "RHEL-8.1.0 PC (Q35 + ICH9, 2009)";
|
2019-12-13 13:10:42 +00:00
|
|
|
+ m->alias = NULL;
|
2020-05-13 01:03:43 +00:00
|
|
|
+ pcmc->smbios_stream_product = NULL;
|
|
|
|
+ pcmc->smbios_stream_version = NULL;
|
2019-12-13 13:10:42 +00:00
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_1, hw_compat_rhel_8_1_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_1_compat, pc_rhel_8_1_compat_len);
|
2019-11-15 14:35:04 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel810, "pc-q35-rhel8.1.0", pc_q35_init_rhel810,
|
|
|
|
+ pc_q35_machine_rhel810_options);
|
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+static void pc_q35_init_rhel800(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel800_options(MachineClass *m)
|
|
|
|
+{
|
2019-11-15 14:35:04 +00:00
|
|
|
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
|
|
|
|
+ pc_q35_machine_rhel810_options(m);
|
2019-05-07 21:00:36 +00:00
|
|
|
+ m->desc = "RHEL-8.0.0 PC (Q35 + ICH9, 2009)";
|
2019-11-15 14:35:04 +00:00
|
|
|
+ m->smbus_no_migration_support = true;
|
|
|
|
+ m->alias = NULL;
|
|
|
|
+ pcmc->pvh_enabled = false;
|
|
|
|
+ pcmc->default_cpu_version = CPU_VERSION_LEGACY;
|
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_8_0_compat, pc_rhel_8_0_compat_len);
|
2019-05-07 21:00:36 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel800, "pc-q35-rhel8.0.0", pc_q35_init_rhel800,
|
|
|
|
+ pc_q35_machine_rhel800_options);
|
|
|
|
+
|
2018-11-08 17:02:33 +00:00
|
|
|
+static void pc_q35_init_rhel760(MachineState *machine)
|
|
|
|
+{
|
|
|
|
+ pc_q35_init(machine);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void pc_q35_machine_rhel760_options(MachineClass *m)
|
|
|
|
+{
|
2019-05-07 21:00:36 +00:00
|
|
|
+ pc_q35_machine_rhel800_options(m);
|
|
|
|
+ m->alias = NULL;
|
2018-11-08 17:02:33 +00:00
|
|
|
+ m->desc = "RHEL-7.6.0 PC (Q35 + ICH9, 2009)";
|
2019-05-07 21:00:36 +00:00
|
|
|
+ m->async_pf_vmexit_disable = true;
|
|
|
|
+ compat_props_add(m->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len);
|
|
|
|
+ compat_props_add(m->compat_props, pc_rhel_7_6_compat, pc_rhel_7_6_compat_len);
|
2018-11-08 17:02:33 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DEFINE_PC_MACHINE(q35_rhel760, "pc-q35-rhel7.6.0", pc_q35_init_rhel760,
|
|
|
|
+ pc_q35_machine_rhel760_options);
|
2019-05-07 21:00:36 +00:00
|
|
|
diff --git a/include/hw/boards.h b/include/hw/boards.h
|
2021-12-16 07:06:10 +00:00
|
|
|
index b0a6e05b48..3c3d2ad450 100644
|
2019-05-07 21:00:36 +00:00
|
|
|
--- a/include/hw/boards.h
|
|
|
|
+++ b/include/hw/boards.h
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -263,6 +263,8 @@ struct MachineClass {
|
2019-05-07 21:00:36 +00:00
|
|
|
strList *allowed_dynamic_sysbus_devices;
|
|
|
|
bool auto_enable_numa_with_memhp;
|
2020-07-14 14:45:56 +00:00
|
|
|
bool auto_enable_numa_with_memdev;
|
2019-05-07 21:00:36 +00:00
|
|
|
+ /* RHEL only */
|
|
|
|
+ bool async_pf_vmexit_disable;
|
|
|
|
bool ignore_boot_device_suffixes;
|
2020-11-13 13:09:35 +00:00
|
|
|
bool smbus_no_migration_support;
|
|
|
|
bool nvdimm_supported;
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
2021-12-16 07:06:10 +00:00
|
|
|
index 7ccc9a1a07..9689a58b14 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/include/hw/i386/pc.h
|
|
|
|
+++ b/include/hw/i386/pc.h
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -280,6 +280,27 @@ extern const size_t pc_compat_1_5_len;
|
2019-05-07 21:00:36 +00:00
|
|
|
extern GlobalProperty pc_compat_1_4[];
|
|
|
|
extern const size_t pc_compat_1_4_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty pc_rhel_compat[];
|
|
|
|
+extern const size_t pc_rhel_compat_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2021-09-02 06:44:51 +00:00
|
|
|
+extern GlobalProperty pc_rhel_8_4_compat[];
|
|
|
|
+extern const size_t pc_rhel_8_4_compat_len;
|
|
|
|
+
|
2021-04-30 07:28:51 +00:00
|
|
|
+extern GlobalProperty pc_rhel_8_3_compat[];
|
|
|
|
+extern const size_t pc_rhel_8_3_compat_len;
|
|
|
|
+
|
2020-11-13 13:09:35 +00:00
|
|
|
+extern GlobalProperty pc_rhel_8_2_compat[];
|
|
|
|
+extern const size_t pc_rhel_8_2_compat_len;
|
|
|
|
+
|
2019-12-13 13:10:42 +00:00
|
|
|
+extern GlobalProperty pc_rhel_8_1_compat[];
|
|
|
|
+extern const size_t pc_rhel_8_1_compat_len;
|
|
|
|
+
|
2019-11-15 14:35:04 +00:00
|
|
|
+extern GlobalProperty pc_rhel_8_0_compat[];
|
|
|
|
+extern const size_t pc_rhel_8_0_compat_len;
|
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty pc_rhel_7_6_compat[];
|
|
|
|
+extern const size_t pc_rhel_7_6_compat_len;
|
|
|
|
+
|
|
|
|
/* Helper for setting model-id for CPU models that changed model-id
|
|
|
|
* depending on QEMU versions up to QEMU 2.4.
|
|
|
|
*/
|
2021-09-02 06:44:51 +00:00
|
|
|
diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c
|
|
|
|
index d95028018e..7b004065ae 100644
|
|
|
|
--- a/target/i386/kvm/kvm-cpu.c
|
|
|
|
+++ b/target/i386/kvm/kvm-cpu.c
|
|
|
|
@@ -131,6 +131,7 @@ static PropValue kvm_default_props[] = {
|
2018-11-08 17:02:33 +00:00
|
|
|
{ "acpi", "off" },
|
|
|
|
{ "monitor", "off" },
|
|
|
|
{ "svm", "off" },
|
|
|
|
+ { "kvm-pv-unhalt", "on" },
|
|
|
|
{ NULL, NULL },
|
|
|
|
};
|
|
|
|
|
2021-04-30 07:28:51 +00:00
|
|
|
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
|
2021-12-16 07:06:10 +00:00
|
|
|
index 5a698bde19..a668f521ac 100644
|
2021-04-30 07:28:51 +00:00
|
|
|
--- a/target/i386/kvm/kvm.c
|
|
|
|
+++ b/target/i386/kvm/kvm.c
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -3336,6 +3336,7 @@ static int kvm_get_msrs(X86CPU *cpu)
|
2019-05-07 21:00:36 +00:00
|
|
|
struct kvm_msr_entry *msrs = cpu->kvm_msr_buf->entries;
|
|
|
|
int ret, i;
|
|
|
|
uint64_t mtrr_top_bits;
|
|
|
|
+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
|
|
|
|
|
|
|
|
kvm_msr_buf_reset(cpu);
|
|
|
|
|
2021-12-16 07:06:10 +00:00
|
|
|
@@ -3665,6 +3666,9 @@ static int kvm_get_msrs(X86CPU *cpu)
|
2019-05-07 21:00:36 +00:00
|
|
|
break;
|
|
|
|
case MSR_KVM_ASYNC_PF_EN:
|
|
|
|
env->async_pf_en_msr = msrs[i].data;
|
|
|
|
+ if (mc->async_pf_vmexit_disable) {
|
|
|
|
+ env->async_pf_en_msr &= ~(1ULL << 2);
|
|
|
|
+ }
|
|
|
|
break;
|
2020-11-13 13:09:35 +00:00
|
|
|
case MSR_KVM_ASYNC_PF_INT:
|
|
|
|
env->async_pf_int_msr = msrs[i].data;
|
2021-04-30 07:28:51 +00:00
|
|
|
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
|
|
|
|
index 6dcad2db49..580c2c43d2 100644
|
|
|
|
--- a/tests/qtest/pvpanic-test.c
|
|
|
|
+++ b/tests/qtest/pvpanic-test.c
|
|
|
|
@@ -17,7 +17,7 @@ static void test_panic_nopause(void)
|
|
|
|
QDict *response, *data;
|
|
|
|
QTestState *qts;
|
|
|
|
|
|
|
|
- qts = qtest_init("-device pvpanic -action panic=none");
|
|
|
|
+ qts = qtest_init("-M q35 -device pvpanic -action panic=none");
|
|
|
|
|
|
|
|
val = qtest_inb(qts, 0x505);
|
|
|
|
g_assert_cmpuint(val, ==, 3);
|
|
|
|
@@ -40,7 +40,8 @@ static void test_panic(void)
|
|
|
|
QDict *response, *data;
|
|
|
|
QTestState *qts;
|
|
|
|
|
|
|
|
- qts = qtest_init("-device pvpanic -action panic=pause");
|
|
|
|
+ /* RHEL: Use q35 */
|
|
|
|
+ qts = qtest_init("-M q35 -device pvpanic -action panic=pause");
|
|
|
|
|
|
|
|
val = qtest_inb(qts, 0x505);
|
|
|
|
g_assert_cmpuint(val, ==, 3);
|
2018-11-08 17:02:33 +00:00
|
|
|
--
|
2021-04-30 07:28:51 +00:00
|
|
|
2.27.0
|
2018-11-08 17:02:33 +00:00
|
|
|
|