Skip to contentSkip to conversation

KVM updates for Linux 2.6.21-rc4

GIT PULL Avi Kivity 1 participant 1 message Mar 18, 2007 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

Linus,

Please pull from the 'linus' branch of the git repository at

git://kvm.qumranet.com/home/avi/kvm.git

containing the following kvm stability and correctness fixes:

Avi Kivity (4):
KVM: Unset kvm_arch_ops if arch module loading failed
KVM: Fix guest sysenter on vmx
KVM: MMU: Fix guest writes to nonpae pde
KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram

 drivers/kvm/kvm_main.c |    4 ++-
 drivers/kvm/mmu.c      |   52 ++++++++++++++++++++++++++++++++++-------------
 drivers/kvm/vmx.c      |    8 +++---
 3 files changed, 44 insertions(+), 20 deletions(-)
drivers/kvm/kvm_main.c +3 -1
index a163bca..dc7a8c7 100644
@@ -2464,7 +2464,7 @@ int kvm_init_arch(struct kvm_arch_ops *ops, struct module *module)
 
 	r = kvm_arch_ops->hardware_setup();
 	if (r < 0)
-	    return r;
+		goto out;
 
 	on_each_cpu(kvm_arch_ops->hardware_enable, NULL, 0, 1);
 	r = register_cpu_notifier(&kvm_cpu_notifier);
@@ -2500,6 +2500,8 @@ out_free_2:
 out_free_1:
 	on_each_cpu(kvm_arch_ops->hardware_disable, NULL, 0, 1);
 	kvm_arch_ops->hardware_unsetup();
+out:
+	kvm_arch_ops = NULL;
 	return r;
 }
 
drivers/kvm/mmu.c +37 -15

96 lines not on this page · raw message

drivers/kvm/vmx.c +4 -4
index c07178e..bfa0ce4 100644
@@ -371,10 +371,10 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
 		data = vmcs_read32(GUEST_SYSENTER_CS);
 		break;
 	case MSR_IA32_SYSENTER_EIP:
-		data = vmcs_read32(GUEST_SYSENTER_EIP);
+		data = vmcs_readl(GUEST_SYSENTER_EIP);
 		break;
 	case MSR_IA32_SYSENTER_ESP:
-		data = vmcs_read32(GUEST_SYSENTER_ESP);
+		data = vmcs_readl(GUEST_SYSENTER_ESP);
 		break;
 	default:
 		msr = find_msr_entry(vcpu, msr_index);
@@ -412,10 +412,10 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
 		vmcs_write32(GUEST_SYSENTER_CS, data);
 		break;
 	case MSR_IA32_SYSENTER_EIP:
-		vmcs_write32(GUEST_SYSENTER_EIP, data);
+		vmcs_writel(GUEST_SYSENTER_EIP, data);
 		break;
 	case MSR_IA32_SYSENTER_ESP:
-		vmcs_write32(GUEST_SYSENTER_ESP, data);
+		vmcs_writel(GUEST_SYSENTER_ESP, data);
 		break;
 	case MSR_IA32_TIME_STAMP_COUNTER:
 		guest_write_tsc(data);

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV