[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state()

From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state()
Date: Tue, 18 Aug 2009 10:51:44 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

On 08/17/2009 11:52 PM, Reimar Döffinger wrote:
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).

I'm fine with such a change.

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.

This is so rare it's pointless to optimize.

error compiling committee.c: too many arguments to function

reply via email to

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