WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86, vmx: HVM guests are allowed to modif

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86, vmx: HVM guests are allowed to modify CR2, and the written value
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 14:40:09 -0700
Delivery-date: Thu, 27 Mar 2008 14:40:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206615825 0
# Node ID a294519d97d2fc59ec286b9c4e9988776166053e
# Parent  ea93383019c8cc607fd128b40701e426dd264903
x86, vmx: HVM guests are allowed to modify CR2, and the written value
should be remembered by Xen.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/x86_32/exits.S |    4 ++++
 xen/arch/x86/hvm/vmx/x86_64/exits.S |    4 ++++
 2 files changed, 8 insertions(+)

diff -r ea93383019c8 -r a294519d97d2 xen/arch/x86/hvm/vmx/x86_32/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_32/exits.S       Thu Mar 27 10:52:54 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S       Thu Mar 27 11:03:45 2008 +0000
@@ -60,6 +60,7 @@
         ALIGN
 ENTRY(vmx_asm_vmexit_handler)
         HVM_SAVE_ALL_NOSEGREGS
+        GET_CURRENT(%ebx)
 
         movl $GUEST_RIP,%eax
         VMREAD(UREGS_eip)
@@ -67,6 +68,9 @@ ENTRY(vmx_asm_vmexit_handler)
         VMREAD(UREGS_esp)
         movl $GUEST_RFLAGS,%eax
         VMREAD(UREGS_eflags)
+
+        movl %cr2,%eax
+        movl %eax,VCPU_hvm_guest_cr2(%ebx)
 
 #ifndef NDEBUG
         movw $0xbeef,%ax
diff -r ea93383019c8 -r a294519d97d2 xen/arch/x86/hvm/vmx/x86_64/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_64/exits.S       Thu Mar 27 10:52:54 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S       Thu Mar 27 11:03:45 2008 +0000
@@ -76,6 +76,7 @@
         ALIGN
 ENTRY(vmx_asm_vmexit_handler)
         HVM_SAVE_ALL_NOSEGREGS
+        GET_CURRENT(%rbx)
 
         leaq UREGS_rip(%rsp),%rdi
         movl $GUEST_RIP,%eax
@@ -85,6 +86,9 @@ ENTRY(vmx_asm_vmexit_handler)
         VMREAD(UREGS_rsp)
         movl $GUEST_RFLAGS,%eax
         VMREAD(UREGS_eflags)
+
+        movq %cr2,%rax
+        movq %rax,VCPU_hvm_guest_cr2(%rbx)
 
 #ifndef NDEBUG
         movw $0xbeef,%ax

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86, vmx: HVM guests are allowed to modify CR2, and the written value, Xen patchbot-unstable <=