qemu/include/hw
David Gibson 357d1e3bc7 spapr: Improved placement of PCI host bridges in guest memory map
Currently, the MMIO space for accessing PCI on pseries guests begins at
1 TiB in guest address space.  Each PCI host bridge (PHB) has a 64 GiB
chunk of address space in which it places its outbound PIO and 32-bit and
64-bit MMIO windows.

This scheme as several problems:
  - It limits guest RAM to 1 TiB (though we have a limited fix for this
    now)
  - It limits the total MMIO window to 64 GiB.  This is not always enough
    for some of the large nVidia GPGPU cards
  - Putting all the windows into a single 64 GiB area means that naturally
    aligning things within there will waste more address space.
In addition there was a miscalculation in some of the defaults, which meant
that the MMIO windows for each PHB actually slightly overran the 64 GiB
region for that PHB.  We got away without nasty consequences because
the overrun fit within an unused area at the beginning of the next PHB's
region, but it's not pretty.

This patch implements a new scheme which addresses those problems, and is
also closer to what bare metal hardware and pHyp guests generally use.

Because some guest versions (including most current distro kernels) can't
access PCI MMIO above 64 TiB, we put all the PCI windows between 32 TiB and
64 TiB.  This is broken into 1 TiB chunks.  The first 1 TiB contains the
PIO (64 kiB) and 32-bit MMIO (2 GiB) windows for all of the PHBs.  Each
subsequent TiB chunk contains a naturally aligned 64-bit MMIO window for
one PHB each.

This reduces the number of allowed PHBs (without full manual configuration
of all the windows) from 256 to 31, but this should still be plenty in
practice.

We also change some of the default window sizes for manually configured
PHBs to saner values.

Finally we adjust some tests and libqos so that it correctly uses the new
default locations.  Ideally it would parse the device tree given to the
guest, but that's a more complex problem for another time.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
2016-10-16 12:04:15 +11:00
..
acpi ACPI: Add GIC Interrupt Translation Service Structure definition 2016-10-04 13:28:09 +01:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
arm STM32F205: Connect the SPI devices 2016-10-04 13:28:07 +01:00
audio Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
block block/qdev: Allow configuring rerror/werror with qdev properties 2016-07-13 13:32:27 +02:00
char Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
core generic-loader: Add a generic loader 2016-10-04 13:28:09 +01:00
cpu qapi: keep names in 'CpuInstanceProperties' in sync with struct CPUCore 2016-06-27 13:15:06 +10:00
cris Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
display Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
dma dma: xlnx-zynq-devcfg: Fix up XLNX_ZYNQ_DEVCFG_R_MAX 2016-09-22 18:13:08 +01:00
gpio Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
i2c Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
i386 * Thread Sanitizer fixes (Alex) 2016-10-10 10:39:29 +01:00
ide ide: Fix memory leak in ide_register_restart_cb() 2016-09-29 15:50:29 -04:00
input adb-keys.h: initial commit 2016-09-23 10:29:40 +10:00
intc * Thread Sanitizer fixes (Alex) 2016-10-10 10:39:29 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi ipmi: rework the fwinfo to be fetched from the interface 2016-06-07 15:36:54 +03:00
isa portio: keep references on portio 2016-09-08 18:05:21 +04:00
kvm
lm32 intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface 2016-10-04 10:00:25 +02:00
m68k m68k: include cpu-qom.h in files that require M68KCPU 2016-05-19 16:42:27 +02:00
mem nvdimm: support nvdimm label 2016-06-24 05:13:57 +03:00
mips hw/mips/cps: create GIC block inside CPS 2016-07-12 09:10:13 +01:00
misc aspeed: add a ram_size property to the memory controller 2016-09-22 18:13:06 +01:00
net cadence_gem: Add support for screening 2016-09-22 18:13:07 +01:00
nvram * Updated fw_cfg option ROM to include DMA support 2016-07-14 16:49:18 +01:00
pci hw/pci: Prepare for AMD IOMMU 2016-09-23 19:03:56 +03:00
pci-host spapr: Improved placement of PCI host bridges in guest memory map 2016-10-16 12:04:15 +11:00
ppc spapr_pci: Add a 64-bit MMIO window 2016-10-16 12:03:09 +11:00
s390x s390x/kvm: disable cpu model for the 2.7 machine 2016-09-19 11:05:51 +02:00
scsi Remove unused function declarations 2016-09-15 15:32:22 +03:00
sd Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
sh4 Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
smbios Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sparc intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface 2016-10-04 10:00:25 +02:00
ssi STM32F2xx: Add the SPI device 2016-10-04 13:28:07 +01:00
timer Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
tricore Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
unicore32 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
usb Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vfio memory: introduce IOMMUNotifier and its caps 2016-09-27 08:59:16 +02:00
virtio virtio: cleanup VMSTATE_VIRTIO_DEVICE 2016-10-10 02:21:43 +03:00
watchdog Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xen qdisk - hw/block/xen_disk: grant copy implementation 2016-09-27 18:18:55 -07:00
boards.h machine: use class base init generated name 2016-09-08 18:05:21 +04:00
bt.h bt-hci-csr: drop unused argument 2016-10-08 09:02:19 +03:00
compat.h virtio-serial: enable virtio console emergency write feature 2016-10-10 01:16:57 +03:00
devices.h
elf_ops.h loader: Add AddressSpace loading support to ELFs 2016-09-22 18:13:08 +01:00
empty_slot.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
fw-path-provider.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
hotplug.h qdev: hotplug: Introduce HotplugHandler.pre_plug() callback 2016-06-17 16:33:48 +10:00
hw.h hw: clean up hw/hw.h includes 2016-05-19 16:42:30 +02:00
ide.h Call pci_piix3_xen_ide_unplug from unplug_disks 2014-02-20 17:28:08 +00:00
irq.h irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader.h loader: Add AddressSpace loading support to targphys 2016-09-22 18:13:08 +01:00
nmi.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
or-irq.h irq: Add a new irq device that allows the ORing of lines 2016-10-04 13:28:07 +01:00
pcmcia.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
platform-bus.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
ptimer.h hw/ptimer: Introduce timer policy feature 2016-09-22 18:13:06 +01:00
qdev-core.h bus: simplify name handling 2016-09-08 18:05:22 +04:00
qdev-dma.h qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
qdev-properties.h block/qdev: Allow configuring rerror/werror with qdev properties 2016-07-13 13:32:27 +02:00
qdev.h
register.h register: Add block initialise helper 2016-07-04 13:15:22 +01:00
stream.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
sysbus.h sysbus: Remove ignored return value of FindSysbusDeviceFunc 2016-09-27 17:03:34 -03:00
usb.h usb: Add QOM property "attached". 2016-06-22 12:53:26 +02:00