diff mbox series

[v2] KVM: VMX: Remove unnecessary exception trampoline in vmx_vmenter

Message ID 20200406202108.74300-1-ubizjak@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2] KVM: VMX: Remove unnecessary exception trampoline in vmx_vmenter | expand

Commit Message

Uros Bizjak April 6, 2020, 8:21 p.m. UTC
The exception trampoline in .fixup section is not needed, the exception
handling code can jump directly to the label in the .text section.

Changes since v1:
- Fix commit message.

Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
---
 arch/x86/kvm/vmx/vmenter.S | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Paolo Bonzini April 7, 2020, 8:21 a.m. UTC | #1
On 06/04/20 22:21, Uros Bizjak wrote:
> The exception trampoline in .fixup section is not needed, the exception
> handling code can jump directly to the label in the .text section.
> 
> Changes since v1:
> - Fix commit message.
> 
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
> Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
> ---
>  arch/x86/kvm/vmx/vmenter.S | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
> index 81ada2ce99e7..56d701db8734 100644
> --- a/arch/x86/kvm/vmx/vmenter.S
> +++ b/arch/x86/kvm/vmx/vmenter.S
> @@ -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)
>  
> 

Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
index 81ada2ce99e7..56d701db8734 100644
--- a/arch/x86/kvm/vmx/vmenter.S
+++ b/arch/x86/kvm/vmx/vmenter.S
@@ -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)