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] [HVM][VMX] Clean up some writes to 64-bit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM][VMX] Clean up some writes to 64-bit VMCS fields in 32-bit Xen.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Jul 2006 16:50:29 +0000
Delivery-date: Wed, 12 Jul 2006 09:54:23 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 16b4abe0f925e385495175d2cc288642cdcb1374
# Parent  bc2f68334e9649bd9f628bd5762e529d85dd5012
[HVM][VMX] Clean up some writes to 64-bit VMCS fields in 32-bit Xen.
Signed-off-by: Eddie Dong <eddie.dong@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff -r bc2f68334e96 -r 16b4abe0f925 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Mon Jul 10 17:40:27 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Mon Jul 10 17:47:28 2006 +0100
@@ -167,8 +167,16 @@ static inline int construct_vmcs_control
 
     error |= __vmwrite(VM_ENTRY_CONTROLS, MONITOR_VM_ENTRY_CONTROLS);
 
-    error |= __vmwrite(IO_BITMAP_A, (u64)virt_to_maddr(arch_vmx->io_bitmap_a));
-    error |= __vmwrite(IO_BITMAP_B, (u64)virt_to_maddr(arch_vmx->io_bitmap_b));
+    error |= __vmwrite(IO_BITMAP_A, virt_to_maddr(arch_vmx->io_bitmap_a));
+    error |= __vmwrite(IO_BITMAP_B, virt_to_maddr(arch_vmx->io_bitmap_b));
+
+#ifdef CONFIG_X86_PAE
+    /* On PAE bitmaps may in future be above 4GB. Write high words. */
+    error |= __vmwrite(IO_BITMAP_A_HIGH,
+                       (paddr_t)virt_to_maddr(arch_vmx->io_bitmap_a) >> 32);
+    error |= __vmwrite(IO_BITMAP_B_HIGH,
+                       (paddr_t)virt_to_maddr(arch_vmx->io_bitmap_b) >> 32);
+#endif
 
     return error;
 }
@@ -391,8 +399,10 @@ static inline int construct_init_vmcs_gu
     error |= __vmwrite(GUEST_INTERRUPTIBILITY_INFO, 0);
     __asm__ __volatile__ ("mov %%dr7, %0\n" : "=r" (dr7));
     error |= __vmwrite(GUEST_DR7, dr7);
-    error |= __vmwrite(VMCS_LINK_POINTER, 0xffffffff);
-    error |= __vmwrite(VMCS_LINK_POINTER_HIGH, 0xffffffff);
+    error |= __vmwrite(VMCS_LINK_POINTER, ~0UL);
+#if defined(__i386__)
+    error |= __vmwrite(VMCS_LINK_POINTER_HIGH, ~0UL);
+#endif
 
     return error;
 }
@@ -410,7 +420,7 @@ static inline int construct_vmcs_host(vo
     error |= __vmwrite(HOST_ES_SELECTOR, __HYPERVISOR_DS);
     error |= __vmwrite(HOST_SS_SELECTOR, __HYPERVISOR_DS);
     error |= __vmwrite(HOST_DS_SELECTOR, __HYPERVISOR_DS);
-#if defined (__i386__)
+#if defined(__i386__)
     error |= __vmwrite(HOST_FS_SELECTOR, __HYPERVISOR_DS);
     error |= __vmwrite(HOST_GS_SELECTOR, __HYPERVISOR_DS);
     error |= __vmwrite(HOST_FS_BASE, 0);

_______________________________________________
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] [HVM][VMX] Clean up some writes to 64-bit VMCS fields in 32-bit Xen., Xen patchbot-unstable <=