qemu/hw
David Gibson d5fc133eed ppc: Rework CPU compatibility testing across migration
Migrating between different CPU versions is a bit complicated for ppc.
A long time ago, we ensured identical CPU versions at either end by
checking the PVR had the same value.  However, this breaks under KVM
HV, because we always have to use the host's PVR - it's not
virtualized.  That would mean we couldn't migrate between hosts with
different PVRs, even if the CPUs are close enough to compatible in
practice (sometimes identical cores with different surrounding logic
have different PVRs, so this happens in practice quite often).

So, we removed the PVR check, but instead checked that several flags
indicating supported instructions matched.  This turns out to be a bad
idea, because those instruction masks are not architected information, but
essentially a TCG implementation detail.  So changes to qemu internal CPU
modelling can break migration - this happened between qemu-2.6 and
qemu-2.7.  That was addressed by 146c11f1 "target-ppc: Allow eventual
removal of old migration mistakes".

Now, verification of CPU compatibility across a migration basically doesn't
happen.  We simply ignore the PVR of the incoming migration, and hope the
cpu on the destination is close enough to work.

Now that we've cleaned up handling of processor compatibility modes
for pseries machine type, we can do better.  For new machine types
(pseries-2.10+) We allow migration if:

    * The source and destination PVRs are for the same type of CPU, as
      determined by CPU class's pvr_match function
OR  * When the source was in a compatibility mode, and the destination CPU
      supports the same compatibility mode

For older machine types we retain the existing behaviour - current CAS
code will usually set a compat mode which would break backwards
migration if we made them use the new behaviour. [Fixed from an
earlier version by Greg Kurz].

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
2017-06-30 14:03:31 +10:00
..
9pfs 9pfs: handle transport errors in pdu_complete() 2017-06-29 15:11:51 +02:00
acpi pcihp: use get_uint() for "bsel" property 2017-06-20 14:31:32 +02:00
adc
alpha memory: tune last param of iommu_ops.translate() 2017-05-25 21:25:27 +03:00
arm bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base" 2017-06-20 14:31:32 +02:00
audio audio: Rename hw/audio/audio.h to hw/audio/soundhw.h 2017-05-19 10:48:54 +02:00
block migration/next for 20170628 2017-06-29 13:13:05 +01:00
bt be-hci: use backend functions 2017-06-02 11:33:53 +04:00
char -----BEGIN PGP SIGNATURE----- 2017-06-05 10:09:14 +01:00
core accel: introduce AccelClass.global_props 2017-06-28 11:18:38 +02:00
cpu hw/cpu: core.c can be compiled as common object 2017-06-09 12:02:55 +10:00
cris
display vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
dma hw/dma: QOM'ify sun4m_iommu.c 2017-06-02 05:54:43 +01:00
gpio qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
i2c migration/next for 20170601 2017-06-02 14:07:53 +01:00
i386 migration: move skip_section_footers 2017-06-28 11:18:39 +02:00
ide vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
input vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
intc vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
ipack
ipmi char: move CharBackend handling in char-fe unit 2017-06-02 11:33:53 +04:00
isa chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
lm32
m68k
mem pc-dimm: make "size" property uint64 2017-06-20 14:31:32 +02:00
microblaze Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
mips chardev: move headers to include/chardev 2017-06-02 11:33:52 +04:00
misc vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
moxie
net qdev: Rename DEFINE_PROP_DEFAULT() to DEFINE_PROP_SIGNED() 2017-06-20 14:31:32 +02:00
nios2 Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
nvram vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
openrisc target/openrisc: Support non-busy idle state using PMR SPR 2017-05-04 09:39:14 +09:00
pci vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
pci-bridge hw/pcie: fix the generic pcie root port to support migration 2017-06-08 22:02:37 +03:00
pci-host QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
pcmcia
ppc ppc: Rework CPU compatibility testing across migration 2017-06-30 14:03:31 +10:00
s390x migration/next for 20170613 2017-06-13 13:51:29 +01:00
scsi vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
sd generic-sdhci: Remove user_creatable flag 2017-05-17 10:37:01 -03:00
sh4 shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
smbios
sparc -----BEGIN PGP SIGNATURE----- 2017-06-05 10:09:14 +01:00
sparc64 hw/sparc: use ARRAY_SIZE() macro 2017-06-04 18:42:55 +03:00
ssi xilinx_spips: allow mmio execution 2017-06-27 15:09:15 +02:00
timer timer/aspeed: fix timer enablement when a reload is not set 2017-06-13 14:57:00 +01:00
tpm
tricore Remove reduntant qemu: from error functions 2017-05-07 09:57:51 +03:00
unicore32
usb vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
vfio pci, virtio, vhost: fixes 2017-05-30 14:15:04 +01:00
virtio vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
watchdog shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
xen migration: move skip_section_footers 2017-06-28 11:18:39 +02:00
xenpv shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
xtensa target/xtensa: support output to chardev console 2017-06-06 02:40:48 -07:00
Makefile.objs