diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-01-22 04:21:44 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-27 20:00:11 +0100 |
commit | 52db369823b28616377b8ceb6b6b3879735b9e75 (patch) | |
tree | 514c8195d8b665cf988257e8ad3d83d3bd9a756c /arch/x86/kvm/emulate.c | |
parent | KVM: x86: inline memslot_valid_for_gpte (diff) | |
download | linux-52db369823b28616377b8ceb6b6b3879735b9e75.tar.xz linux-52db369823b28616377b8ceb6b6b3879735b9e75.zip |
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>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c7a0da45f60a..0accce94f660 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -5683,11 +5683,9 @@ special_insn: if (ctxt->d & Fastop) { void (*fop)(struct fastop *) = (void *)ctxt->execute; rc = fastop(ctxt, fop); - if (rc != X86EMUL_CONTINUE) - goto done; - goto writeback; + } else { + rc = ctxt->execute(ctxt); } - rc = ctxt->execute(ctxt); if (rc != X86EMUL_CONTINUE) goto done; goto writeback; |