2020-11-13 13:09:35 +00:00
|
|
|
From 673234091c4073ebc31bf36559e249796772c8b5 Mon Sep 17 00:00:00 2001
|
2018-11-08 17:02:33 +00:00
|
|
|
From: Miroslav Rezanina <mrezanin@redhat.com>
|
2019-05-07 21:00:36 +00:00
|
|
|
Date: Fri, 11 Jan 2019 09:54:45 +0100
|
2018-11-08 17:02:33 +00:00
|
|
|
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>
|
2019-05-07 21:00:36 +00:00
|
|
|
|
|
|
|
Rebase changes (4.0.0):
|
|
|
|
- Remove e1000 device duplication changes to reflect upstream solution
|
|
|
|
- Rewrite machine compat properties to upstream solution
|
|
|
|
|
2019-11-15 14:35:04 +00:00
|
|
|
Rebase changes (4.1.0):
|
2019-08-15 04:45:41 +00:00
|
|
|
- Removed optional flag for machine compat properties (upstream)
|
|
|
|
- Remove c3e002cb chunk from hw/net/e1000.c
|
|
|
|
- Reorder compat structures
|
|
|
|
- Use one format for compat scructures
|
|
|
|
- Added compat for virtio-balloon-pci.any_layout for rhel71
|
|
|
|
|
2019-05-07 21:00:36 +00:00
|
|
|
Merged patches (4.0.0):
|
|
|
|
- d4c0957 compat: Generic HW_COMPAT_RHEL7_6
|
|
|
|
- cbac773 virtio: Make disable-legacy/disable-modern compat properties optional
|
|
|
|
|
2019-11-15 14:35:04 +00:00
|
|
|
Merged patches (4.1.0):
|
2019-08-15 04:45:41 +00:00
|
|
|
- 479ad30 redhat: fix cut'n'paste garbage in hw_compat comments
|
|
|
|
- f19738e compat: Generic hw_compat_rhel_8_0
|
2019-08-19 21:26:36 +00:00
|
|
|
|
2019-12-13 13:10:42 +00:00
|
|
|
Merged patches (4.2.0):
|
2019-11-15 14:35:04 +00:00
|
|
|
- 9f2bfaa machine types: Update hw_compat_rhel_8_0 from hw_compat_4_0
|
|
|
|
- ca4a5e8 virtio: Make disable-legacy/disable-modern compat properties optional
|
2019-12-13 13:10:42 +00:00
|
|
|
- compat: Generic hw_compat_rhel_8_1 (patch 93040/92956)
|
2019-11-15 14:35:04 +00:00
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
Merged patches (5.1.0):
|
2020-05-13 01:03:43 +00:00
|
|
|
- e6c3fbf hw/smbios: set new default SMBIOS fields for Windows driver support (partialy)
|
2020-07-08 13:37:45 +00:00
|
|
|
- 8f9f4d8 compat: disable 'edid' for virtio-gpu-ccw
|
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
Merged patches (5.2.0 rc0):
|
|
|
|
- 8348642 redhat: define hw_compat_8_2
|
|
|
|
- 45b8402 redhat: define hw_compat_8_2
|
|
|
|
- 4effa71 redhat: Update hw_compat_8_2
|
|
|
|
- 0e84dff virtio: skip legacy support check on machine types less than 5.1 (partialy)
|
2018-11-08 17:02:33 +00:00
|
|
|
---
|
2020-11-13 13:09:35 +00:00
|
|
|
hw/acpi/ich9.c | 15 +++
|
2020-05-13 01:03:43 +00:00
|
|
|
hw/acpi/piix4.c | 5 +-
|
|
|
|
hw/arm/virt.c | 2 +-
|
|
|
|
hw/char/serial.c | 16 ++++
|
2020-11-13 13:09:35 +00:00
|
|
|
hw/core/machine.c | 213 +++++++++++++++++++++++++++++++++++++++++++
|
2020-05-13 01:03:43 +00:00
|
|
|
hw/display/vga-isa.c | 2 +-
|
|
|
|
hw/i386/pc_piix.c | 2 +
|
|
|
|
hw/i386/pc_q35.c | 2 +
|
2020-07-15 20:28:51 +00:00
|
|
|
hw/net/e1000e.c | 21 +++++
|
2020-05-13 01:03:43 +00:00
|
|
|
hw/net/rtl8139.c | 4 +-
|
|
|
|
hw/rtc/mc146818rtc.c | 6 ++
|
2020-07-15 20:28:51 +00:00
|
|
|
hw/smbios/smbios.c | 46 +++++++++-
|
2020-05-13 01:03:43 +00:00
|
|
|
hw/timer/i8254_common.c | 2 +-
|
|
|
|
hw/usb/hcd-uhci.c | 4 +-
|
2020-11-13 13:09:35 +00:00
|
|
|
hw/usb/hcd-xhci.c | 20 ++++
|
2020-05-13 01:03:43 +00:00
|
|
|
hw/usb/hcd-xhci.h | 2 +
|
|
|
|
include/hw/acpi/ich9.h | 3 +
|
2020-11-13 13:09:35 +00:00
|
|
|
include/hw/boards.h | 27 ++++++
|
2020-05-13 01:03:43 +00:00
|
|
|
include/hw/firmware/smbios.h | 5 +-
|
|
|
|
include/hw/i386/pc.h | 3 +
|
|
|
|
include/hw/usb.h | 4 +
|
|
|
|
migration/migration.c | 2 +
|
2020-11-13 13:09:35 +00:00
|
|
|
migration/migration.h | 5 +
|
|
|
|
23 files changed, 400 insertions(+), 11 deletions(-)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index f9690a0..f6c6c6a 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/acpi/ich9.c
|
|
|
|
+++ b/hw/acpi/ich9.c
|
2020-05-13 01:03:43 +00:00
|
|
|
@@ -369,6 +369,18 @@ static void ich9_pm_set_enable_tco(Object *obj, bool value, Error **errp)
|
2018-11-08 17:02:33 +00:00
|
|
|
s->pm.enable_tco = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static bool ich9_pm_get_force_rev1_fadt(Object *obj, Error **errp)
|
|
|
|
+{
|
|
|
|
+ ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
|
|
|
|
+ return s->pm.force_rev1_fadt;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void ich9_pm_set_force_rev1_fadt(Object *obj, bool value, Error **errp)
|
|
|
|
+{
|
|
|
|
+ ICH9LPCState *s = ICH9_LPC_DEVICE(obj);
|
|
|
|
+ s->pm.force_rev1_fadt = value;
|
|
|
|
+}
|
|
|
|
+
|
2020-07-08 13:37:45 +00:00
|
|
|
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
|
2018-11-08 17:02:33 +00:00
|
|
|
{
|
|
|
|
static const uint32_t gpe0_len = ICH9_PMIO_GPE0_LEN;
|
2020-07-08 13:37:45 +00:00
|
|
|
@@ -391,6 +403,9 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
|
|
|
|
object_property_add_bool(obj, "cpu-hotplug-legacy",
|
2018-11-08 17:02:33 +00:00
|
|
|
ich9_pm_get_cpu_hotplug_legacy,
|
2020-07-08 13:37:45 +00:00
|
|
|
ich9_pm_set_cpu_hotplug_legacy);
|
2018-11-08 17:02:33 +00:00
|
|
|
+ object_property_add_bool(obj, "__com.redhat_force-rev1-fadt",
|
|
|
|
+ ich9_pm_get_force_rev1_fadt,
|
2020-07-08 13:37:45 +00:00
|
|
|
+ ich9_pm_set_force_rev1_fadt);
|
2020-05-13 01:03:43 +00:00
|
|
|
object_property_add_uint8_ptr(obj, ACPI_PM_PROP_S3_DISABLED,
|
2020-07-08 13:37:45 +00:00
|
|
|
&pm->disable_s3, OBJ_PROP_FLAG_READWRITE);
|
|
|
|
object_property_add_uint8_ptr(obj, ACPI_PM_PROP_S4_DISABLED,
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 67a1ea4..85312a3 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/acpi/piix4.c
|
|
|
|
+++ b/hw/acpi/piix4.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -277,6 +277,7 @@ static const VMStateDescription vmstate_acpi = {
|
2018-11-08 17:02:33 +00:00
|
|
|
.name = "piix4_pm",
|
|
|
|
.version_id = 3,
|
2019-11-15 14:35:04 +00:00
|
|
|
.minimum_version_id = 3,
|
2018-11-08 17:02:33 +00:00
|
|
|
+ .minimum_version_id = 2,
|
|
|
|
.post_load = vmstate_acpi_post_load,
|
2019-11-15 14:35:04 +00:00
|
|
|
.fields = (VMStateField[]) {
|
|
|
|
VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState),
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -633,8 +634,8 @@ static void piix4_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
static Property piix4_pm_properties[] = {
|
|
|
|
DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
|
|
|
|
- DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 0),
|
|
|
|
- DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 0),
|
|
|
|
+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S3_DISABLED, PIIX4PMState, disable_s3, 1),
|
|
|
|
+ DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_DISABLED, PIIX4PMState, disable_s4, 1),
|
|
|
|
DEFINE_PROP_UINT8(ACPI_PM_PROP_S4_VAL, PIIX4PMState, s4_val, 2),
|
|
|
|
DEFINE_PROP_BOOL("acpi-pci-hotplug-with-bridge-support", PIIX4PMState,
|
2020-07-08 13:37:45 +00:00
|
|
|
use_acpi_hotplug_bridge, true),
|
2020-05-13 01:03:43 +00:00
|
|
|
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 27dbeb5..c908b5f 100644
|
2020-05-13 01:03:43 +00:00
|
|
|
--- a/hw/arm/virt.c
|
|
|
|
+++ b/hw/arm/virt.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -1441,7 +1441,7 @@ static void virt_build_smbios(VirtMachineState *vms)
|
2020-05-13 01:03:43 +00:00
|
|
|
|
|
|
|
smbios_set_defaults("QEMU", product,
|
|
|
|
vmc->smbios_old_sys_ver ? "1.0" : mc->name, false,
|
|
|
|
- true, SMBIOS_ENTRY_POINT_30);
|
|
|
|
+ true, NULL, NULL, SMBIOS_ENTRY_POINT_30);
|
|
|
|
|
|
|
|
smbios_get_tables(MACHINE(vms), NULL, 0, &smbios_tables, &smbios_tables_len,
|
|
|
|
&smbios_anchor, &smbios_anchor_len);
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/char/serial.c b/hw/char/serial.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 97f7187..aeb207e 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/char/serial.c
|
|
|
|
+++ b/hw/char/serial.c
|
2020-05-13 01:03:43 +00:00
|
|
|
@@ -35,6 +35,7 @@
|
2018-11-08 17:02:33 +00:00
|
|
|
#include "qemu/error-report.h"
|
|
|
|
#include "trace.h"
|
2020-05-13 01:03:43 +00:00
|
|
|
#include "hw/qdev-properties.h"
|
2018-11-08 17:02:33 +00:00
|
|
|
+#include "migration/migration.h"
|
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */
|
2018-11-08 17:02:33 +00:00
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -691,6 +692,9 @@ static int serial_post_load(void *opaque, int version_id)
|
2018-11-08 17:02:33 +00:00
|
|
|
static bool serial_thr_ipending_needed(void *opaque)
|
|
|
|
{
|
|
|
|
SerialState *s = opaque;
|
|
|
|
+ if (migrate_pre_2_2) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (s->ier & UART_IER_THRI) {
|
|
|
|
bool expected_value = ((s->iir & UART_IIR_ID) == UART_IIR_THRI);
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -772,6 +776,10 @@ static const VMStateDescription vmstate_serial_xmit_fifo = {
|
2018-11-08 17:02:33 +00:00
|
|
|
static bool serial_fifo_timeout_timer_needed(void *opaque)
|
|
|
|
{
|
|
|
|
SerialState *s = (SerialState *)opaque;
|
|
|
|
+ if (migrate_pre_2_2) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
return timer_pending(s->fifo_timeout_timer);
|
|
|
|
}
|
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -789,6 +797,10 @@ static const VMStateDescription vmstate_serial_fifo_timeout_timer = {
|
2018-11-08 17:02:33 +00:00
|
|
|
static bool serial_timeout_ipending_needed(void *opaque)
|
|
|
|
{
|
|
|
|
SerialState *s = (SerialState *)opaque;
|
|
|
|
+ if (migrate_pre_2_2) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
return s->timeout_ipending != 0;
|
|
|
|
}
|
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -806,6 +818,10 @@ static const VMStateDescription vmstate_serial_timeout_ipending = {
|
2018-11-08 17:02:33 +00:00
|
|
|
static bool serial_poll_needed(void *opaque)
|
|
|
|
{
|
|
|
|
SerialState *s = (SerialState *)opaque;
|
|
|
|
+ if (migrate_pre_2_2) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
return s->poll_msl >= 0;
|
|
|
|
}
|
|
|
|
|
2019-05-07 21:00:36 +00:00
|
|
|
diff --git a/hw/core/machine.c b/hw/core/machine.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 98b87f7..8674586 100644
|
2019-05-07 21:00:36 +00:00
|
|
|
--- a/hw/core/machine.c
|
|
|
|
+++ b/hw/core/machine.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -28,6 +28,219 @@
|
2019-05-07 21:00:36 +00:00
|
|
|
#include "hw/mem/nvdimm.h"
|
2020-05-13 01:03:43 +00:00
|
|
|
#include "migration/vmstate.h"
|
2019-05-07 21:00:36 +00:00
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
+/*
|
|
|
|
+ * The same as hw_compat_4_2 + hw_compat_5_0
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_8_2[] = {
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "virtio-blk-device", "queue-size", "128"},
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "virtio-scsi-device", "virtqueue_size", "128"},
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "virtio-blk-device", "seg-max-adjust", "off"},
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "virtio-scsi-device", "seg_max_adjust", "off"},
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "vhost-blk-device", "seg_max_adjust", "off"},
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "usb-host", "suppress-remote-wake", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "usb-redir", "suppress-remote-wake", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "qxl", "revision", "4" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "qxl-vga", "revision", "4" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_4_2 */
|
|
|
|
+ { "fw_cfg", "acpi-mr-restore", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "pci-host-bridge", "x-config-reg-migration-enabled", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "virtio-balloon-device", "page-poison", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "vmport", "x-read-set-eax", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "vmport", "x-signal-unsupported-cmd", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "vmport", "x-report-vmx-type", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "vmport", "x-cmds-v2", "off" },
|
|
|
|
+ /* hw_compat_rhel_8_2 from hw_compat_5_0 */
|
|
|
|
+ { "virtio-device", "x-disable-legacy-check", "true" },
|
|
|
|
+};
|
|
|
|
+const size_t hw_compat_rhel_8_2_len = G_N_ELEMENTS(hw_compat_rhel_8_2);
|
|
|
|
+
|
2019-12-13 13:10:42 +00:00
|
|
|
+/*
|
|
|
|
+ * The same as hw_compat_4_1
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_8_1[] = {
|
|
|
|
+ /* hw_compat_rhel_8_1 from hw_compat_4_1 */
|
|
|
|
+ { "virtio-pci", "x-pcie-flr-init", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t hw_compat_rhel_8_1_len = G_N_ELEMENTS(hw_compat_rhel_8_1);
|
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+/* The same as hw_compat_3_1
|
|
|
|
+ * format of array has been changed by:
|
|
|
|
+ * 6c36bddf5340 ("machine: Use shorter format for GlobalProperty arrays")
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_8_0[] = {
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "pcie-root-port", "x-speed", "2_5" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "pcie-root-port", "x-width", "1" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "memory-backend-file", "x-use-canonical-path-for-ramblock-id", "true" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "memory-backend-memfd", "x-use-canonical-path-for-ramblock-id", "true" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "tpm-crb", "ppi", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "tpm-tis", "ppi", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "usb-kbd", "serial", "42" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "usb-mouse", "serial", "42" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "usb-tablet", "serial", "42" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "virtio-blk-device", "discard", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 */
|
|
|
|
+ { "virtio-blk-device", "write-zeroes", "false" },
|
2019-11-15 14:35:04 +00:00
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
|
|
|
+ { "VGA", "edid", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
|
|
|
+ { "secondary-vga", "edid", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
|
|
|
+ { "bochs-display", "edid", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
|
|
|
+ { "virtio-vga", "edid", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
2020-07-08 13:37:45 +00:00
|
|
|
+ { "virtio-gpu-device", "edid", "false" },
|
2019-11-15 14:35:04 +00:00
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_4_0 */
|
|
|
|
+ { "virtio-device", "use-started", "false" },
|
|
|
|
+ /* hw_compat_rhel_8_0 from hw_compat_3_1 - that was added in 4.1 */
|
|
|
|
+ { "pcie-root-port-base", "disable-acs", "true" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_8_0_len = G_N_ELEMENTS(hw_compat_rhel_8_0);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+/* The same as hw_compat_3_0 + hw_compat_2_12
|
|
|
|
+ * except that
|
|
|
|
+ * there's nothing in 3_0
|
|
|
|
+ * migration.decompress-error-check=off was in 7.5 from bz 1584139
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_7_6[] = {
|
|
|
|
+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */
|
|
|
|
+ { "hda-audio", "use-timer", "false" },
|
|
|
|
+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */
|
|
|
|
+ { "cirrus-vga", "global-vmstate", "true" },
|
|
|
|
+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */
|
|
|
|
+ { "VGA", "global-vmstate", "true" },
|
|
|
|
+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */
|
|
|
|
+ { "vmware-svga", "global-vmstate", "true" },
|
|
|
|
+ /* hw_compat_rhel_7_6 from hw_compat_2_12 */
|
|
|
|
+ { "qxl-vga", "global-vmstate", "true" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_7_6_len = G_N_ELEMENTS(hw_compat_rhel_7_6);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+/* The same as hw_compat_2_11 + hw_compat_2_10 */
|
|
|
|
+GlobalProperty hw_compat_rhel_7_5[] = {
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
|
|
|
+ { "hpet", "hpet-offset-saved", "false" },
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
|
|
|
+ { "virtio-blk-pci", "vectors", "2" },
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_11 */
|
|
|
|
+ { "vhost-user-blk-pci", "vectors", "2" },
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_11
|
|
|
|
+ bz 1608778 modified for our naming */
|
|
|
|
+ { "e1000-82540em", "migrate_tso_props", "off" },
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_10 */
|
|
|
|
+ { "virtio-mouse-device", "wheel-axis", "false" },
|
|
|
|
+ /* hw_compat_rhel_7_5 from hw_compat_2_10 */
|
|
|
|
+ { "virtio-tablet-device", "wheel-axis", "false" },
|
|
|
|
+ { "cirrus-vga", "vgamem_mb", "16" },
|
|
|
|
+ { "migration", "decompress-error-check", "off" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_7_5_len = G_N_ELEMENTS(hw_compat_rhel_7_5);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
|
|
|
+/* Mostly like hw_compat_2_9 except
|
2019-08-15 04:45:41 +00:00
|
|
|
+ * x-mtu-bypass-backend, x-migrate-msix has already been
|
|
|
|
+ * backported to RHEL7.4. shpc was already on in 7.4.
|
|
|
|
+ */
|
2019-05-07 21:00:36 +00:00
|
|
|
+GlobalProperty hw_compat_rhel_7_4[] = {
|
2019-08-15 04:45:41 +00:00
|
|
|
+ { "intel-iommu", "pt", "off" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_7_4_len = G_N_ELEMENTS(hw_compat_rhel_7_4);
|
|
|
|
+/* Mostly like HW_COMPAT_2_6 + HW_COMPAT_2_7 + HW_COMPAT_2_8 except
|
|
|
|
+ * disable-modern, disable-legacy, page-per-vq have already been
|
|
|
|
+ * backported to RHEL7.3
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_7_3[] = {
|
|
|
|
+ { "virtio-mmio", "format_transport_address", "off" },
|
|
|
|
+ { "virtio-serial-device", "emergency-write", "off" },
|
|
|
|
+ { "ioapic", "version", "0x11" },
|
|
|
|
+ { "intel-iommu", "x-buggy-eim", "true" },
|
|
|
|
+ { "virtio-pci", "x-ignore-backend-features", "on" },
|
|
|
|
+ { "fw_cfg_mem", "x-file-slots", stringify(0x10) },
|
|
|
|
+ { "fw_cfg_io", "x-file-slots", stringify(0x10) },
|
|
|
|
+ { "pflash_cfi01", "old-multiple-chip-handling", "on" },
|
|
|
|
+ { TYPE_PCI_DEVICE, "x-pcie-extcap-init", "off" },
|
|
|
|
+ { "virtio-pci", "x-pcie-deverr-init", "off" },
|
|
|
|
+ { "virtio-pci", "x-pcie-lnkctl-init", "off" },
|
|
|
|
+ { "virtio-pci", "x-pcie-pm-init", "off" },
|
|
|
|
+ { "virtio-net-device", "x-mtu-bypass-backend", "off" },
|
|
|
|
+ { "e1000e", "__redhat_e1000e_7_3_intr_state", "on" },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_7_3_len = G_N_ELEMENTS(hw_compat_rhel_7_3);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+/* Mostly like hw_compat_2_4 + 2_3 but:
|
|
|
|
+ * we don't need "any_layout" as it has been backported to 7.2
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_7_2[] = {
|
|
|
|
+ { "virtio-blk-device", "scsi", "true" },
|
|
|
|
+ { "e1000-82540em", "extra_mac_registers", "off" },
|
|
|
|
+ { "virtio-pci", "x-disable-pcie", "on" },
|
|
|
|
+ { "virtio-pci", "migrate-extra", "off" },
|
|
|
|
+ { "fw_cfg_mem", "dma_enabled", "off" },
|
|
|
|
+ { "fw_cfg_io", "dma_enabled", "off" },
|
|
|
|
+ { "isa-fdc", "fallback", "144" },
|
2019-11-15 14:35:04 +00:00
|
|
|
+ /* Optional because not all virtio-pci devices support legacy mode */
|
|
|
|
+ { "virtio-pci", "disable-modern", "on", .optional = true },
|
|
|
|
+ { "virtio-pci", "disable-legacy", "off", .optional = true },
|
2019-08-15 04:45:41 +00:00
|
|
|
+ { TYPE_PCI_DEVICE, "x-pcie-lnksta-dllla", "off" },
|
|
|
|
+ { "virtio-pci", "page-per-vq", "on" },
|
|
|
|
+ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */
|
|
|
|
+ { "migration", "send-section-footer", "off" },
|
|
|
|
+ /* hw_compat_rhel_7_2 - introduced with 2.10.0 */
|
|
|
|
+ { "migration", "store-global-state", "off",
|
|
|
|
+ },
|
2019-05-07 21:00:36 +00:00
|
|
|
+};
|
2019-08-15 04:45:41 +00:00
|
|
|
+const size_t hw_compat_rhel_7_2_len = G_N_ELEMENTS(hw_compat_rhel_7_2);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+/* Mostly like hw_compat_2_1 but:
|
|
|
|
+ * we don't need virtio-scsi-pci since 7.0 already had that on
|
|
|
|
+ *
|
|
|
|
+ * RH: Note, qemu-extended-regs should have been enabled in the 7.1
|
|
|
|
+ * machine type, but was accidentally turned off in 7.2 onwards.
|
|
|
|
+ */
|
|
|
|
+GlobalProperty hw_compat_rhel_7_1[] = {
|
|
|
|
+ { "intel-hda-generic", "old_msi_addr", "on" },
|
|
|
|
+ { "VGA", "qemu-extended-regs", "off" },
|
|
|
|
+ { "secondary-vga", "qemu-extended-regs", "off" },
|
|
|
|
+ { "usb-mouse", "usb_version", stringify(1) },
|
|
|
|
+ { "usb-kbd", "usb_version", stringify(1) },
|
|
|
|
+ { "virtio-pci", "virtio-pci-bus-master-bug-migration", "on" },
|
|
|
|
+ { "virtio-blk-pci", "any_layout", "off" },
|
|
|
|
+ { "virtio-balloon-pci", "any_layout", "off" },
|
|
|
|
+ { "virtio-serial-pci", "any_layout", "off" },
|
|
|
|
+ { "virtio-9p-pci", "any_layout", "off" },
|
|
|
|
+ { "virtio-rng-pci", "any_layout", "off" },
|
|
|
|
+ /* HW_COMPAT_RHEL7_1 - introduced with 2.10.0 */
|
|
|
|
+ { "migration", "send-configuration", "off" },
|
|
|
|
+};
|
|
|
|
+const size_t hw_compat_rhel_7_1_len = G_N_ELEMENTS(hw_compat_rhel_7_1);
|
2019-05-07 21:00:36 +00:00
|
|
|
+
|
2020-11-13 13:09:35 +00:00
|
|
|
GlobalProperty hw_compat_5_1[] = {
|
|
|
|
{ "vhost-scsi", "num_queues", "1"},
|
|
|
|
{ "vhost-user-blk", "num-queues", "1"},
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 90851e7..a91c5d7 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/display/vga-isa.c
|
|
|
|
+++ b/hw/display/vga-isa.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -85,7 +85,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
|
2018-11-08 17:02:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static Property vga_isa_properties[] = {
|
|
|
|
- DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
|
|
|
|
+ DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 16),
|
|
|
|
DEFINE_PROP_END_OF_LIST(),
|
|
|
|
};
|
|
|
|
|
2020-05-13 01:03:43 +00:00
|
|
|
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 13d1628..9fcc5aa 100644
|
2020-05-13 01:03:43 +00:00
|
|
|
--- a/hw/i386/pc_piix.c
|
|
|
|
+++ b/hw/i386/pc_piix.c
|
2020-07-08 13:37:45 +00:00
|
|
|
@@ -179,6 +179,8 @@ static void pc_init1(MachineState *machine,
|
2020-05-13 01:03:43 +00:00
|
|
|
smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
|
|
|
|
mc->name, pcmc->smbios_legacy_mode,
|
|
|
|
pcmc->smbios_uuid_encoded,
|
|
|
|
+ pcmc->smbios_stream_product,
|
|
|
|
+ pcmc->smbios_stream_version,
|
|
|
|
SMBIOS_ENTRY_POINT_21);
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index a3f4959..f6c2ef4 100644
|
2020-05-13 01:03:43 +00:00
|
|
|
--- a/hw/i386/pc_q35.c
|
|
|
|
+++ b/hw/i386/pc_q35.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -198,6 +198,8 @@ static void pc_q35_init(MachineState *machine)
|
2020-05-13 01:03:43 +00:00
|
|
|
smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
|
|
|
|
mc->name, pcmc->smbios_legacy_mode,
|
|
|
|
pcmc->smbios_uuid_encoded,
|
|
|
|
+ pcmc->smbios_stream_product,
|
|
|
|
+ pcmc->smbios_stream_version,
|
|
|
|
SMBIOS_ENTRY_POINT_21);
|
|
|
|
}
|
|
|
|
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index b6f1ae3..19955eb 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/net/e1000e.c
|
|
|
|
+++ b/hw/net/e1000e.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -80,6 +80,11 @@ struct E1000EState {
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
E1000ECore core;
|
|
|
|
|
|
|
|
+ /* 7.3 had the intr_state field that was in the original e1000e code
|
|
|
|
+ * but that was removed prior to 2.7's release
|
|
|
|
+ */
|
|
|
|
+ bool redhat_7_3_intr_state_enable;
|
|
|
|
+ uint32_t redhat_7_3_intr_state;
|
2020-11-13 13:09:35 +00:00
|
|
|
};
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
#define E1000E_MMIO_IDX 0
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -95,6 +100,10 @@ struct E1000EState {
|
2018-11-08 17:02:33 +00:00
|
|
|
#define E1000E_MSIX_TABLE (0x0000)
|
|
|
|
#define E1000E_MSIX_PBA (0x2000)
|
|
|
|
|
|
|
|
+/* Values as in RHEL 7.3 build and original upstream */
|
|
|
|
+#define RH_E1000E_USE_MSI BIT(0)
|
|
|
|
+#define RH_E1000E_USE_MSIX BIT(1)
|
|
|
|
+
|
|
|
|
static uint64_t
|
|
|
|
e1000e_mmio_read(void *opaque, hwaddr addr, unsigned size)
|
|
|
|
{
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -306,6 +315,8 @@ e1000e_init_msix(E1000EState *s)
|
2018-11-08 17:02:33 +00:00
|
|
|
} else {
|
|
|
|
if (!e1000e_use_msix_vectors(s, E1000E_MSIX_VEC_NUM)) {
|
|
|
|
msix_uninit(d, &s->msix, &s->msix);
|
|
|
|
+ } else {
|
|
|
|
+ s->redhat_7_3_intr_state |= RH_E1000E_USE_MSIX;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -477,6 +488,8 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Error **errp)
|
2018-11-08 17:02:33 +00:00
|
|
|
ret = msi_init(PCI_DEVICE(s), 0xD0, 1, true, false, NULL);
|
|
|
|
if (ret) {
|
|
|
|
trace_e1000e_msi_init_fail(ret);
|
|
|
|
+ } else {
|
|
|
|
+ s->redhat_7_3_intr_state |= RH_E1000E_USE_MSI;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (e1000e_add_pm_capability(pci_dev, e1000e_pmrb_offset,
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -600,6 +613,11 @@ static const VMStateDescription e1000e_vmstate_intr_timer = {
|
2018-11-08 17:02:33 +00:00
|
|
|
VMSTATE_STRUCT_ARRAY(_f, _s, _num, 0, \
|
|
|
|
e1000e_vmstate_intr_timer, E1000IntrDelayTimer)
|
|
|
|
|
|
|
|
+static bool rhel_7_3_check(void *opaque, int version_id)
|
|
|
|
+{
|
|
|
|
+ return ((E1000EState *)opaque)->redhat_7_3_intr_state_enable;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
static const VMStateDescription e1000e_vmstate = {
|
|
|
|
.name = "e1000e",
|
|
|
|
.version_id = 1,
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -611,6 +629,7 @@ static const VMStateDescription e1000e_vmstate = {
|
2018-11-08 17:02:33 +00:00
|
|
|
VMSTATE_MSIX(parent_obj, E1000EState),
|
|
|
|
|
|
|
|
VMSTATE_UINT32(ioaddr, E1000EState),
|
|
|
|
+ VMSTATE_UINT32_TEST(redhat_7_3_intr_state, E1000EState, rhel_7_3_check),
|
|
|
|
VMSTATE_UINT32(core.rxbuf_min_shift, E1000EState),
|
|
|
|
VMSTATE_UINT8(core.rx_desc_len, E1000EState),
|
|
|
|
VMSTATE_UINT32_ARRAY(core.rxbuf_sizes, E1000EState,
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -659,6 +678,8 @@ static PropertyInfo e1000e_prop_disable_vnet,
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
static Property e1000e_properties[] = {
|
|
|
|
DEFINE_NIC_PROPERTIES(E1000EState, conf),
|
|
|
|
+ DEFINE_PROP_BOOL("__redhat_e1000e_7_3_intr_state", E1000EState,
|
|
|
|
+ redhat_7_3_intr_state_enable, false),
|
|
|
|
DEFINE_PROP_SIGNED("disable_vnet_hdr", E1000EState, disable_vnet, false,
|
|
|
|
e1000e_prop_disable_vnet, bool),
|
|
|
|
DEFINE_PROP_SIGNED("subsys_ven", E1000EState, subsys_ven,
|
|
|
|
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index ba5ace1..a2e6e83 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/net/rtl8139.c
|
|
|
|
+++ b/hw/net/rtl8139.c
|
2020-05-13 01:03:43 +00:00
|
|
|
@@ -3179,7 +3179,7 @@ static int rtl8139_pre_save(void *opaque)
|
2018-11-08 17:02:33 +00:00
|
|
|
|
|
|
|
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,
|
2020-05-13 01:03:43 +00:00
|
|
|
@@ -3260,7 +3260,9 @@ static const VMStateDescription vmstate_rtl8139 = {
|
2018-11-08 17:02:33 +00:00
|
|
|
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),
|
|
|
|
|
2019-11-15 14:35:04 +00:00
|
|
|
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 7a38540..377d861 100644
|
2019-11-15 14:35:04 +00:00
|
|
|
--- a/hw/rtc/mc146818rtc.c
|
|
|
|
+++ b/hw/rtc/mc146818rtc.c
|
2020-07-08 13:37:45 +00:00
|
|
|
@@ -43,6 +43,7 @@
|
2019-11-15 14:35:04 +00:00
|
|
|
#include "qapi/visitor.h"
|
|
|
|
#include "exec/address-spaces.h"
|
|
|
|
#include "hw/rtc/mc146818rtc_regs.h"
|
|
|
|
+#include "migration/migration.h"
|
|
|
|
|
|
|
|
#ifdef TARGET_I386
|
|
|
|
#include "qapi/qapi-commands-misc-target.h"
|
2020-07-08 13:37:45 +00:00
|
|
|
@@ -821,6 +822,11 @@ static int rtc_post_load(void *opaque, int version_id)
|
2019-11-15 14:35:04 +00:00
|
|
|
static bool rtc_irq_reinject_on_ack_count_needed(void *opaque)
|
|
|
|
{
|
|
|
|
RTCState *s = (RTCState *)opaque;
|
|
|
|
+
|
|
|
|
+ if (migrate_pre_2_2) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
return s->irq_reinject_on_ack_count != 0;
|
|
|
|
}
|
|
|
|
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 6a3d397..232fd61 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/smbios/smbios.c
|
|
|
|
+++ b/hw/smbios/smbios.c
|
2020-05-13 01:03:43 +00:00
|
|
|
@@ -56,6 +56,9 @@ static bool smbios_legacy = true;
|
|
|
|
static bool smbios_uuid_encoded = true;
|
|
|
|
/* end: legacy structures & constants for <= 2.0 machines */
|
|
|
|
|
|
|
|
+/* Set to true for modern Windows 10 HardwareID-6 compat */
|
|
|
|
+static bool smbios_type2_required;
|
|
|
|
+
|
|
|
|
|
|
|
|
uint8_t *smbios_tables;
|
|
|
|
size_t smbios_tables_len;
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -570,7 +573,7 @@ static void smbios_build_type_1_table(void)
|
2020-05-13 01:03:43 +00:00
|
|
|
|
|
|
|
static void smbios_build_type_2_table(void)
|
|
|
|
{
|
|
|
|
- SMBIOS_BUILD_TABLE_PRE(2, 0x200, false); /* optional */
|
|
|
|
+ SMBIOS_BUILD_TABLE_PRE(2, 0x200, smbios_type2_required);
|
|
|
|
|
|
|
|
SMBIOS_TABLE_SET_STR(2, manufacturer_str, type2.manufacturer);
|
|
|
|
SMBIOS_TABLE_SET_STR(2, product_str, type2.product);
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -792,7 +795,10 @@ void smbios_set_cpuid(uint32_t version, uint32_t features)
|
2020-05-13 01:03:43 +00:00
|
|
|
|
|
|
|
void smbios_set_defaults(const char *manufacturer, const char *product,
|
|
|
|
const char *version, bool legacy_mode,
|
|
|
|
- bool uuid_encoded, SmbiosEntryPointType ep_type)
|
|
|
|
+ bool uuid_encoded,
|
|
|
|
+ const char *stream_product,
|
|
|
|
+ const char *stream_version,
|
|
|
|
+ SmbiosEntryPointType ep_type)
|
|
|
|
{
|
|
|
|
smbios_have_defaults = true;
|
|
|
|
smbios_legacy = legacy_mode;
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -813,11 +819,45 @@ void smbios_set_defaults(const char *manufacturer, const char *product,
|
2020-05-13 01:03:43 +00:00
|
|
|
g_free(smbios_entries);
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * 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'
|
|
|
|
+ */
|
2018-11-08 17:02:33 +00:00
|
|
|
SMBIOS_SET_DEFAULT(type1.manufacturer, manufacturer);
|
|
|
|
SMBIOS_SET_DEFAULT(type1.product, product);
|
|
|
|
SMBIOS_SET_DEFAULT(type1.version, version);
|
|
|
|
+ SMBIOS_SET_DEFAULT(type1.family, "Red Hat Enterprise Linux");
|
2020-05-13 01:03:43 +00:00
|
|
|
+ if (stream_version != NULL) {
|
|
|
|
+ SMBIOS_SET_DEFAULT(type1.sku, stream_version);
|
|
|
|
+ }
|
2018-11-08 17:02:33 +00:00
|
|
|
SMBIOS_SET_DEFAULT(type2.manufacturer, manufacturer);
|
2020-05-13 01:03:43 +00:00
|
|
|
- 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);
|
|
|
|
+ }
|
2018-11-08 17:02:33 +00:00
|
|
|
SMBIOS_SET_DEFAULT(type2.version, version);
|
2020-05-13 01:03:43 +00:00
|
|
|
SMBIOS_SET_DEFAULT(type3.manufacturer, manufacturer);
|
|
|
|
SMBIOS_SET_DEFAULT(type3.version, version);
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 050875b..32935da 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/timer/i8254_common.c
|
|
|
|
+++ b/hw/timer/i8254_common.c
|
2019-11-15 14:35:04 +00:00
|
|
|
@@ -231,7 +231,7 @@ static const VMStateDescription vmstate_pit_common = {
|
2018-11-08 17:02:33 +00:00
|
|
|
.pre_save = pit_dispatch_pre_save,
|
|
|
|
.post_load = pit_dispatch_post_load,
|
|
|
|
.fields = (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-uhci.c b/hw/usb/hcd-uhci.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 27ca237..eb24e39 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/usb/hcd-uhci.c
|
|
|
|
+++ b/hw/usb/hcd-uhci.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -1221,12 +1221,14 @@ static void usb_uhci_common_realize(PCIDevice *dev, Error **errp)
|
2018-11-08 17:02:33 +00:00
|
|
|
UHCIState *s = UHCI(dev);
|
|
|
|
uint8_t *pci_conf = s->dev.config;
|
|
|
|
int i;
|
|
|
|
+ int irq_pin;
|
|
|
|
|
|
|
|
pci_conf[PCI_CLASS_PROG] = 0x00;
|
|
|
|
/* TODO: reset value should be 0. */
|
|
|
|
pci_conf[USB_SBRN] = USB_RELEASE_1; // release number
|
|
|
|
|
|
|
|
- pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1);
|
|
|
|
+ irq_pin = u->info.irq_pin;
|
|
|
|
+ pci_config_set_interrupt_pin(pci_conf, irq_pin + 1);
|
|
|
|
|
|
|
|
if (s->masterbus) {
|
|
|
|
USBPort *ports[NB_PORTS];
|
|
|
|
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 79ce5c4..325cd02 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/usb/hcd-xhci.c
|
|
|
|
+++ b/hw/usb/hcd-xhci.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -3486,9 +3486,27 @@ static const VMStateDescription vmstate_xhci_slot = {
|
2018-11-08 17:02:33 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
+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),
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -3497,6 +3515,8 @@ static const VMStateDescription vmstate_xhci_event = {
|
2018-11-08 17:02:33 +00:00
|
|
|
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
|
2020-11-13 13:09:35 +00:00
|
|
|
index ccf50ae..8716904 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/hw/usb/hcd-xhci.h
|
|
|
|
+++ b/hw/usb/hcd-xhci.h
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -149,6 +149,8 @@ typedef struct XHCIEvent {
|
2018-11-08 17:02:33 +00:00
|
|
|
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/acpi/ich9.h b/include/hw/acpi/ich9.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index 28a5318..ff4a672 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/include/hw/acpi/ich9.h
|
|
|
|
+++ b/include/hw/acpi/ich9.h
|
|
|
|
@@ -61,6 +61,9 @@ typedef struct ICH9LPCPMRegs {
|
|
|
|
uint8_t smm_enabled;
|
|
|
|
bool enable_tco;
|
|
|
|
TCOIORegs tco_regs;
|
|
|
|
+
|
|
|
|
+ /* RH addition, see bz 1489800 */
|
|
|
|
+ bool force_rev1_fadt;
|
|
|
|
} ICH9LPCPMRegs;
|
|
|
|
|
|
|
|
#define ACPI_PM_PROP_TCO_ENABLED "enable_tco"
|
2019-05-07 21:00:36 +00:00
|
|
|
diff --git a/include/hw/boards.h b/include/hw/boards.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index a49e3a6..dd18c9e 100644
|
2019-05-07 21:00:36 +00:00
|
|
|
--- a/include/hw/boards.h
|
|
|
|
+++ b/include/hw/boards.h
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -367,4 +367,31 @@ extern const size_t hw_compat_2_2_len;
|
2019-05-07 21:00:36 +00:00
|
|
|
extern GlobalProperty hw_compat_2_1[];
|
|
|
|
extern const size_t hw_compat_2_1_len;
|
|
|
|
|
2020-11-13 13:09:35 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_8_2[];
|
|
|
|
+extern const size_t hw_compat_rhel_8_2_len;
|
|
|
|
+
|
2019-12-13 13:10:42 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_8_1[];
|
|
|
|
+extern const size_t hw_compat_rhel_8_1_len;
|
|
|
|
+
|
2019-08-15 04:45:41 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_8_0[];
|
|
|
|
+extern const size_t hw_compat_rhel_8_0_len;
|
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_6[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_6_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_5[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_5_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_4[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_4_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_3[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_3_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_2[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_2_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
+extern GlobalProperty hw_compat_rhel_7_1[];
|
|
|
|
+extern const size_t hw_compat_rhel_7_1_len;
|
2018-11-08 17:02:33 +00:00
|
|
|
+
|
2019-05-07 21:00:36 +00:00
|
|
|
#endif
|
2020-05-13 01:03:43 +00:00
|
|
|
diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index 02a0ced..67e38a1 100644
|
2020-05-13 01:03:43 +00:00
|
|
|
--- a/include/hw/firmware/smbios.h
|
|
|
|
+++ b/include/hw/firmware/smbios.h
|
|
|
|
@@ -267,7 +267,10 @@ 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, bool legacy_mode,
|
|
|
|
- bool uuid_encoded, SmbiosEntryPointType ep_type);
|
|
|
|
+ bool uuid_encoded,
|
|
|
|
+ const char *stream_product,
|
|
|
|
+ const char *stream_version,
|
|
|
|
+ SmbiosEntryPointType ep_type);
|
|
|
|
uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length);
|
|
|
|
void smbios_get_tables(MachineState *ms,
|
|
|
|
const struct smbios_phys_mem_area *mem_array,
|
|
|
|
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index 911e460..ae6bf1d 100644
|
2020-05-13 01:03:43 +00:00
|
|
|
--- a/include/hw/i386/pc.h
|
|
|
|
+++ b/include/hw/i386/pc.h
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -104,6 +104,9 @@ struct PCMachineClass {
|
2020-05-13 01:03:43 +00:00
|
|
|
bool smbios_defaults;
|
|
|
|
bool smbios_legacy_mode;
|
|
|
|
bool smbios_uuid_encoded;
|
|
|
|
+ /* 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;
|
2018-11-08 17:02:33 +00:00
|
|
|
diff --git a/include/hw/usb.h b/include/hw/usb.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index a70a72e..78b9043 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/include/hw/usb.h
|
|
|
|
+++ b/include/hw/usb.h
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -570,4 +570,8 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
|
2018-11-08 17:02:33 +00:00
|
|
|
uint8_t interface_class, uint8_t interface_subclass,
|
|
|
|
uint8_t interface_protocol);
|
|
|
|
|
|
|
|
+
|
|
|
|
+/* hcd-xhci.c -- rhel7.0.0 machine type compatibility */
|
|
|
|
+extern bool migrate_cve_2014_5263_xhci_fields;
|
|
|
|
+
|
|
|
|
#endif
|
|
|
|
diff --git a/migration/migration.c b/migration/migration.c
|
2020-11-13 13:09:35 +00:00
|
|
|
index 3263aa5..c8d54ac 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/migration/migration.c
|
|
|
|
+++ b/migration/migration.c
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -134,6 +134,8 @@ enum mig_rp_message_type {
|
2018-11-08 17:02:33 +00:00
|
|
|
MIG_RP_MSG_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
+bool migrate_pre_2_2;
|
|
|
|
+
|
|
|
|
/* When we add fault tolerance, we could have several
|
|
|
|
migrations at once. For now we don't need to add
|
|
|
|
dynamic creation of migration */
|
|
|
|
diff --git a/migration/migration.h b/migration/migration.h
|
2020-11-13 13:09:35 +00:00
|
|
|
index d096b77..6134a53 100644
|
2018-11-08 17:02:33 +00:00
|
|
|
--- a/migration/migration.h
|
|
|
|
+++ b/migration/migration.h
|
2020-11-13 13:09:35 +00:00
|
|
|
@@ -364,6 +364,11 @@ bool check_dirty_bitmap_mig_alias_map(const BitmapMigrationNodeAliasList *bbm,
|
2019-05-07 21:00:36 +00:00
|
|
|
void migrate_add_address(SocketAddress *address);
|
2018-11-08 17:02:33 +00:00
|
|
|
|
2019-05-07 21:00:36 +00:00
|
|
|
int foreach_not_ignored_block(RAMBlockIterFunc func, void *opaque);
|
2018-11-08 17:02:33 +00:00
|
|
|
+/*
|
|
|
|
+ * Disables a load of subsections that were added in 2.2/rh7.2 for backwards
|
|
|
|
+ * migration compatibility.
|
|
|
|
+ */
|
|
|
|
+extern bool migrate_pre_2_2;
|
|
|
|
|
|
|
|
#define qemu_ram_foreach_block \
|
2019-05-07 21:00:36 +00:00
|
|
|
#warning "Use foreach_not_ignored_block in migration code"
|
2018-11-08 17:02:33 +00:00
|
|
|
--
|
2020-11-13 13:09:35 +00:00
|
|
|
1.8.3.1
|
2018-11-08 17:02:33 +00:00
|
|
|
|