diff options
Diffstat (limited to 'hw/i386')
| -rw-r--r-- | hw/i386/Kconfig | 4 | ||||
| -rw-r--r-- | hw/i386/acpi-build.c | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index b9c96ac361..6350438036 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -52,6 +52,7 @@ config I440FX bool imply E1000_PCI imply VMPORT + imply VMMOUSE select PC_PCI select PC_ACPI select ACPI_SMBUS @@ -59,7 +60,6 @@ config I440FX select IDE_PIIX select DIMM select SMBIOS - select VMMOUSE select FW_CFG_DMA config ISAPC @@ -78,6 +78,7 @@ config Q35 imply AMD_IOMMU imply E1000E_PCI_EXPRESS imply VMPORT + imply VMMOUSE select PC_PCI select PC_ACPI select PCI_EXPRESS_Q35 @@ -85,7 +86,6 @@ config Q35 select AHCI_ICH9 select DIMM select SMBIOS - select VMMOUSE select FW_CFG_DMA config VTD diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index d281ffa89e..f3fdfefcd5 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -755,10 +755,16 @@ static void crs_range_set_free(CrsRangeSet *range_set) static gint crs_range_compare(gconstpointer a, gconstpointer b) { - CrsRangeEntry *entry_a = *(CrsRangeEntry **)a; - CrsRangeEntry *entry_b = *(CrsRangeEntry **)b; + CrsRangeEntry *entry_a = *(CrsRangeEntry **)a; + CrsRangeEntry *entry_b = *(CrsRangeEntry **)b; - return (int64_t)entry_a->base - (int64_t)entry_b->base; + if (entry_a->base < entry_b->base) { + return -1; + } else if (entry_a->base > entry_b->base) { + return 1; + } else { + return 0; + } } /* @@ -1908,10 +1914,13 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, scope = aml_scope("\\_SB"); dev = aml_device("PC%.02X", bus_num); aml_append(dev, aml_name_decl("_UID", aml_int(bus_num))); - aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num))); if (pci_bus_is_express(bus)) { + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A08"))); + aml_append(dev, aml_name_decl("_CID", aml_eisaid("PNP0A03"))); aml_append(dev, build_q35_osc_method()); + } else { + aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03"))); } if (numa_node != NUMA_NODE_UNASSIGNED) { |