qemu/include/hw
Alexey Kardashevskiy 9a321e9234 spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB
Currently SPAPR PHB keeps track of all allocated MSI (here and below
MSI stands for both MSI and MSIX) interrupt because
XICS used to be unable to reuse interrupts. This is a problem for
dynamic MSI reconfiguration which happens when guest reloads a driver
or performs PCI hotplug. Another problem is that the existing
implementation can enable MSI on 32 devices maximum
(SPAPR_MSIX_MAX_DEVS=32) and there is no good reason for that.

This makes use of new XICS ability to reuse interrupts.

This reorganizes MSI information storage in sPAPRPHBState. Instead of
static array of 32 descriptors (one per a PCI function), this patch adds
a GHashTable when @config_addr is a key and (first_irq, num) pair is
a value. GHashTable can dynamically grow and shrink so the initial limit
of 32 devices is gone.

This changes migration stream as @msi_table was a static array while new
@msi_devs is a dynamic hash table. This adds temporary array which is
used for migration, it is populated in "spapr_pci"::pre_save() callback
and expanded into the hash table in post_load() callback. Since
the destination side does not know the number of MSI-enabled devices
in advance and cannot pre-allocate the temporary array to receive
migration state, this makes use of new VMSTATE_STRUCT_VARRAY_ALLOC macro
which allocates the array automatically.

This resets the MSI configuration space when interrupts are released by
the ibm,change-msi RTAS call.

This fixed traces to be more informative.

This changes vmstate_spapr_pci_msi name from "...lsi" to "...msi" which
was incorrect by accident. As the internal representation changed,
thus bumps migration version number.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[agraf: drop g_malloc_n usage]
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-27 13:48:27 +02:00
..
acpi acpi: rephrase comment 2014-06-19 18:44:22 +03:00
arm i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
audio
block qdev: Add enum property types to QAPI schema 2014-02-14 21:12:05 +01:00
char hw/arm/digic: add UART support 2013-12-17 20:12:51 +00:00
cpu icc_bus: QOM'ify ICC 2013-12-24 18:02:18 +01:00
cris cris: Remove the CRIS PIC glue 2014-02-03 14:04:00 +00:00
i2c smbus: return -1 if nothing found at the given address 2014-05-07 19:14:46 +03:00
i386 pc & q35: Add new machine opt max-ram-below-4g 2014-06-23 18:02:41 +03:00
input input: switch hid mouse and tablet to the new input layer api. 2014-05-26 08:42:43 +02:00
intc arm: vgic device control api support 2014-02-26 17:20:00 +00:00
ipack ipack: Move IndustryPack out of hw/char/ 2014-02-14 21:11:53 +01:00
isa i2c: Rename i2c_bus to I2CBus 2014-02-14 16:22:31 +01:00
kvm
lm32
m68k
mem qmp: add query-memory-devices command 2014-06-19 18:44:22 +03:00
mips hw/mips: Add API to convert KVM guest KSEG0 <-> GPA 2014-06-18 16:58:10 +02:00
misc vfio: Add vfio_container_ioctl() 2014-06-27 13:48:23 +02:00
net allwinner-emac: set autonegotiation complete bit on link up 2014-04-17 21:34:06 +01:00
nvram sun4m: Set HostID in NVRAM 2014-02-27 10:01:40 +00:00
pci hw/pcie: implement power controller functionality 2014-06-23 17:48:42 +03:00
pci-host spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB 2014-06-27 13:48:27 +02:00
ppc spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB 2014-06-27 13:48:27 +02:00
s390x s390x/virtio-ccw: wire up irq routing and irqfds 2014-05-20 13:05:58 +02:00
scsi scsi: Fix migration of scsi sense data 2014-03-14 10:06:55 +01:00
sh4
sparc
timer allwinner-a10-pit: implement prescaler and source selection 2014-04-17 21:34:06 +01:00
unicore32
usb usb: move ehci register defines to header file 2014-06-02 16:28:59 +02:00
virtio vhost: block migration if backend does not log memory 2014-06-23 17:37:59 +03:00
xen xen-hvm: Fix xen_hvm_init() to adjust pc memory layout 2014-06-23 17:50:04 +03:00
boards.h numa: introduce memory_region_allocate_system_memory 2014-06-19 18:44:19 +03:00
bt.h
devices.h
elf_ops.h elf-loader: add more return codes 2014-03-05 03:06:46 +01:00
empty_slot.h
fw-path-provider.h fw-path-provider: Change GPL version to 2+ 2014-04-07 15:36:07 +02:00
hotplug.h define hotplug interface 2014-02-10 10:23:35 +02:00
hw.h
ide.h Call pci_piix3_xen_ide_unplug from unplug_disks 2014-02-20 17:28:08 +00:00
irq.h hw/core: Add interface to allocate and free a single IRQ 2013-10-14 17:11:44 +03:00
loader.h pc: avoid duplicate names for ROM MRs 2014-03-11 13:25:48 +02:00
pcmcia.h pcmcia: QOM'ify PCMCIACardState and MicroDriveState 2013-11-05 18:06:52 +01:00
ptimer.h vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-type 2014-02-04 15:51:45 +01:00
qdev-core.h pc,pci,virtio,qdev fixes, tests 2014-06-05 21:52:37 +01:00
qdev-dma.h qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
qdev-properties.h qdev: Display warning about unused -global 2014-06-05 19:20:37 +03:00
qdev.h
sd.h
ssi.h ssi: Name the CS GPIO 2014-05-28 17:36:21 +02:00
stream.h
sysbus.h memory: Change MemoryRegion priorities from unsigned to signed 2013-10-14 17:11:44 +03:00
usb.h usb: add usb_pick_speed 2014-06-02 16:29:00 +02:00