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>
This commit is contained in:
parent
a5625189f6
commit
0afbe2f878
1 changed files with 2 additions and 2 deletions
|
@ -725,9 +725,9 @@ static int __linearize(struct x86_emulate_ctxt *ctxt,
|
|||
return X86EMUL_CONTINUE;
|
||||
bad:
|
||||
if (addr.seg == VCPU_SREG_SS)
|
||||
return emulate_ss(ctxt, addr.seg);
|
||||
return emulate_ss(ctxt, sel);
|
||||
else
|
||||
return emulate_gp(ctxt, addr.seg);
|
||||
return emulate_gp(ctxt, sel);
|
||||
}
|
||||
|
||||
static int linearize(struct x86_emulate_ctxt *ctxt,
|
||||
|
|
Loading…
Reference in a new issue