xemu/include/hw
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
..
acpi acpi: rephrase comment 2014-06-19 18:44:22 +03:00
arm
audio
block
char
cpu
cris
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
ipack
isa
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
net allwinner-emac: set autonegotiation complete bit on link up 2014-04-17 21:34:06 +01:00
nvram
pci hw/pcie: implement power controller functionality 2014-06-23 17:48:42 +03:00
pci-host spapr_iommu: Get rid of window_size in sPAPRTCETable 2014-06-16 13:24:39 +02:00
ppc spapr: Fix RTAS token numbers 2014-06-27 13:48:22 +02:00
s390x s390x/virtio-ccw: wire up irq routing and irqfds 2014-05-20 13:05:58 +02:00
scsi
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
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
hw.h
ide.h
irq.h
loader.h
pcmcia.h
ptimer.h
qdev-core.h pc,pci,virtio,qdev fixes, tests 2014-06-05 21:52:37 +01:00
qdev-dma.h
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
usb.h usb: add usb_pick_speed 2014-06-02 16:29:00 +02:00