diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-18 10:01:00 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-18 10:01:08 +0100 |
commit | adb354dd1e00aa6b8bd674f0e1f70008badded0f (patch) | |
tree | 51c2422717a6421bdc36a54c22bcb1b292aa44b0 /include | |
parent | 897eee242bc081d72ffbf84664c907dcba620ee3 (diff) | |
parent | a764040cc831cfe5b8bf1c80e8341b9bf2de3ce8 (diff) |
Merge remote-tracking branch 'mst/tags/for_upstream' into staging
pci, virtio, vhost: fixes
A bunch of fixes that missed the release.
Most notably we are reverting shpc back to enabled by default state
as guests uses that as an indicator that hotplug is supported
(even though it's unused). Unfortunately we can't fix this
on the stable branch since that would break migration.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Wed 17 May 2017 10:42:06 PM BST
# gpg: using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* mst/tags/for_upstream:
exec: abstract address_space_do_translate()
pci: deassert intx when pci device unrealize
virtio: allow broken device to notify guest
Revert "hw/pci: disable pci-bridge's shpc by default"
acpi-defs: clean up open brace usage
ACPI: don't call acpi_pcihp_device_plug_cb on xen
iommu: Don't crash if machine is not PC_MACHINE
pc: add 2.10 machine type
pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot
libvhost-user: fix crash when rings aren't ready
hw/virtio: fix vhost user fails to startup when MQ
hw/arm/virt: generate 64-bit addressable ACPI objects
hw/acpi-defs: replace leading X with x_ in FADT field names
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/acpi/acpi-defs.h | 45 | ||||
-rw-r--r-- | include/hw/acpi/aml-build.h | 3 | ||||
-rw-r--r-- | include/hw/compat.h | 6 | ||||
-rw-r--r-- | include/hw/i386/pc.h | 10 |
4 files changed, 37 insertions, 27 deletions
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h index 293ee4524b..72be675dd6 100644 --- a/include/hw/acpi/acpi-defs.h +++ b/include/hw/acpi/acpi-defs.h @@ -81,8 +81,8 @@ typedef struct AcpiRsdpDescriptor AcpiRsdpDescriptor; uint32_t asl_compiler_revision; /* ASL compiler revision number */ -struct AcpiTableHeader /* ACPI common table header */ -{ +/* ACPI common table header */ +struct AcpiTableHeader { ACPI_TABLE_HEADER_DEF } QEMU_PACKED; typedef struct AcpiTableHeader AcpiTableHeader; @@ -144,8 +144,8 @@ typedef struct AcpiTableHeader AcpiTableHeader; /* ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */ \ uint16_t arm_boot_flags; \ uint8_t minor_revision; /* FADT Minor Revision (ACPI 5.1) */ \ - uint64_t Xfacs; /* 64-bit physical address of FACS */ \ - uint64_t Xdsdt; /* 64-bit physical address of DSDT */ \ + uint64_t x_facs; /* 64-bit physical address of FACS */ \ + uint64_t x_dsdt; /* 64-bit physical address of DSDT */ \ /* 64-bit Extended Power Mgt 1a Event Reg Blk address */ \ struct AcpiGenericAddress xpm1a_event_block; \ /* 64-bit Extended Power Mgt 1b Event Reg Blk address */ \ @@ -224,8 +224,7 @@ typedef struct AcpiSerialPortConsoleRedirection /* * ACPI 1.0 Root System Description Table (RSDT) */ -struct AcpiRsdtDescriptorRev1 -{ +struct AcpiRsdtDescriptorRev1 { ACPI_TABLE_HEADER_DEF /* ACPI common table header */ uint32_t table_offset_entry[0]; /* Array of pointers to other */ /* ACPI tables */ @@ -233,10 +232,19 @@ struct AcpiRsdtDescriptorRev1 typedef struct AcpiRsdtDescriptorRev1 AcpiRsdtDescriptorRev1; /* + * ACPI 2.0 eXtended System Description Table (XSDT) + */ +struct AcpiXsdtDescriptorRev2 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + uint64_t table_offset_entry[0]; /* Array of pointers to other */ + /* ACPI tables */ +} QEMU_PACKED; +typedef struct AcpiXsdtDescriptorRev2 AcpiXsdtDescriptorRev2; + +/* * ACPI 1.0 Firmware ACPI Control Structure (FACS) */ -struct AcpiFacsDescriptorRev1 -{ +struct AcpiFacsDescriptorRev1 { uint32_t signature; /* ACPI Signature */ uint32_t length; /* Length of structure, in bytes */ uint32_t hardware_signature; /* Hardware configuration signature */ @@ -262,8 +270,7 @@ typedef struct AcpiFacsDescriptorRev1 AcpiFacsDescriptorRev1; /* Master MADT */ -struct AcpiMultipleApicTable -{ +struct AcpiMultipleApicTable { ACPI_TABLE_HEADER_DEF /* ACPI common table header */ uint32_t local_apic_address; /* Physical address of local APIC */ uint32_t flags; @@ -299,8 +306,7 @@ typedef struct AcpiMultipleApicTable AcpiMultipleApicTable; /* Sub-structures for MADT */ -struct AcpiMadtProcessorApic -{ +struct AcpiMadtProcessorApic { ACPI_SUB_HEADER_DEF uint8_t processor_id; /* ACPI processor id */ uint8_t local_apic_id; /* Processor's local APIC id */ @@ -308,8 +314,7 @@ struct AcpiMadtProcessorApic } QEMU_PACKED; typedef struct AcpiMadtProcessorApic AcpiMadtProcessorApic; -struct AcpiMadtIoApic -{ +struct AcpiMadtIoApic { ACPI_SUB_HEADER_DEF uint8_t io_apic_id; /* I/O APIC ID */ uint8_t reserved; /* Reserved - must be zero */ @@ -462,8 +467,7 @@ typedef struct Acpi20Hpet Acpi20Hpet; * SRAT (NUMA topology description) table */ -struct AcpiSystemResourceAffinityTable -{ +struct AcpiSystemResourceAffinityTable { ACPI_TABLE_HEADER_DEF uint32_t reserved1; uint32_t reserved2[2]; @@ -475,8 +479,7 @@ typedef struct AcpiSystemResourceAffinityTable AcpiSystemResourceAffinityTable; #define ACPI_SRAT_PROCESSOR_x2APIC 2 #define ACPI_SRAT_PROCESSOR_GICC 3 -struct AcpiSratProcessorAffinity -{ +struct AcpiSratProcessorAffinity { ACPI_SUB_HEADER_DEF uint8_t proximity_lo; uint8_t local_apic_id; @@ -498,8 +501,7 @@ struct AcpiSratProcessorX2ApicAffinity { } QEMU_PACKED; typedef struct AcpiSratProcessorX2ApicAffinity AcpiSratProcessorX2ApicAffinity; -struct AcpiSratMemoryAffinity -{ +struct AcpiSratMemoryAffinity { ACPI_SUB_HEADER_DEF uint32_t proximity; uint16_t reserved1; @@ -511,8 +513,7 @@ struct AcpiSratMemoryAffinity } QEMU_PACKED; typedef struct AcpiSratMemoryAffinity AcpiSratMemoryAffinity; -struct AcpiSratProcessorGiccAffinity -{ +struct AcpiSratProcessorGiccAffinity { ACPI_SUB_HEADER_DEF uint32_t proximity; uint32_t acpi_processor_uid; diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 329a0d0c90..88d0738d76 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -381,6 +381,9 @@ void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre); void build_rsdt(GArray *table_data, BIOSLinker *linker, GArray *table_offsets, const char *oem_id, const char *oem_table_id); +void +build_xsdt(GArray *table_data, BIOSLinker *linker, GArray *table_offsets, + const char *oem_id, const char *oem_table_id); int build_append_named_dword(GArray *array, const char *name_format, ...) diff --git a/include/hw/compat.h b/include/hw/compat.h index 846b90eb67..55b176507a 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -2,7 +2,11 @@ #define HW_COMPAT_H #define HW_COMPAT_2_9 \ - /* empty */ + {\ + .driver = "pci-bridge",\ + .property = "shpc",\ + .value = "off",\ + }, #define HW_COMPAT_2_8 \ {\ diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 416aaa56ea..e447f5d8f4 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -151,6 +151,9 @@ struct PCMachineClass { bool save_tsc_khz; /* generate legacy CPU hotplug AML */ bool legacy_cpu_hotplug; + + /* use DMA capable linuxboot option rom */ + bool linuxboot_dma_enabled; }; #define TYPE_PC_MACHINE "generic-pc-machine" @@ -379,6 +382,9 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); int e820_get_num_entries(void); bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); +#define PC_COMPAT_2_9 \ + HW_COMPAT_2_9 \ + #define PC_COMPAT_2_8 \ HW_COMPAT_2_8 \ {\ @@ -438,10 +444,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); #define PC_COMPAT_2_6 \ HW_COMPAT_2_6 \ {\ - .driver = "fw_cfg_io",\ - .property = "dma_enabled",\ - .value = "off",\ - },{\ .driver = TYPE_X86_CPU,\ .property = "cpuid-0xb",\ .value = "off",\ |