[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] amd svm: Do not touch (non-existent) attr and selector fields for GDTR



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213626109 -3600
# Node ID 20d20a4858d6b1b833af3dddc317d20d30fb82d3
# Parent  42323a447cbe11b78574a69e01b009a458f014b3
amd svm: Do not touch (non-existent) attr and selector fields for GDTR
and IDTR in the VMCB in svm_set_segment_register(). This is just for
clarity of code and to prevent any issues in the future.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 42323a447cbe -r 20d20a4858d6 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Mon Jun 16 11:49:15 2008 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Mon Jun 16 15:21:49 2008 +0100
@@ -574,10 +574,12 @@ static void svm_set_segment_register(str
         memcpy(&vmcb->tr, reg, sizeof(*reg));
         break;
     case x86_seg_gdtr:
-        memcpy(&vmcb->gdtr, reg, sizeof(*reg));
+        vmcb->gdtr.base = reg->base;
+        vmcb->gdtr.limit = (uint16_t)reg->limit;
         break;
     case x86_seg_idtr:
-        memcpy(&vmcb->idtr, reg, sizeof(*reg));
+        vmcb->idtr.base = reg->base;
+        vmcb->idtr.limit = (uint16_t)reg->limit;
         break;
     case x86_seg_ldtr:
         memcpy(&vmcb->ldtr, reg, sizeof(*reg));

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.