summaryrefslogtreecommitdiffstats
path: root/include/hw/i386
diff options
context:
space:
mode:
authorMarian Postevca2021-01-19 01:32:13 +0100
committerMichael S. Tsirkin2021-02-05 14:52:59 +0100
commit602b458201ffd6f261fb8ee16b5175d733d3ec32 (patch)
tree7cd70e99e8b445eea3f4dff35a2cc22f93937bc8 /include/hw/i386
parenttests/acpi: allow updates for expected data files (diff)
downloadqemu-602b458201ffd6f261fb8ee16b5175d733d3ec32.tar.gz
qemu-602b458201ffd6f261fb8ee16b5175d733d3ec32.tar.xz
qemu-602b458201ffd6f261fb8ee16b5175d733d3ec32.zip
acpi: Permit OEM ID and OEM table ID fields to be changed
Qemu's ACPI table generation sets the fields OEM ID and OEM table ID to "BOCHS " and "BXPCxxxx" where "xxxx" is replaced by the ACPI table name. Some games like Red Dead Redemption 2 seem to check the ACPI OEM ID and OEM table ID for the strings "BOCHS" and "BXPC" and if they are found, the game crashes(this may be an intentional detection mechanism to prevent playing the game in a virtualized environment). This patch allows you to override these default values. The feature can be used in this manner: qemu -machine oem-id=ABCDEF,oem-table-id=GHIJKLMN The oem-id string can be up to 6 bytes in size, and the oem-table-id string can be up to 8 bytes in size. If the string are smaller than their respective sizes they will be padded with space. If either of these parameters is not set, the current default values will be used for the one missing. Note that the the OEM Table ID field will not be extended with the name of the table, but will use either the default name or the user provided one. This does not affect the -acpitable option (for user-defined ACPI tables), which has precedence over -machine option. Signed-off-by: Marian Postevca <posteuca@mutex.one> Message-Id: <20210119003216.17637-3-posteuca@mutex.one> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/i386')
-rw-r--r--include/hw/i386/microvm.h4
-rw-r--r--include/hw/i386/pc.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
index f25f837441..372b05774e 100644
--- a/include/hw/i386/microvm.h
+++ b/include/hw/i386/microvm.h
@@ -76,6 +76,8 @@
#define MICROVM_MACHINE_ISA_SERIAL "isa-serial"
#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
+#define MICROVM_MACHINE_OEM_ID "oem-id"
+#define MICROVM_MACHINE_OEM_TABLE_ID "oem-table-id"
struct MicrovmMachineClass {
X86MachineClass parent;
@@ -104,6 +106,8 @@ struct MicrovmMachineState {
Notifier machine_done;
Notifier powerdown_req;
struct GPEXConfig gpex;
+ char *oem_id;
+ char *oem_table_id;
};
#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 2aa8797c6e..5f93540a43 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -45,6 +45,8 @@ typedef struct PCMachineState {
bool pit_enabled;
bool hpet_enabled;
uint64_t max_fw_size;
+ char *oem_id;
+ char *oem_table_id;
/* NUMA information: */
uint64_t numa_nodes;
@@ -62,7 +64,8 @@ typedef struct PCMachineState {
#define PC_MACHINE_SATA "sata"
#define PC_MACHINE_PIT "pit"
#define PC_MACHINE_MAX_FW_SIZE "max-fw-size"
-
+#define PC_MACHINE_OEM_ID "oem-id"
+#define PC_MACHINE_OEM_TABLE_ID "oem-table-id"
/**
* PCMachineClass:
*