qemu/hw/intc
Alexey Kardashevskiy 3a3b8502e6 spapr: Fix RTAS token numbers
At the moment spapr_rtas_register() allocates a new token number for every
new RTAS callback so numbers are not fixed and depend on the number of
supported RTAS handlers and the exact order of spapr_rtas_register() calls.
These tokens are copied into the device tree and remain the same during
the guest lifetime.

When we start another guest to receive a migration, it calls
spapr_rtas_register() as well. If the number of RTAS handlers or their
order is different in QEMU on source and destination sides, the "/rtas"
node in the device tree will differ. Since migration overwrites the device
tree (as it overwrites the entire RAM), the actual RTAS config on
the destination side gets broken.

This defines global contant values for every RTAS token which QEMU
is using today.

This changes spapr_rtas_register() to accept a token number instead of
allocating one. This changes all users of spapr_rtas_register().

This changes XICS-KVM not to cache tokens registered with KVM as they
constant now.

This makes TOKEN_BASE global as RTAS_XXX use TOKEN_BASE as
a base. TOKEN_MAX is moved and renamed too and its value is changed
to the last token + 1. Boundary checks for token values are adjusted.

This reserves token numbers for "os-term" handlers and PCI hotplug
which we are working on.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-27 13:48:22 +02:00
..
allwinner-a10-pic.c hw/intc/allwinner-a10-pic: Add missing 'break' 2014-05-13 16:09:38 +01:00
apic_common.c apic: do not accept SIPI on the bootstrap processor 2014-05-13 13:12:40 +02:00
apic.c apic: use emulated lapic version 0x14 on pc machines >= 2.1 2014-05-07 18:36:37 +03:00
arm_gic_common.c arm_gic: Add GICC_APRn state to the GICState 2014-02-08 14:50:48 +00:00
arm_gic_kvm.c arm: Clean up fragile use of error_is_set() in realize() methods 2014-05-05 19:08:49 +02:00
arm_gic.c arm: Clean up fragile use of error_is_set() in realize() methods 2014-05-05 19:08:49 +02:00
armv7m_nvic.c armv7m_nvic: fix AIRCR implementation 2014-06-19 18:33:05 +01:00
etraxfs_pic.c hw: cannot_instantiate_with_device_add_yet due to pointer props 2013-12-24 17:27:17 +01:00
exynos4210_combiner.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
exynos4210_gic.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
gic_internal.h hw/intc/arm_gic: Fix GIC_SET_LEVEL 2014-02-26 17:19:59 +00:00
grlib_irqmp.c hw: cannot_instantiate_with_device_add_yet due to pointer props 2013-12-24 17:27:17 +01:00
heathrow_pic.c savevm: Remove all the unneeded version_minimum_id_old (ppc) 2014-06-16 04:55:26 +02:00
i8259_common.c savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
i8259.c pc,net,MAINTAINERS,build updates 2014-05-07 17:16:03 +01:00
imx_avic.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
ioapic_common.c savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
ioapic.c qemu: x86: ignore ioapic polarity 2014-03-09 21:09:38 +02:00
lm32_pic.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
Makefile.objs s390x: split flic into kvm and non-kvm parts 2014-05-20 13:05:57 +02:00
omap_intc.c hw: cannot_instantiate_with_device_add_yet due to pointer props 2013-12-24 17:27:17 +01:00
openpic_kvm.c PPC: openpic_kvm: Implement reset 2014-06-16 13:24:36 +02:00
openpic.c openpic: Reset IRQ source private members 2014-06-16 13:24:36 +02:00
pl190.c sysbus: Set cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
puv3_intc.c puv3_intc: QOM cast cleanup 2013-07-29 21:06:58 +02:00
realview_gic.c realview_gic: Prepare for QOM embedding 2013-11-05 17:47:30 +01:00
s390_flic_kvm.c s390x/kvm: inject via flic 2014-06-10 09:50:27 +02:00
s390_flic.c s390x/virtio-ccw: wire up irq routing and irqfds 2014-05-20 13:05:58 +02:00
sh_intc.c cpu: Make first_cpu and next_cpu CPUState 2013-07-09 21:32:54 +02:00
slavio_intctl.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
xics_kvm.c spapr: Fix RTAS token numbers 2014-06-27 13:48:22 +02:00
xics.c spapr: Fix RTAS token numbers 2014-06-27 13:48:22 +02:00
xilinx_intc.c intc: xilinx_uartlite: Convert SBD::init -> instance_init 2014-06-09 00:33:03 +02:00