- Rebase to QEMU 10.0.0 [RHEL-74473] - Resolves: RHEL-74473 (Rebase qemu-kvm to QEMU 10.0.0)
557 lines
21 KiB
Diff
557 lines
21 KiB
Diff
From db31addfd949b587e937dc39137fc93aa9596990 Mon Sep 17 00:00:00 2001
|
|
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
Date: Fri, 11 Jan 2019 09:54:45 +0100
|
|
Subject: Machine type related general changes
|
|
|
|
This patch is first part of original "Add RHEL machine types" patch we
|
|
split to allow easier review. It contains changes not related to any
|
|
architecture.
|
|
|
|
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
|
---
|
|
Rebase notes (9.1.0):
|
|
- Upstream removed uuid_encoced argument on smbios_set_defaults
|
|
|
|
Rebase notes (10.0.0 rc0):
|
|
- Solve conflicting xhci_pci_properties (downstream vs upstream)
|
|
|
|
Rebase notes (10.0.0):
|
|
- Add riscv changes
|
|
- Added upstream compat changes
|
|
|
|
Merged commits (9.1.0):
|
|
- 043ad5ce97 Add upstream compatibility bits (partial)
|
|
- bfbdab5824 rhel 9.4.0 machine type compat for virtio-gpu migration
|
|
|
|
Merged commits (10.0.0 rc0):
|
|
- 03502faf70 Add upstream compatibility bits (partial)
|
|
- f53dbf7532 remove stale compat definitions (partial)
|
|
- d93fcb3940 virtio-net: disable USO for all RHEL9 (partial)
|
|
---
|
|
hw/acpi/piix4.c | 2 +-
|
|
hw/arm/virt.c | 3 +-
|
|
hw/core/machine.c | 133 +++++++++++++++++++++++++++++++++++
|
|
hw/i386/fw_cfg.c | 3 +-
|
|
hw/net/rtl8139.c | 4 +-
|
|
hw/riscv/virt.c | 4 +-
|
|
hw/smbios/smbios.c | 46 +++++++++++-
|
|
hw/timer/i8254_common.c | 2 +-
|
|
hw/usb/hcd-xhci-pci.c | 55 +++++++++++----
|
|
hw/usb/hcd-xhci-pci.h | 1 +
|
|
hw/virtio/virtio-mem.c | 3 +-
|
|
include/hw/boards.h | 28 ++++++++
|
|
include/hw/firmware/smbios.h | 4 +-
|
|
include/hw/i386/pc.h | 3 +
|
|
14 files changed, 265 insertions(+), 26 deletions(-)
|
|
|
|
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
|
|
index 6d023e595b..8b8aa6b3aa 100644
|
|
--- a/hw/acpi/piix4.c
|
|
+++ b/hw/acpi/piix4.c
|
|
@@ -245,7 +245,7 @@ static bool vmstate_test_migrate_acpi_index(void *opaque, int version_id)
|
|
static const VMStateDescription vmstate_acpi = {
|
|
.name = "piix4_pm",
|
|
.version_id = 3,
|
|
- .minimum_version_id = 3,
|
|
+ .minimum_version_id = 2,
|
|
.post_load = vmstate_acpi_post_load,
|
|
.fields = (const VMStateField[]) {
|
|
VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState),
|
|
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
|
index 68bb983ecf..904596ae3b 100644
|
|
--- a/hw/arm/virt.c
|
|
+++ b/hw/arm/virt.c
|
|
@@ -1715,7 +1715,8 @@ static void virt_build_smbios(VirtMachineState *vms)
|
|
}
|
|
|
|
smbios_set_defaults("QEMU", product,
|
|
- vmc->smbios_old_sys_ver ? "1.0" : mc->name);
|
|
+ vmc->smbios_old_sys_ver ? "1.0" : mc->name,
|
|
+ NULL, NULL);
|
|
|
|
/* build the array of physical mem area from base_memmap */
|
|
mem_array.address = vms->memmap[VIRT_MEM].base;
|
|
diff --git a/hw/core/machine.c b/hw/core/machine.c
|
|
index 63c6ef93d2..c219ae589c 100644
|
|
--- a/hw/core/machine.c
|
|
+++ b/hw/core/machine.c
|
|
@@ -298,6 +298,139 @@ GlobalProperty hw_compat_2_4[] = {
|
|
};
|
|
const size_t hw_compat_2_4_len = G_N_ELEMENTS(hw_compat_2_4);
|
|
|
|
+/*
|
|
+ * RHEL only: machine types for previous major releases are deprecated
|
|
+ */
|
|
+const char *rhel_old_machine_deprecation =
|
|
+ "machine types for previous major releases are deprecated";
|
|
+
|
|
+GlobalProperty hw_compat_rhel_10_1[] = {
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_1 */
|
|
+ { TYPE_PCI_DEVICE, "x-pcie-ext-tag", "false" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ {"arm-cpu", "backcompat-pauth-default-use-qarma5", "true"},
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "virtio-balloon-pci", "vectors", "0" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "virtio-balloon-pci-transitional", "vectors", "0" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "virtio-balloon-pci-non-transitional", "vectors", "0" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "virtio-mem-pci", "vectors", "0" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "migration", "multifd-clean-tls-termination", "false" },
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "migration", "send-switchover-start", "off"},
|
|
+ /* hw_compat_rhel_10_1 from hw_compat_9_2 */
|
|
+ { "vfio-pci", "x-migration-multifd-transfer", "off" },
|
|
+};
|
|
+const size_t hw_compat_rhel_10_1_len = G_N_ELEMENTS(hw_compat_rhel_10_1);
|
|
+
|
|
+
|
|
+GlobalProperty hw_compat_rhel_10_0[] = {
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ {"arm-cpu", "backcompat-cntfrq", "true" },
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ { "scsi-hd", "migrate-emulated-scsi-request", "false" },
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ { "scsi-cd", "migrate-emulated-scsi-request", "false" },
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ {"vfio-pci", "skip-vsc-check", "false" },
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ { "virtio-pci", "x-pcie-pm-no-soft-reset", "off" },
|
|
+ /* hw_compat_rhel_10_0 from hw_compat_9_0 */
|
|
+ {"sd-card", "spec_version", "2" },
|
|
+};
|
|
+const size_t hw_compat_rhel_10_0_len = G_N_ELEMENTS(hw_compat_rhel_10_0);
|
|
+
|
|
+/* Apply this to all RHEL9 boards going backward and forward */
|
|
+GlobalProperty hw_compat_rhel_9[] = {
|
|
+ /* supported by userspace, but RHEL 9 *kernels* do not support USO. */
|
|
+ { TYPE_VIRTIO_NET, "host_uso", "off"},
|
|
+ { TYPE_VIRTIO_NET, "guest_uso4", "off"},
|
|
+ { TYPE_VIRTIO_NET, "guest_uso6", "off"},
|
|
+};
|
|
+const size_t hw_compat_rhel_9_len = G_N_ELEMENTS(hw_compat_rhel_9);
|
|
+
|
|
+GlobalProperty hw_compat_rhel_9_5[] = {
|
|
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
|
|
+ { "migration", "zero-page-detection", "legacy"},
|
|
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
|
|
+ { TYPE_VIRTIO_IOMMU_PCI, "granule", "4k" },
|
|
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
|
|
+ { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "64" },
|
|
+ /* hw_compat_rhel_9_5 from hw_compat_8_2 */
|
|
+ { "virtio-gpu-device", "x-scanout-vmstate-version", "1" },
|
|
+};
|
|
+const size_t hw_compat_rhel_9_5_len = G_N_ELEMENTS(hw_compat_rhel_9_5);
|
|
+
|
|
+GlobalProperty hw_compat_rhel_9_4[] = {
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_0 */
|
|
+ { TYPE_VIRTIO_NET, "host_uso", "off"},
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_0 */
|
|
+ { TYPE_VIRTIO_NET, "guest_uso4", "off"},
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_0 */
|
|
+ { TYPE_VIRTIO_NET, "guest_uso6", "off"},
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_1 */
|
|
+ { TYPE_PCI_BRIDGE, "x-pci-express-writeable-slt-bug", "true" },
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_1 */
|
|
+ { "ramfb", "x-migrate", "off" },
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_1 */
|
|
+ { "vfio-pci-nohotplug", "x-ramfb-migrate", "off" },
|
|
+ /* hw_compat_rhel_9_4 from hw_compat_8_1 */
|
|
+ { "igb", "x-pcie-flr-init", "off" },
|
|
+ /* hw_compat_rhel_9_4 jira RHEL-24045 */
|
|
+ { "virtio-mem", "dynamic-memslots", "off" },
|
|
+};
|
|
+const size_t hw_compat_rhel_9_4_len = G_N_ELEMENTS(hw_compat_rhel_9_4);
|
|
+
|
|
+GlobalProperty hw_compat_rhel_9_3[] = {
|
|
+ /* hw_compat_rhel_9_3 from hw_compat_8_0 */
|
|
+ { "migration", "multifd-flush-after-each-section", "on"},
|
|
+ /* hw_compat_rhel_9_3 from hw_compat_8_0 */
|
|
+ { TYPE_PCI_DEVICE, "x-pcie-ari-nextfn-1", "on" },
|
|
+};
|
|
+const size_t hw_compat_rhel_9_3_len = G_N_ELEMENTS(hw_compat_rhel_9_3);
|
|
+
|
|
+GlobalProperty hw_compat_rhel_9_2[] = {
|
|
+ /* hw_compat_rhel_9_2 from hw_compat_7_2 */
|
|
+ { "e1000e", "migrate-timadj", "off" },
|
|
+ /* hw_compat_rhel_9_2 from hw_compat_7_2 */
|
|
+ { "virtio-mem", "x-early-migration", "false" },
|
|
+ /* hw_compat_rhel_9_2 from hw_compat_7_2 */
|
|
+ { "migration", "x-preempt-pre-7-2", "true" },
|
|
+ /* hw_compat_rhel_9_2 from hw_compat_7_2 */
|
|
+ { TYPE_PCI_DEVICE, "x-pcie-err-unc-mask", "off" },
|
|
+};
|
|
+const size_t hw_compat_rhel_9_2_len = G_N_ELEMENTS(hw_compat_rhel_9_2);
|
|
+
|
|
+/*
|
|
+ * Mostly the same as hw_compat_7_0
|
|
+ */
|
|
+GlobalProperty hw_compat_rhel_9_1[] = {
|
|
+ /* hw_compat_rhel_9_1 from hw_compat_7_0 */
|
|
+ { "arm-gicv3-common", "force-8-bit-prio", "on" },
|
|
+ /* hw_compat_rhel_9_1 from hw_compat_7_0 */
|
|
+ { "nvme-ns", "eui64-default", "on"},
|
|
+ /* hw_compat_rhel_9_1 from hw_compat_7_1 */
|
|
+ { "virtio-device", "queue_reset", "false" },
|
|
+ /* hw_compat_rhel_9_1 bz 2155749 */
|
|
+ { "virtio-rng-pci", "vectors", "0" },
|
|
+ /* hw_compat_rhel_9_1 bz 2162569 */
|
|
+ { "virtio-rng-pci-transitional", "vectors", "0" },
|
|
+ { "virtio-rng-pci-non-transitional", "vectors", "0" },
|
|
+};
|
|
+const size_t hw_compat_rhel_9_1_len = G_N_ELEMENTS(hw_compat_rhel_9_1);
|
|
+
|
|
+/*
|
|
+ * Mostly the same as hw_compat_6_2
|
|
+ */
|
|
+GlobalProperty hw_compat_rhel_9_0[] = {
|
|
+ /* hw_compat_rhel_9_0 from hw_compat_6_2 */
|
|
+ { "PIIX4_PM", "x-not-migrate-acpi-index", "on"},
|
|
+};
|
|
+const size_t hw_compat_rhel_9_0_len = G_N_ELEMENTS(hw_compat_rhel_9_0);
|
|
+
|
|
MachineState *current_machine;
|
|
|
|
static char *machine_get_kernel(Object *obj, Error **errp)
|
|
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
|
|
index 5c0bcd5f8a..07df7281d2 100644
|
|
--- a/hw/i386/fw_cfg.c
|
|
+++ b/hw/i386/fw_cfg.c
|
|
@@ -75,7 +75,8 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg,
|
|
|
|
if (pcmc->smbios_defaults) {
|
|
/* These values are guest ABI, do not change */
|
|
- smbios_set_defaults("QEMU", mc->desc, mc->name);
|
|
+ smbios_set_defaults("QEMU", mc->desc, mc->name,
|
|
+ pcmc->smbios_stream_product, pcmc->smbios_stream_version);
|
|
}
|
|
|
|
/* tell smbios about cpuid version and features */
|
|
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
|
index 135ab57160..6c57a8985b 100644
|
|
--- a/hw/net/rtl8139.c
|
|
+++ b/hw/net/rtl8139.c
|
|
@@ -3171,7 +3171,7 @@ static int rtl8139_pre_save(void *opaque)
|
|
|
|
static const VMStateDescription vmstate_rtl8139 = {
|
|
.name = "rtl8139",
|
|
- .version_id = 5,
|
|
+ .version_id = 4,
|
|
.minimum_version_id = 3,
|
|
.post_load = rtl8139_post_load,
|
|
.pre_save = rtl8139_pre_save,
|
|
@@ -3252,7 +3252,9 @@ static const VMStateDescription vmstate_rtl8139 = {
|
|
VMSTATE_UINT32(tally_counters.TxMCol, RTL8139State),
|
|
VMSTATE_UINT64(tally_counters.RxOkPhy, RTL8139State),
|
|
VMSTATE_UINT64(tally_counters.RxOkBrd, RTL8139State),
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux bz 1420195 */
|
|
VMSTATE_UINT32_V(tally_counters.RxOkMul, RTL8139State, 5),
|
|
+#endif
|
|
VMSTATE_UINT16(tally_counters.TxAbt, RTL8139State),
|
|
VMSTATE_UINT16(tally_counters.TxUndrn, RTL8139State),
|
|
|
|
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
|
|
index e517002fdf..b8d20575af 100644
|
|
--- a/hw/riscv/virt.c
|
|
+++ b/hw/riscv/virt.c
|
|
@@ -1400,7 +1400,7 @@ static void virt_build_smbios(RISCVVirtState *s)
|
|
product = "KVM Virtual Machine";
|
|
}
|
|
|
|
- smbios_set_defaults("QEMU", product, mc->name);
|
|
+ smbios_set_defaults("QEMU", product, mc->name, NULL, NULL);
|
|
|
|
if (riscv_is_32bit(&s->soc[0])) {
|
|
smbios_set_default_processor_family(0x200);
|
|
@@ -1919,7 +1919,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
|
|
mc->desc = "RISC-V VirtIO board";
|
|
mc->init = virt_machine_init;
|
|
mc->max_cpus = VIRT_CPUS_MAX;
|
|
- mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
|
|
+ mc->default_cpu_type = TYPE_RISCV_CPU_MAX;
|
|
mc->block_default_type = IF_VIRTIO;
|
|
mc->no_cdrom = 1;
|
|
mc->pci_allow_0_address = true;
|
|
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
|
|
index ad4cd6721e..813b9b43ec 100644
|
|
--- a/hw/smbios/smbios.c
|
|
+++ b/hw/smbios/smbios.c
|
|
@@ -38,6 +38,10 @@ size_t usr_blobs_len;
|
|
static unsigned usr_table_max;
|
|
static unsigned usr_table_cnt;
|
|
|
|
+/* Set to true for modern Windows 10 HardwareID-6 compat */
|
|
+static bool smbios_type2_required;
|
|
+
|
|
+
|
|
uint8_t *smbios_tables;
|
|
size_t smbios_tables_len;
|
|
unsigned smbios_table_max;
|
|
@@ -626,7 +630,7 @@ static void smbios_build_type_1_table(void)
|
|
|
|
static void smbios_build_type_2_table(void)
|
|
{
|
|
- SMBIOS_BUILD_TABLE_PRE(2, T2_BASE, false); /* optional */
|
|
+ SMBIOS_BUILD_TABLE_PRE(2, T2_BASE, smbios_type2_required);
|
|
|
|
SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer);
|
|
SMBIOS_TABLE_SET_STR(2, product_str, type2.product);
|
|
@@ -1014,15 +1018,51 @@ void smbios_set_default_processor_family(uint16_t processor_family)
|
|
}
|
|
|
|
void smbios_set_defaults(const char *manufacturer, const char *product,
|
|
- const char *version)
|
|
+ const char *version,
|
|
+ const char *stream_product,
|
|
+ const char *stream_version)
|
|
{
|
|
smbios_have_defaults = true;
|
|
|
|
+ /*
|
|
+ * If @stream_product & @stream_version are non-NULL, then
|
|
+ * we're following rules for new Windows driver support.
|
|
+ * The data we have to report is defined in this doc:
|
|
+ *
|
|
+ * https://docs.microsoft.com/en-us/windows-hardware/drivers/install/specifying-hardware-ids-for-a-computer
|
|
+ *
|
|
+ * The Windows drivers are written to expect use of the
|
|
+ * scheme documented as "HardwareID-6" against Windows 10,
|
|
+ * which uses SMBIOS System (Type 1) and Base Board (Type 2)
|
|
+ * tables and will match on
|
|
+ *
|
|
+ * System Manufacturer = Red Hat (@manufacturer)
|
|
+ * System SKU Number = 8.2.0 (@stream_version)
|
|
+ * Baseboard Manufacturer = Red Hat (@manufacturer)
|
|
+ * Baseboard Product = RHEL-AV (@stream_product)
|
|
+ *
|
|
+ * NB, SKU must be changed with each RHEL-AV release
|
|
+ *
|
|
+ * Other fields can be freely used by applications using
|
|
+ * QEMU. For example apps can use the "System product"
|
|
+ * and "System version" to identify themselves.
|
|
+ *
|
|
+ * We get 'System Manufacturer' and 'Baseboard Manufacturer'
|
|
+ */
|
|
SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer);
|
|
SMBIOS_SET_DEFAULT(smbios_type1.product, product);
|
|
SMBIOS_SET_DEFAULT(smbios_type1.version, version);
|
|
+ SMBIOS_SET_DEFAULT(smbios_type1.family, "Red Hat Enterprise Linux");
|
|
+ if (stream_version != NULL) {
|
|
+ SMBIOS_SET_DEFAULT(smbios_type1.sku, stream_version);
|
|
+ }
|
|
SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
|
|
- SMBIOS_SET_DEFAULT(type2.product, product);
|
|
+ if (stream_product != NULL) {
|
|
+ SMBIOS_SET_DEFAULT(type2.product, stream_product);
|
|
+ smbios_type2_required = true;
|
|
+ } else {
|
|
+ SMBIOS_SET_DEFAULT(type2.product, product);
|
|
+ }
|
|
SMBIOS_SET_DEFAULT(type2.version, version);
|
|
SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer);
|
|
SMBIOS_SET_DEFAULT(type3.version, version);
|
|
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
|
|
index 29105afcc3..cef91c9a79 100644
|
|
--- a/hw/timer/i8254_common.c
|
|
+++ b/hw/timer/i8254_common.c
|
|
@@ -229,7 +229,7 @@ static const VMStateDescription vmstate_pit_common = {
|
|
.pre_save = pit_dispatch_pre_save,
|
|
.post_load = pit_dispatch_post_load,
|
|
.fields = (const VMStateField[]) {
|
|
- VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
|
|
+ VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState), /* qemu-kvm's v2 had 'flags' here */
|
|
VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
|
|
vmstate_pit_channel, PITChannelState),
|
|
VMSTATE_INT64(channels[0].next_transition_time,
|
|
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
|
|
index d908eb787d..401a2734ed 100644
|
|
--- a/hw/usb/hcd-xhci-pci.c
|
|
+++ b/hw/usb/hcd-xhci-pci.c
|
|
@@ -120,6 +120,33 @@ static int xhci_pci_vmstate_post_load(void *opaque, int version_id)
|
|
return 0;
|
|
}
|
|
|
|
+/* RH bz 1912846 */
|
|
+static bool usb_xhci_pci_add_msi(struct PCIDevice *dev, Error **errp)
|
|
+{
|
|
+ int ret;
|
|
+ Error *err = NULL;
|
|
+ XHCIPciState *s = XHCI_PCI(dev);
|
|
+
|
|
+ ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err);
|
|
+ /*
|
|
+ * Any error other than -ENOTSUP(board's MSI support is broken)
|
|
+ * is a programming error
|
|
+ */
|
|
+ assert(!ret || ret == -ENOTSUP);
|
|
+ if (ret && s->msi == ON_OFF_AUTO_ON) {
|
|
+ /* Can't satisfy user's explicit msi=on request, fail */
|
|
+ error_append_hint(&err, "You have to use msi=auto (default) or "
|
|
+ "msi=off with this machine type.\n");
|
|
+ error_propagate(errp, err);
|
|
+ return true;
|
|
+ }
|
|
+ assert(!err || s->msi == ON_OFF_AUTO_AUTO);
|
|
+ /* With msi=auto, we fall back to MSI off silently */
|
|
+ error_free(err);
|
|
+
|
|
+ return false;
|
|
+}
|
|
+
|
|
static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
|
|
{
|
|
int ret;
|
|
@@ -144,23 +171,12 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
|
|
s->xhci.nec_quirks = true;
|
|
}
|
|
|
|
- if (s->msi != ON_OFF_AUTO_OFF) {
|
|
- ret = msi_init(dev, 0x70, s->xhci.numintrs, true, false, &err);
|
|
- /*
|
|
- * Any error other than -ENOTSUP(board's MSI support is broken)
|
|
- * is a programming error
|
|
- */
|
|
- assert(!ret || ret == -ENOTSUP);
|
|
- if (ret && s->msi == ON_OFF_AUTO_ON) {
|
|
- /* Can't satisfy user's explicit msi=on request, fail */
|
|
- error_append_hint(&err, "You have to use msi=auto (default) or "
|
|
- "msi=off with this machine type.\n");
|
|
+ if (s->msi != ON_OFF_AUTO_OFF && s->rh_late_msi_cap) {
|
|
+ /* This gives the behaviour from 5.2.0 onwards, lspci shows 90,a0,70 */
|
|
+ if (usb_xhci_pci_add_msi(dev, &err)) {
|
|
error_propagate(errp, err);
|
|
return;
|
|
}
|
|
- assert(!err || s->msi == ON_OFF_AUTO_AUTO);
|
|
- /* With msi=auto, we fall back to MSI off silently */
|
|
- error_free(err);
|
|
}
|
|
pci_register_bar(dev, 0,
|
|
PCI_BASE_ADDRESS_SPACE_MEMORY |
|
|
@@ -172,6 +188,14 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp)
|
|
assert(ret > 0);
|
|
}
|
|
|
|
+ /* RH bz 1912846 */
|
|
+ if (s->msi != ON_OFF_AUTO_OFF && !s->rh_late_msi_cap) {
|
|
+ /* This gives the older RH machine behaviour, lspci shows 90,70,a0 */
|
|
+ if (usb_xhci_pci_add_msi(dev, &err)) {
|
|
+ error_propagate(errp, err);
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
if (s->msix != ON_OFF_AUTO_OFF) {
|
|
/* TODO check for errors, and should fail when msix=on */
|
|
msix_init(dev, s->xhci.numintrs,
|
|
@@ -221,8 +245,11 @@ static const Property xhci_pci_properties[] = {
|
|
DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
|
|
DEFINE_PROP_BOOL("conditional-intr-mapping", XHCIPciState,
|
|
conditional_intr_mapping, false),
|
|
+ /* RH bz 1912846 */
|
|
+ DEFINE_PROP_BOOL("x-rh-late-msi-cap", XHCIPciState, rh_late_msi_cap, true),
|
|
};
|
|
|
|
+
|
|
static void xhci_class_init(ObjectClass *klass, void *data)
|
|
{
|
|
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
|
|
diff --git a/hw/usb/hcd-xhci-pci.h b/hw/usb/hcd-xhci-pci.h
|
|
index 5b61ae8455..3170db064b 100644
|
|
--- a/hw/usb/hcd-xhci-pci.h
|
|
+++ b/hw/usb/hcd-xhci-pci.h
|
|
@@ -41,6 +41,7 @@ typedef struct XHCIPciState {
|
|
OnOffAuto msi;
|
|
OnOffAuto msix;
|
|
bool conditional_intr_mapping;
|
|
+ bool rh_late_msi_cap; /* bz 1912846 */
|
|
} XHCIPciState;
|
|
|
|
#endif
|
|
diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c
|
|
index 5f57eccbb6..391d85c652 100644
|
|
--- a/hw/virtio/virtio-mem.c
|
|
+++ b/hw/virtio/virtio-mem.c
|
|
@@ -1717,8 +1717,9 @@ static const Property virtio_mem_properties[] = {
|
|
#endif
|
|
DEFINE_PROP_BOOL(VIRTIO_MEM_EARLY_MIGRATION_PROP, VirtIOMEM,
|
|
early_migration, true),
|
|
+ /* RHEL: default-enable "dynamic-memslots" (jira RHEL-24045) */
|
|
DEFINE_PROP_BOOL(VIRTIO_MEM_DYNAMIC_MEMSLOTS_PROP, VirtIOMEM,
|
|
- dynamic_memslots, false),
|
|
+ dynamic_memslots, true),
|
|
};
|
|
|
|
static uint64_t virtio_mem_rdm_get_min_granularity(const RamDiscardManager *rdm,
|
|
diff --git a/include/hw/boards.h b/include/hw/boards.h
|
|
index f22b2e7fc7..d7fa968dca 100644
|
|
--- a/include/hw/boards.h
|
|
+++ b/include/hw/boards.h
|
|
@@ -848,4 +848,32 @@ extern const size_t hw_compat_2_5_len;
|
|
extern GlobalProperty hw_compat_2_4[];
|
|
extern const size_t hw_compat_2_4_len;
|
|
|
|
+extern GlobalProperty hw_compat_rhel_10_1[];
|
|
+extern const size_t hw_compat_rhel_10_1_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_10_0[];
|
|
+extern const size_t hw_compat_rhel_10_0_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9[];
|
|
+extern const size_t hw_compat_rhel_9_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_5[];
|
|
+extern const size_t hw_compat_rhel_9_5_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_4[];
|
|
+extern const size_t hw_compat_rhel_9_4_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_3[];
|
|
+extern const size_t hw_compat_rhel_9_3_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_2[];
|
|
+extern const size_t hw_compat_rhel_9_2_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_1[];
|
|
+extern const size_t hw_compat_rhel_9_1_len;
|
|
+
|
|
+extern GlobalProperty hw_compat_rhel_9_0[];
|
|
+extern const size_t hw_compat_rhel_9_0_len;
|
|
+
|
|
+extern const char *rhel_old_machine_deprecation;
|
|
#endif
|
|
diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
|
|
index f066ab7262..e805d25fbe 100644
|
|
--- a/include/hw/firmware/smbios.h
|
|
+++ b/include/hw/firmware/smbios.h
|
|
@@ -331,7 +331,9 @@ void smbios_add_usr_blob_size(size_t size);
|
|
void smbios_entry_add(QemuOpts *opts, Error **errp);
|
|
void smbios_set_cpuid(uint32_t version, uint32_t features);
|
|
void smbios_set_defaults(const char *manufacturer, const char *product,
|
|
- const char *version);
|
|
+ const char *version,
|
|
+ const char *stream_product,
|
|
+ const char *stream_version);
|
|
void smbios_set_default_processor_family(uint16_t processor_family);
|
|
uint8_t *smbios_get_table_legacy(size_t *length, Error **errp);
|
|
void smbios_get_tables(MachineState *ms,
|
|
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
|
index 103b54301f..e4d32f8aea 100644
|
|
--- a/include/hw/i386/pc.h
|
|
+++ b/include/hw/i386/pc.h
|
|
@@ -103,6 +103,9 @@ struct PCMachineClass {
|
|
bool smbios_defaults;
|
|
bool smbios_legacy_mode;
|
|
SmbiosEntryPointType default_smbios_ep_type;
|
|
+ /* New fields needed for Windows HardwareID-6 matching */
|
|
+ const char *smbios_stream_product;
|
|
+ const char *smbios_stream_version;
|
|
|
|
/* RAM / address space compat: */
|
|
bool gigabyte_align;
|
|
--
|
|
2.39.3
|
|
|