]> xenbits.xensource.com Git - xen.git/commitdiff
svm: Reported SS.DPL must equal CPL, as this is assumed by generic HVM
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 15:26:35 +0000 (15:26 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 18 Mar 2008 15:26:35 +0000 (15:26 +0000)
code despite the fact that AMD processors do not always maintain this
invariant.

Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/svm/svm.c

index 6afe841d444861421589fdd92bd6e23eb0cb8d43..225c9893c9bd30ff068a1936242b938871608bb8 100644 (file)
@@ -495,6 +495,7 @@ static void svm_get_segment_register(struct vcpu *v, enum x86_segment seg,
         break;
     case x86_seg_ss:
         memcpy(reg, &vmcb->ss, sizeof(*reg));
+        reg->attr.fields.dpl = vmcb->cpl;
         break;
     case x86_seg_tr:
         svm_sync_vmcb(v);