Commit 7f717f54 authored by Michal Luczaj's avatar Michal Luczaj Committed by Sean Christopherson
Browse files

KVM: x86: Remove x86_emulate_ops::guest_has_long_mode



Remove x86_emulate_ops::guest_has_long_mode along with its implementation,
emulator_guest_has_long_mode(). It has been unused since commit
1d0da94c ("KVM: x86: do not go through ctxt->ops when emulating rsm").

No functional change intended.

Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
Link: https://lore.kernel.org/r/20230718101809.1249769-1-mhal@rbox.co


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 1d6664fa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -213,7 +213,6 @@ struct x86_emulate_ops {

	bool (*get_cpuid)(struct x86_emulate_ctxt *ctxt, u32 *eax, u32 *ebx,
			  u32 *ecx, u32 *edx, bool exact_only);
	bool (*guest_has_long_mode)(struct x86_emulate_ctxt *ctxt);
	bool (*guest_has_movbe)(struct x86_emulate_ctxt *ctxt);
	bool (*guest_has_fxsr)(struct x86_emulate_ctxt *ctxt);
	bool (*guest_has_rdpid)(struct x86_emulate_ctxt *ctxt);
+0 −6
Original line number Diff line number Diff line
@@ -8229,11 +8229,6 @@ static bool emulator_get_cpuid(struct x86_emulate_ctxt *ctxt,
	return kvm_cpuid(emul_to_vcpu(ctxt), eax, ebx, ecx, edx, exact_only);
}

static bool emulator_guest_has_long_mode(struct x86_emulate_ctxt *ctxt)
{
	return guest_cpuid_has(emul_to_vcpu(ctxt), X86_FEATURE_LM);
}

static bool emulator_guest_has_movbe(struct x86_emulate_ctxt *ctxt)
{
	return guest_cpuid_has(emul_to_vcpu(ctxt), X86_FEATURE_MOVBE);
@@ -8335,7 +8330,6 @@ static const struct x86_emulate_ops emulate_ops = {
	.fix_hypercall       = emulator_fix_hypercall,
	.intercept           = emulator_intercept,
	.get_cpuid           = emulator_get_cpuid,
	.guest_has_long_mode = emulator_guest_has_long_mode,
	.guest_has_movbe     = emulator_guest_has_movbe,
	.guest_has_fxsr      = emulator_guest_has_fxsr,
	.guest_has_rdpid     = emulator_guest_has_rdpid,