Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b105ca2 authored by Takuya Yoshikawa's avatar Takuya Yoshikawa Committed by Avi Kivity
Browse files

KVM: x86 emulator: Stop passing ctxt->ops as arg of emul functions



Dereference it in the actual users.

This not only cleans up the emulator but also makes it easy to convert
the old emulation functions to the new em_xxx() form later.

Note: Remove some inline keywords to let the compiler decide inlining.

Signed-off-by: default avatarTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent ef5d75cc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -373,6 +373,5 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt);
int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
			 u16 tss_selector, int reason,
			 bool has_error_code, u32 error_code);
int emulate_int_real(struct x86_emulate_ctxt *ctxt,
		     struct x86_emulate_ops *ops, int irq);
int emulate_int_real(struct x86_emulate_ctxt *ctxt, int irq);
#endif /* _ASM_X86_KVM_X86_EMULATE_H */
+116 −143

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -4513,7 +4513,7 @@ int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq, int inc_eip)
	vcpu->arch.emulate_ctxt.decode.ad_bytes = 2;
	vcpu->arch.emulate_ctxt.decode.eip = vcpu->arch.emulate_ctxt.eip +
								 inc_eip;
	ret = emulate_int_real(&vcpu->arch.emulate_ctxt, &emulate_ops, irq);
	ret = emulate_int_real(&vcpu->arch.emulate_ctxt, irq);

	if (ret != X86EMUL_CONTINUE)
		return EMULATE_FAIL;