qemu-e2k/hw/pci-host
Jiahui Cen 0cf8882fd0 acpi/gpex: Inform os to keep firmware resource map
There may be some differences in pci resource assignment between guest os
and firmware.

Eg. A Bridge with Bus [d2]
    -+-[0000:d2]---01.0-[d3]----01.0

    where [d2:01.00] is a pcie-pci-bridge with BAR0 (mem, 64-bit, non-pref) [size=256]
          [d3:01.00] is a PCI Device with BAR0 (mem, 64-bit, pref) [size=128K]
                                          BAR4 (mem, 64-bit, pref) [size=64M]

    In EDK2, the Resource Map would be:
        PciBus: Resource Map for Bridge [D2|01|00]
        Type = PMem64; Base = 0x8004000000;     Length = 0x4100000;     Alignment = 0x3FFFFFF
           Base = 0x8004000000; Length = 0x4000000;     Alignment = 0x3FFFFFF;  Owner = PCI [D3|01|00:20]
           Base = 0x8008000000; Length = 0x20000;       Alignment = 0x1FFFF;    Owner = PCI [D3|01|00:10]
        Type =  Mem64; Base = 0x8008100000;     Length = 0x100; Alignment = 0xFFF
    It would use 0x4100000 to calculate the root bus's PMem64 resource window.

    While in Linux, kernel will use 0x1FFFFFF as the alignment to calculate
    the PMem64 size, which would be 0x6000000. So kernel would try to
    allocate 0x6000000 from the PMem64 resource window, but since the window
    size is 0x4100000 as assigned by EDK2, the allocation would fail.

The diffences could result in resource assignment failure.

Using _DSM #5 method to inform guest os not to ignore the PCI configuration
that firmware has done at boot time could handle the differences.

Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Message-Id: <20210114100643.10617-5-cenjiahui@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-01-17 06:42:54 -05:00
..
bonito.c hw/pci-host/bonito: Use pci_config_set_interrupt_pin() 2021-01-04 23:24:44 +01:00
designware.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
gpex-acpi.c acpi/gpex: Inform os to keep firmware resource map 2021-01-17 06:42:54 -05:00
gpex.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
grackle.c grackle: use qdev gpios for PCI IRQs 2020-10-18 16:21:42 +01:00
i440fx.c i440fx: Register i440FX-pcihost properties as class properties 2020-09-22 16:48:29 -04:00
Kconfig pnv: Fix reverse dependency on PCI express root ports 2021-01-06 11:09:59 +11:00
meson.build pnv: Fix reverse dependency on PCI express root ports 2021-01-06 11:09:59 +11:00
pam.c hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition 2020-12-13 17:07:05 +01:00
pnv_phb3_msi.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
pnv_phb3_pbcq.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
pnv_phb3.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pnv_phb4_pec.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
pnv_phb4.c hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h' 2021-01-04 23:24:44 +01:00
ppce500.c hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h' 2021-01-04 23:24:44 +01:00
prep.c vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
q35.c hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition 2020-12-13 17:07:05 +01:00
sabre.c hw/pci-host/sabre: Simplify code initializing variable once 2020-10-28 07:59:26 +00:00
trace-events
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uninorth.c hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h' 2021-01-04 23:24:44 +01:00
versatile.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
xen_igd_pt.c xen: Use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
xilinx-pcie.c hw/mips/boston: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00