public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Synchronize cpu state with kernel before poking into registers.
@ 2012-02-16  9:12 Gleb Natapov
  2012-02-16 12:55 ` [PATCH uq/master] " Jan Kiszka
  2012-02-16 13:59 ` [PATCH] " Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2012-02-16  9:12 UTC (permalink / raw)
  To: kvm; +Cc: avi, mtosatti

Call to kvm_cpu_synchronize_state() is missing. kvm_arch_stop_on_emulation_error may
look at outdated registers here.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7079e87..51d0ae7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2020,6 +2020,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
 
 bool kvm_arch_stop_on_emulation_error(CPUState *env)
 {
+    kvm_cpu_synchronize_state(env);
     return !(env->cr[0] & CR0_PE_MASK) ||
            ((env->segs[R_CS].selector  & 3) != 3);
 }
--
			Gleb.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH uq/master] Synchronize cpu state with kernel before poking into registers.
  2012-02-16  9:12 [PATCH] Synchronize cpu state with kernel before poking into registers Gleb Natapov
@ 2012-02-16 12:55 ` Jan Kiszka
  2012-02-16 13:59 ` [PATCH] " Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2012-02-16 12:55 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm, avi, mtosatti, qemu-devel

On 2012-02-16 10:12, Gleb Natapov wrote:
> Call to kvm_cpu_synchronize_state() is missing. kvm_arch_stop_on_emulation_error may
> look at outdated registers here.
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index 7079e87..51d0ae7 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -2020,6 +2020,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
>  
>  bool kvm_arch_stop_on_emulation_error(CPUState *env)
>  {
> +    kvm_cpu_synchronize_state(env);
>      return !(env->cr[0] & CR0_PE_MASK) ||
>             ((env->segs[R_CS].selector  & 3) != 3);
>  }

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Synchronize cpu state with kernel before poking into registers.
  2012-02-16  9:12 [PATCH] Synchronize cpu state with kernel before poking into registers Gleb Natapov
  2012-02-16 12:55 ` [PATCH uq/master] " Jan Kiszka
@ 2012-02-16 13:59 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2012-02-16 13:59 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: kvm, mtosatti

On 02/16/2012 11:12 AM, Gleb Natapov wrote:
> Call to kvm_cpu_synchronize_state() is missing. kvm_arch_stop_on_emulation_error may
> look at outdated registers here.
>
>

Thanks, applied to uq/master.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-16 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16  9:12 [PATCH] Synchronize cpu state with kernel before poking into registers Gleb Natapov
2012-02-16 12:55 ` [PATCH uq/master] " Jan Kiszka
2012-02-16 13:59 ` [PATCH] " Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox