提交 7d882ffa 编写于 作者: N Nadav Amit 提交者: Paolo Bonzini

KVM: x86: Revert NoBigReal patch in the emulator

Commit 10e38fc7cab6 ("KVM: x86: Emulator flag for instruction that only support
16-bit addresses in real mode") introduced NoBigReal for instructions such as
MONITOR. Apparetnly, the Intel SDM description that led to this patch is
misleading.  Since no instruction is using NoBigReal, it is safe to remove it,
we fully understand what the SDM means.
Signed-off-by: NNadav Amit <namit@cs.technion.ac.il>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 842bb26a
...@@ -690,13 +690,7 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt, ...@@ -690,13 +690,7 @@ static __always_inline int __linearize(struct x86_emulate_ctxt *ctxt,
if (!fetch && (desc.type & 8) && !(desc.type & 2)) if (!fetch && (desc.type & 8) && !(desc.type & 2))
goto bad; goto bad;
lim = desc_limit_scaled(&desc); lim = desc_limit_scaled(&desc);
if ((ctxt->mode == X86EMUL_MODE_REAL) && !fetch && if ((desc.type & 8) || !(desc.type & 4)) {
(ctxt->d & NoBigReal)) {
/* la is between zero and 0xffff */
if (la > 0xffff)
goto bad;
*max_size = 0x10000 - la;
} else if ((desc.type & 8) || !(desc.type & 4)) {
/* expand-up segment */ /* expand-up segment */
if (addr.ea > lim) if (addr.ea > lim)
goto bad; goto bad;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册