Skip to contentSkip to conversation

KVM: VMX: Remove unnecessary exception trampoline in vmx_vmenter

PATCH Superseded Uros Bizjak 2 participants 2 messages Apr 6, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: VMX: Remove unnecessary exception trampoline in vmx_vmenter

The exception trampoline in .fixup section is not needed, the exception handling code can jump directly to the label in .text section.

Cc Sean Christopherson <[email protected]>
Cc Paolo Bonzini <[email protected]>
---
 arch/x86/kvm/vmx/vmenter.S | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/x86/kvm/vmx/vmenter.S +2 -6
index 81ada2ce99e7..56d701db8734 100644
@@ -58,12 +58,8 @@ SYM_FUNC_START(vmx_vmenter)
 	ret
 4:	ud2
 
-	.pushsection .fixup, "ax"
-5:	jmp 3b
-	.popsection
-
-	_ASM_EXTABLE(1b, 5b)
-	_ASM_EXTABLE(2b, 5b)
+	_ASM_EXTABLE(1b, 3b)
+	_ASM_EXTABLE(2b, 3b)
 
 SYM_FUNC_END(vmx_vmenter)
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Uros Bizjak

The exception trampoline in .fixup section is not needed, the exception handling code can jump directly to the label in .text section.

Changelog need to be wrapped at 75 chars, and "label in .text section" should be "label in the .text section".

Nits aside,

Quoted 29 lines
Cc Sean Christopherson <[email protected]>
Cc Paolo Bonzini <[email protected]>
---
 arch/x86/kvm/vmx/vmenter.S | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/x86/kvm/vmx/vmenter.S +2 -6
index 81ada2ce99e7..56d701db8734 100644
@@ -58,12 +58,8 @@ SYM_FUNC_START(vmx_vmenter)
 	ret
 4:	ud2
 
-	.pushsection .fixup, "ax"
-5:	jmp 3b
-	.popsection
-
-	_ASM_EXTABLE(1b, 5b)
-	_ASM_EXTABLE(2b, 5b)
+	_ASM_EXTABLE(1b, 3b)
+	_ASM_EXTABLE(2b, 3b)
 
 SYM_FUNC_END(vmx_vmenter)
 
Signature · 1 line
2.25.1