[PATCH] x86,kvm/xen: Remove superfluous .fixup usage

Peter Zijlstra posted 1 patch 4 years, 5 months ago
arch/x86/kvm/xen.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
[PATCH] x86,kvm/xen: Remove superfluous .fixup usage
Posted by Peter Zijlstra 4 years, 5 months ago

Commit 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and
event channel delivery") adds superfluous .fixup usage after the whole
.fixup section was removed in commit e5eefda5aa51 ("x86: Remove .fixup
section").

Fixes: 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/kvm/xen.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
index 0e3f7d6e9fd7..bad57535fad0 100644
--- a/arch/x86/kvm/xen.c
+++ b/arch/x86/kvm/xen.c
@@ -316,10 +316,7 @@ int __kvm_xen_has_interrupt(struct kvm_vcpu *v)
 				     "\tnotq %0\n"
 				     "\t" LOCK_PREFIX "andq %0, %2\n"
 				     "2:\n"
-				     "\t.section .fixup,\"ax\"\n"
-				     "3:\tjmp\t2b\n"
-				     "\t.previous\n"
-				     _ASM_EXTABLE_UA(1b, 3b)
+				     _ASM_EXTABLE_UA(1b, 2b)
 				     : "=r" (evtchn_pending_sel),
 				       "+m" (vi->evtchn_pending_sel),
 				       "+m" (v->arch.xen.evtchn_pending_sel)
@@ -335,10 +332,7 @@ int __kvm_xen_has_interrupt(struct kvm_vcpu *v)
 				     "\tnotl %0\n"
 				     "\t" LOCK_PREFIX "andl %0, %2\n"
 				     "2:\n"
-				     "\t.section .fixup,\"ax\"\n"
-				     "3:\tjmp\t2b\n"
-				     "\t.previous\n"
-				     _ASM_EXTABLE_UA(1b, 3b)
+				     _ASM_EXTABLE_UA(1b, 2b)
 				     : "=r" (evtchn_pending_sel32),
 				       "+m" (vi->evtchn_pending_sel),
 				       "+m" (v->arch.xen.evtchn_pending_sel)
Re: [EXTERNAL] [PATCH] x86,kvm/xen: Remove superfluous .fixup usage
Posted by David Woodhouse 4 years, 5 months ago
On Sun, 2022-01-23 at 13:42 +0100, Peter Zijlstra wrote:
> Commit 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and
> event channel delivery") adds superfluous .fixup usage after the whole
> .fixup section was removed in commit e5eefda5aa51 ("x86: Remove .fixup
> section").
> 
> Fixes: 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery")
> Reported-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>


Tested-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>

Thanks.
Re: [PATCH] x86,kvm/xen: Remove superfluous .fixup usage
Posted by Paolo Bonzini 4 years, 5 months ago
On 1/23/22 13:42, Peter Zijlstra wrote:
> 
> Commit 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and
> event channel delivery") adds superfluous .fixup usage after the whole
> .fixup section was removed in commit e5eefda5aa51 ("x86: Remove .fixup
> section").
> 
> Fixes: 14243b387137 ("KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery")
> Reported-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>   arch/x86/kvm/xen.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
> index 0e3f7d6e9fd7..bad57535fad0 100644
> --- a/arch/x86/kvm/xen.c
> +++ b/arch/x86/kvm/xen.c
> @@ -316,10 +316,7 @@ int __kvm_xen_has_interrupt(struct kvm_vcpu *v)
>   				     "\tnotq %0\n"
>   				     "\t" LOCK_PREFIX "andq %0, %2\n"
>   				     "2:\n"
> -				     "\t.section .fixup,\"ax\"\n"
> -				     "3:\tjmp\t2b\n"
> -				     "\t.previous\n"
> -				     _ASM_EXTABLE_UA(1b, 3b)
> +				     _ASM_EXTABLE_UA(1b, 2b)
>   				     : "=r" (evtchn_pending_sel),
>   				       "+m" (vi->evtchn_pending_sel),
>   				       "+m" (v->arch.xen.evtchn_pending_sel)
> @@ -335,10 +332,7 @@ int __kvm_xen_has_interrupt(struct kvm_vcpu *v)
>   				     "\tnotl %0\n"
>   				     "\t" LOCK_PREFIX "andl %0, %2\n"
>   				     "2:\n"
> -				     "\t.section .fixup,\"ax\"\n"
> -				     "3:\tjmp\t2b\n"
> -				     "\t.previous\n"
> -				     _ASM_EXTABLE_UA(1b, 3b)
> +				     _ASM_EXTABLE_UA(1b, 2b)
>   				     : "=r" (evtchn_pending_sel32),
>   				       "+m" (vi->evtchn_pending_sel),
>   				       "+m" (v->arch.xen.evtchn_pending_sel)
> 

Queued, thanks.

Paolo