Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Alexander Graf
On 26.08.20 20:53, Thomas Gleixner wrote: On Wed, Aug 26 2020 at 20:30, Thomas Gleixner wrote: And it does not solve the issue that we abuse orig_ax which Andy mentioned. Ha! After staring some more, it's not required at all, which is the most elegant solution. The vector check is

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Thomas Gleixner
On Wed, Aug 26 2020 at 20:30, Thomas Gleixner wrote: > And it does not solve the issue that we abuse orig_ax which Andy > mentioned. Ha! After staring some more, it's not required at all, which is the most elegant solution. The vector check is pointless in that condition because there is never a

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Thomas Gleixner
On Wed, Aug 26 2020 at 18:33, Alexander Graf wrote: > On 26.08.20 16:27, Thomas Gleixner wrote: >> The below nasty hack cures it, but I hate it with a passion. I'll look >> deeper for a sane variant. > > An alternative (that doesn't make the code easier to read, but would fix > the issue at hand)

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Graf (AWS), Alexander
> Am 26.08.2020 um 20:03 schrieb Andy Lutomirski : > >> On Wed, Aug 26, 2020 at 10:47 AM Thomas Gleixner wrote: >> >> Andy, >> >>> On Wed, Aug 26 2020 at 09:13, Andy Lutomirski wrote: >>> On Wed, Aug 26, 2020 at 7:27 AM Thomas Gleixner wrote: The below nasty hack cures it, but I hate

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Andy Lutomirski
On Wed, Aug 26, 2020 at 10:47 AM Thomas Gleixner wrote: > > Andy, > > On Wed, Aug 26 2020 at 09:13, Andy Lutomirski wrote: > > On Wed, Aug 26, 2020 at 7:27 AM Thomas Gleixner wrote: > >> The below nasty hack cures it, but I hate it with a passion. I'll look > >> deeper for a sane variant. > >> >

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Thomas Gleixner
Andy, On Wed, Aug 26 2020 at 09:13, Andy Lutomirski wrote: > On Wed, Aug 26, 2020 at 7:27 AM Thomas Gleixner wrote: >> The below nasty hack cures it, but I hate it with a passion. I'll look >> deeper for a sane variant. >> > Fundamentally, the way we overload orig_ax is problematic. I have a >

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Alexander Graf
On 26.08.20 16:27, Thomas Gleixner wrote: On Wed, Aug 26 2020 at 13:53, Alexander Graf wrote: Commit 633260fa143 ("x86/irq: Convey vector as argument and not in ptregs") changed the handover logic of the vector identifier from ~vector in orig_ax to purely register based. Unfortunately, this

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Andy Lutomirski
On Wed, Aug 26, 2020 at 7:27 AM Thomas Gleixner wrote: > > On Wed, Aug 26 2020 at 13:53, Alexander Graf wrote: > > Commit 633260fa143 ("x86/irq: Convey vector as argument and not in ptregs") > > changed the handover logic of the vector identifier from ~vector in orig_ax > > to purely register

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Thomas Gleixner
On Wed, Aug 26 2020 at 13:53, Alexander Graf wrote: > Commit 633260fa143 ("x86/irq: Convey vector as argument and not in ptregs") > changed the handover logic of the vector identifier from ~vector in orig_ax > to purely register based. Unfortunately, this field has another consumer > in the APIC

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Alexander Graf
On 26.08.20 15:22, Josh Poimboeuf wrote: On Wed, Aug 26, 2020 at 01:53:57PM +0200, Alexander Graf wrote: -.macro idtentry_body cfunc has_error_code:req +.macro idtentry_body cfunc has_error_code:req preserve_error_code:req callerror_entry UNWIND_HINT_REGS @@ -328,7 +328,9

Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Josh Poimboeuf
On Wed, Aug 26, 2020 at 01:53:57PM +0200, Alexander Graf wrote: > -.macro idtentry_body cfunc has_error_code:req > +.macro idtentry_body cfunc has_error_code:req preserve_error_code:req > > callerror_entry > UNWIND_HINT_REGS > @@ -328,7 +328,9 @@ SYM_CODE_END(ret_from_fork) > >

[PATCH] x86/irq: Preserve vector in orig_ax for APIC code

2020-08-26 Thread Alexander Graf
Commit 633260fa143 ("x86/irq: Convey vector as argument and not in ptregs") changed the handover logic of the vector identifier from ~vector in orig_ax to purely register based. Unfortunately, this field has another consumer in the APIC code which the commit did not touch. The net result was that