ia64/xen-unstable

changeset 17869:20d20a4858d6

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@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jun 16 15:21:49 2008 +0100 (2008-06-16)
parents 42323a447cbe
children 4bb8a4f66eff
files xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/svm.c	Mon Jun 16 11:49:15 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Mon Jun 16 15:21:49 2008 +0100
     1.3 @@ -574,10 +574,12 @@ static void svm_set_segment_register(str
     1.4          memcpy(&vmcb->tr, reg, sizeof(*reg));
     1.5          break;
     1.6      case x86_seg_gdtr:
     1.7 -        memcpy(&vmcb->gdtr, reg, sizeof(*reg));
     1.8 +        vmcb->gdtr.base = reg->base;
     1.9 +        vmcb->gdtr.limit = (uint16_t)reg->limit;
    1.10          break;
    1.11      case x86_seg_idtr:
    1.12 -        memcpy(&vmcb->idtr, reg, sizeof(*reg));
    1.13 +        vmcb->idtr.base = reg->base;
    1.14 +        vmcb->idtr.limit = (uint16_t)reg->limit;
    1.15          break;
    1.16      case x86_seg_ldtr:
    1.17          memcpy(&vmcb->ldtr, reg, sizeof(*reg));