From: "Reimar Döffinger" <Reimar.Doeffinger@gmx.de>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state()
Date: Mon, 17 Aug 2009 22:52:26 +0200 [thread overview]
Message-ID: <20090817205226.GA13129@1und1.de> (raw)
In-Reply-To: <1250540393-3998-1-git-send-email-avi@redhat.com>
On Mon, Aug 17, 2009 at 11:19:53PM +0300, Avi Kivity wrote:
> diff --git a/kvm-all.c b/kvm-all.c
> index f669c3a..15c30d4 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -57,6 +57,7 @@ struct KVMState
> KVMSlot slots[32];
> int fd;
> int vmfd;
> + int regs_modified;
> int coalesced_mmio;
> int broken_set_mem_region;
> int migration_log;
I think regs_modified is a really bad name since it has nothing at all
to do with whether the registers were modified.
IMO it actually indicates if the register copy in the KVM or in CPUState
is valid.
So maybe cpustate_regs_valid is a more straight-forward name? (implying
that when the cpustate regs are valid, the kvm ones probably aren't -
though the way qemu access registers we can't know).
One disadvantage is that code that only needs to read registers will now
uselessly do kvm_arch_put_registers.
A fancy way to do it would be to add a "mode" flag indicating if we only
want read or read-write access to registers, but since we can't enforce
that it might be a bad idea.
next prev parent reply other threads:[~2009-08-17 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 20:19 [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state() Avi Kivity
2009-08-17 20:52 ` Reimar Döffinger [this message]
2009-08-18 7:51 ` Avi Kivity
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=20090817205226.GA13129@1und1.de \
--to=reimar.doeffinger@gmx.de \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).