projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f3d35f
)
KVM: x86 emulator: VM86 segments must have DPL 3
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 8 Feb 2012 13:34:39 +0000
(14:34 +0100)
committer
Avi Kivity
<avi@redhat.com>
Thu, 8 Mar 2012 12:10:27 +0000
(14:10 +0200)
Setting the segment DPL to 0 for at least the VM86 code segment makes
the VM entry fail on VMX.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index fa310a48591ce2e2bc000fe63ba3a54219823a12..b19e9fffe582c8015bb524dc3c602ae658aa1232 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-1244,6
+1244,8
@@
static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
seg_desc.type = 3;
seg_desc.p = 1;
seg_desc.s = 1;
+ if (ctxt->mode == X86EMUL_MODE_VM86)
+ seg_desc.dpl = 3;
goto load;
}