From: Christoffer Dall <christoffer.dall@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, kvmarm@lists.cs.columbia.edu,
qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/7] target-arm: cpregs list for migration, kvm reset
Date: Thu, 30 May 2013 17:11:41 -0700 [thread overview]
Message-ID: <20130531001141.GC1553@ubuntu> (raw)
In-Reply-To: <1368797037-26976-1-git-send-email-peter.maydell@linaro.org>
On Fri, May 17, 2013 at 02:23:50PM +0100, Peter Maydell wrote:
> 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
> registers.
>
> 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).
>
[...]
So there were some qemu magic in here that I didn't get into, so I
didn't do a full comprehensive review, but it looks pretty good overall,
and I couldn't spot any obvious bugs.
If we're ever going to benchmark live migration I have a feeling that
{GET/SET}_MULTIPLE_REGS interface that Alex once talked about may come
in handy, but until then I'm happy with exercising the kernel entry/exit
path a bit.
-Christoffer
prev parent reply other threads:[~2013-05-31 0:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 13:23 [Qemu-devel] [PATCH 0/7] target-arm: cpregs list for migration, kvm reset Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 1/7] target-arm: Allow special cpregs to have flags set Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 2/7] target-arm: Add raw_readfn and raw_writefn to ARMCPRegInfo Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 3/7] target-arm: mark up cpregs for no-migrate or raw access Peter Maydell
2013-05-30 22:13 ` Christoffer Dall
2013-05-30 22:27 ` Peter Maydell
2013-05-30 22:38 ` Christoffer Dall
2013-05-30 22:42 ` Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 4/7] target-arm: Convert TCG to using (index, value) list for cp migration Peter Maydell
2013-05-31 0:09 ` Christoffer Dall
2013-05-17 13:23 ` [Qemu-devel] [PATCH 5/7] target-arm: Initialize cpreg list from KVM when using KVM Peter Maydell
2013-05-20 12:25 ` Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 6/7] target-arm: Reinitialize all KVM VCPU registers on reset Peter Maydell
2013-05-17 13:23 ` [Qemu-devel] [PATCH 7/7] target-arm: Use tuple list to sync cp regs with KVM Peter Maydell
2013-05-31 0:11 ` Christoffer Dall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130531001141.GC1553@ubuntu \
--to=christoffer.dall@linaro.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).