Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=15b00f32d53f31fe194b17ca0384a37756b55be2
Commit:     15b00f32d53f31fe194b17ca0384a37756b55be2
Parent:     54f1585a8d0131bc3993902d4441f4049daed0d5
Author:     Jan Kiszka <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 19 10:21:45 2007 +0100
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:53:06 2008 +0200

    KVM: VMX: Force seg.base == (seg.sel << 4) in real  mode
    
    Ensure that segment.base == segment.selector << 4 when entering the real
    mode on Intel so that the CPU will not bark at us.  This fixes some old
    protected mode demo from 
http://www.x86.org/articles/pmbasics/tspec_a1_doc.htm.
    
    Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/vmx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 0c082fa..b4c0bdc 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1165,7 +1165,8 @@ static void fix_rmode_seg(int seg, struct 
kvm_save_segment *save)
        save->base = vmcs_readl(sf->base);
        save->limit = vmcs_read32(sf->limit);
        save->ar = vmcs_read32(sf->ar_bytes);
-       vmcs_write16(sf->selector, vmcs_readl(sf->base) >> 4);
+       vmcs_write16(sf->selector, save->base >> 4);
+       vmcs_write32(sf->base, save->base & 0xfffff);
        vmcs_write32(sf->limit, 0xffff);
        vmcs_write32(sf->ar_bytes, 0xf3);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to