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-3.2-testing] x86, vmx: HVM guests are allowed to mo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86, vmx: HVM guests are allowed to modify CR2, and the written value
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 10:10:38 -0700
Delivery-date: Thu, 27 Mar 2008 10:10:33 -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 1206615975 0
# Node ID 7c1dc8be882d89a47098c17319714d9ab8d58f24
# Parent  fb614cdbae0e5c1606161761a364eb300505ed52
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-unstable changeset:   17306:a294519d97d2fc59ec286b9c4e9988776166053e
xen-unstable date:        Thu Mar 27 11:03:45 2008 +0000
---
 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 fb614cdbae0e -r 7c1dc8be882d xen/arch/x86/hvm/vmx/x86_32/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_32/exits.S       Wed Mar 26 09:38:49 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_32/exits.S       Thu Mar 27 11:06:15 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 fb614cdbae0e -r 7c1dc8be882d xen/arch/x86/hvm/vmx/x86_64/exits.S
--- a/xen/arch/x86/hvm/vmx/x86_64/exits.S       Wed Mar 26 09:38:49 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/x86_64/exits.S       Thu Mar 27 11:06:15 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-3.2-testing] x86, vmx: HVM guests are allowed to modify CR2, and the written value, Xen patchbot-3.2-testing <=