diff options
author | Avi Kivity <avi@redhat.com> | 2012-08-21 10:07:06 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-08-27 19:02:20 -0400 |
commit | 0afbe2f8781a812c7e501ec129eff45b21f792af (patch) | |
tree | 1b8013cd9c792f9c21b8a469b1fa043c48064e36 /arch/x86/kvm | |
parent | a5625189f6810ef79ced53989c794acfa10d3370 (diff) |
KVM: x86 emulator: Fix #GP error code during linearization
We want the segment selector, nor segment number.
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/emulate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5b1c701cd6d0..1451cffd97eb 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -725,9 +725,9 @@ static int __linearize(struct x86_emulate_ctxt *ctxt, | |||
725 | return X86EMUL_CONTINUE; | 725 | return X86EMUL_CONTINUE; |
726 | bad: | 726 | bad: |
727 | if (addr.seg == VCPU_SREG_SS) | 727 | if (addr.seg == VCPU_SREG_SS) |
728 | return emulate_ss(ctxt, addr.seg); | 728 | return emulate_ss(ctxt, sel); |
729 | else | 729 | else |
730 | return emulate_gp(ctxt, addr.seg); | 730 | return emulate_gp(ctxt, sel); |
731 | } | 731 | } |
732 | 732 | ||
733 | static int linearize(struct x86_emulate_ctxt *ctxt, | 733 | static int linearize(struct x86_emulate_ctxt *ctxt, |