android_kernel_samsung_a7y1.../drivers/xen
Igor Druzhinin 0429f4ee51 xen/pci: reserve MCFG areas earlier
[ Upstream commit a4098bc6eed5e31e0391bcc068e61804c98138df ]

If MCFG area is not reserved in E820, Xen by default will defer its usage
until Dom0 registers it explicitly after ACPI parser recognizes it as
a reserved resource in DSDT. Having it reserved in E820 is not
mandatory according to "PCI Firmware Specification, rev 3.2" (par. 4.1.2)
and firmware is free to keep a hole in E820 in that place. Xen doesn't know
what exactly is inside this hole since it lacks full ACPI view of the
platform therefore it's potentially harmful to access MCFG region
without additional checks as some machines are known to provide
inconsistent information on the size of the region.

Now xen_mcfg_late() runs after acpi_init() which is too late as some basic
PCI enumeration starts exactly there as well. Trying to register a device
prior to MCFG reservation causes multiple problems with PCIe extended
capability initializations in Xen (e.g. SR-IOV VF BAR sizing). There are
no convenient hooks for us to subscribe to so register MCFG areas earlier
upon the first invocation of xen_add_device(). It should be safe to do once
since all the boot time buses must have their MCFG areas in MCFG table
already and we don't support PCI bus hot-plug.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 08:08:00 +02:00
..
events A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-pciback xen/pciback: remove set but not used variable 'old_state' 2020-04-06 20:48:45 +02:00
xenbus fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2020-04-06 18:47:45 +02:00
xenfs A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
balloon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
biomerge.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpu_hotplug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dbgp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
efi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
evtchn.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fallback.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
features.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gntalloc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gntdev.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
grant-table.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
manage.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mcelog.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci.c xen/pci: reserve MCFG areas earlier 2020-04-07 08:08:00 +02:00
pcpu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
platform-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
preempt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
privcmd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
privcmd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
swiotlb-xen.c xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() 2020-04-06 20:27:46 +02:00
sys-hypervisor.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tmem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-acpi-cpuhotplug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-acpi-memhotplug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-acpi-pad.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-acpi-processor.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-balloon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-scsiback.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-selfballoon.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen-stub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xlate_mmu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30