qemu-devel
[Top][All Lists]
Advanced

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

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


From: Reimar Döffinger
Subject: Re: [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state()
Date: Mon, 17 Aug 2009 22:52:26 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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.




reply via email to

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