All of lore.kernel.org
 help / color / mirror / Atom feed
* + kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do.patch added to -mm tree
@ 2007-02-21 20:49 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-21 20:49 UTC (permalink / raw)
  To: mm-commits; +Cc: markus.rechberger, avi, joerg.roedel


The patch titled
     KVM: vmx: hack set_cr0_no_modeswitch() to actually do modeswitch
has been added to the -mm tree.  Its filename is
     kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: KVM: vmx: hack set_cr0_no_modeswitch() to actually do modeswitch
From: Markus Rechberger <markus.rechberger@amd.com>

The whole thing is rotten, but this allows vmx to boot with the guest reboot
fix.

Signed-off-by: Markus Rechberger <markus.rechberger@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/kvm/vmx.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN drivers/kvm/vmx.c~kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do drivers/kvm/vmx.c
--- a/drivers/kvm/vmx.c~kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do
+++ a/drivers/kvm/vmx.c
@@ -791,6 +791,9 @@ static void vmx_set_cr0(struct kvm_vcpu 
  */
 static void vmx_set_cr0_no_modeswitch(struct kvm_vcpu *vcpu, unsigned long cr0)
 {
+	if (!vcpu->rmode.active && !(cr0 & CR0_PE_MASK))
+		enter_rmode(vcpu);
+
 	vcpu->rmode.active = ((cr0 & CR0_PE_MASK) == 0);
 	update_exception_bitmap(vcpu);
 	vmcs_writel(CR0_READ_SHADOW, cr0);
_

Patches currently in -mm which might be from markus.rechberger@amd.com are

kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do.patch
kvm-use-page_private-set_page_private-apis.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-21 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-21 20:49 + kvm-vmx-hack-set_cr0_no_modeswitch-to-actually-do.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.