diff mbox series

KVM: x86: Remove x86_emulate_ops::guest_has_long_mode

Message ID 20230718101809.1249769-1-mhal@rbox.co (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Remove x86_emulate_ops::guest_has_long_mode | expand

Commit Message

Michal Luczaj July 18, 2023, 10:15 a.m. UTC
Remove x86_emulate_ops::guest_has_long_mode along with its implementation,
emulator_guest_has_long_mode(). It has been unused since commit
1d0da94cdafe ("KVM: x86: do not go through ctxt->ops when emulating rsm").

No functional change intended.

Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
 arch/x86/kvm/kvm_emulate.h | 1 -
 arch/x86/kvm/x86.c         | 6 ------
 2 files changed, 7 deletions(-)

Comments

Sean Christopherson Aug. 3, 2023, 12:04 a.m. UTC | #1
On Tue, 18 Jul 2023 12:15:44 +0200, Michal Luczaj wrote:
> Remove x86_emulate_ops::guest_has_long_mode along with its implementation,
> emulator_guest_has_long_mode(). It has been unused since commit
> 1d0da94cdafe ("KVM: x86: do not go through ctxt->ops when emulating rsm").
> 
> No functional change intended.
> 
> 
> [...]

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: Remove x86_emulate_ops::guest_has_long_mode
      https://github.com/kvm-x86/linux/commit/7f717f54845c

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
diff mbox series

Patch

diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h
index ab65f3a47dfd..be7aeb9b8ea3 100644
--- a/arch/x86/kvm/kvm_emulate.h
+++ b/arch/x86/kvm/kvm_emulate.h
@@ -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);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a6b9bea62fb8..0fca1546e029 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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,