mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
KVM: X86: Add 'else' to unify fastop and execute call path
It also helps eliminate some duplicated code. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
91b0d268a5
commit
52db369823
1 changed files with 2 additions and 4 deletions
|
@ -5683,11 +5683,9 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
|
||||||
if (ctxt->d & Fastop) {
|
if (ctxt->d & Fastop) {
|
||||||
void (*fop)(struct fastop *) = (void *)ctxt->execute;
|
void (*fop)(struct fastop *) = (void *)ctxt->execute;
|
||||||
rc = fastop(ctxt, fop);
|
rc = fastop(ctxt, fop);
|
||||||
if (rc != X86EMUL_CONTINUE)
|
} else {
|
||||||
goto done;
|
rc = ctxt->execute(ctxt);
|
||||||
goto writeback;
|
|
||||||
}
|
}
|
||||||
rc = ctxt->execute(ctxt);
|
|
||||||
if (rc != X86EMUL_CONTINUE)
|
if (rc != X86EMUL_CONTINUE)
|
||||||
goto done;
|
goto done;
|
||||||
goto writeback;
|
goto writeback;
|
||||||
|
|
Loading…
Reference in a new issue