public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly
@ 2008-02-06 11:02 Paul Knowles
       [not found] ` <1DF02D2D-98D0-4695-A4A5-724A12616142-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
  2008-02-11  8:11 ` Avi Kivity
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Knowles @ 2008-02-06 11:02 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Whilst working on getting a VM to initialize in to IA32e mode I found  
this issue. set_cr0 relies on comparing the old cr0 to the new one to  
work correctly.

Whilst this fix gets me a little closer I still fail to run due to an  
invalid VMX state. Has anybody else ever tried to set up a VM to jump  
straight in to IA32e mode?

 From b5cbbfabb49eb6e2da6fef0a3d48620103040e4f Mon Sep 17 00:00:00 2001
From: Paul Knowles <paul-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
Date: Wed, 6 Feb 2008 10:30:29 +0000
Subject: [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0  
works properly


Signed-off-by: Paul Knowles <paul-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
---
  arch/x86/kvm/x86.c |    1 -
  1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0987191..64d541d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2866,7 +2866,6 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct  
kvm_vcpu *vcpu,
  	kvm_x86_ops->decache_cr4_guest_bits(vcpu);

  	mmu_reset_needed |= vcpu->arch.cr0 != sregs->cr0;
-	vcpu->arch.cr0 = sregs->cr0;
  	kvm_x86_ops->set_cr0(vcpu, sregs->cr0);

  	mmu_reset_needed |= vcpu->arch.cr4 != sregs->cr4;
-- 
1.5.3.6


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

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

end of thread, other threads:[~2008-02-11  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06 11:02 [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly Paul Knowles
     [not found] ` <1DF02D2D-98D0-4695-A4A5-724A12616142-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
2008-02-06 20:21   ` Joerg Roedel
     [not found]     ` <20080206202142.GB6344-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2008-02-07  8:55       ` Paul Knowles
     [not found]         ` <E1C3584C-9A8E-4F97-9C7A-DA709B8A85CB-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
2008-02-07 10:32           ` Joerg Roedel
2008-02-11  8:11 ` Avi Kivity

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