[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/7] target-arm: cpregs list for migration, kvm rese

From: Peter Maydell
Subject: [Qemu-devel] [PATCH 0/7] target-arm: cpregs list for migration, kvm reset
Date: Fri, 17 May 2013 14:23:50 +0100

This patch series overhauls how we handle ARM coprocessor registers,
so that we use a consistent approach for migration, reset and
QEMU<->KVM synchronisation, driven by the kernel's list of supported

The basic principle here is that we trust the kernel's list of what
registers it knows about, and that QEMU doesn't have to have specific
knowledge of a coprocessor register to support running and migrating
a KVM session on a kernel that does support that register.

We maintain a list of cp registers, which is initialized either from
the current cpreg hashtable (for TCG), or by querying the kernel (for
KVM).  For migration we simply send the lists of register indexes and
values; migration fails if there's a register the destination kernel
is unaware of, or if the value can't be set as required, but isn't
gated on whether source or destination QEMU know about the register.

We also use the register list to properly reset the vcpu by simply
feeding it back the initial set of register values; this fixes a bug
where we weren't resetting everything we should have (though Linux
guests don't care about most reset values).

Note that vm save/load with KVM requires that you run with -machine
kernel_irqchip=off, because the kernel doesn't currently support
save/load of either the VGIC or virtual timer state.  It may also be
necessary to nobble the device tree blob to remove the "armv7-timer"
node so the guest doesn't try to use the vtimers.  Migration between
TCG and KVM is not supported at the moment (it would require us to
add a lot of registers to TCG, which I may do at some point, but this
is a bit of an obscure usecase IMHO).

Peter Maydell (7):
  target-arm: Allow special cpregs to have flags set
  target-arm: Add raw_readfn and raw_writefn to ARMCPRegInfo
  target-arm: mark up cpregs for no-migrate or raw access
  target-arm: Convert TCG to using (index,value) list for cp migration
  target-arm: Initialize cpreg list from KVM when using KVM
  target-arm: Reinitialize all KVM VCPU registers on reset
  target-arm: Use tuple list to sync cp regs with KVM

 target-arm/Makefile.objs |    1 +
 target-arm/cpu-qom.h     |   24 ++++
 target-arm/cpu.c         |    2 +
 target-arm/cpu.h         |   89 +++++++++++++-
 target-arm/helper.c      |  281 +++++++++++++++++++++++++++++++++++++++-----
 target-arm/kvm.c         |  292 +++++++++++++++++++++++++++++++++++-----------
 target-arm/kvm_arm.h     |   33 ++++++
 target-arm/machine.c     |  134 +++++++++++++--------
 8 files changed, 705 insertions(+), 151 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]