diff options
author | Avi Kivity <avi@redhat.com> | 2012-08-21 10:07:02 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-08-27 19:02:20 -0400 |
commit | 495e116684cebc5ae625916aba37fc07f345707b (patch) | |
tree | a7478c30a118a490b2ba1e9bac0c6c7af0bea24e /arch/x86/kvm | |
parent | c865c43de66dc973865bda337022f03b6e16c8df (diff) |
KVM: VMX: Allow real mode emulation using vm86 with dpl=0
Real mode is always entered from protected mode with dpl=0. Since
the dpl doesn't affect execution, and we already override it to 3
in the vmcs (as vmx requires), we can allow execution in that state.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 88eeb405560f..4811d91759a1 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3317,7 +3317,7 @@ static bool rmode_segment_valid(struct kvm_vcpu *vcpu, int seg) | |||
3317 | return false; | 3317 | return false; |
3318 | if (var.limit != 0xffff) | 3318 | if (var.limit != 0xffff) |
3319 | return false; | 3319 | return false; |
3320 | if (ar != 0xf3) | 3320 | if ((ar | (3 << AR_DPL_SHIFT)) != 0xf3) |
3321 | return false; | 3321 | return false; |
3322 | 3322 | ||
3323 | return true; | 3323 | return true; |