From: Alexander Graf <graf@amazon.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: X86 ML <x86@kernel.org>, Andy Lutomirski <luto@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Alexandre Chartre <alexandre.chartre@oracle.com>,
Frederic Weisbecker <frederic@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
"Sean Christopherson" <sean.j.christopherson@intel.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Joel Fernandes <joel@joelfernandes.org>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Will Deacon <will@kernel.org>,
Tom Lendacky <thomas.lendacky@amd.com>,
Wei Liu <wei.liu@kernel.org>,
Michael Kelley <mikelley@microsoft.com>,
Jason Chen CJ <jason.cj.chen@intel.com>,
Zhao Yakui <yakui.zhao@intel.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Avi Kivity <avi@scylladb.com>,
"Herrenschmidt, Benjamin" <benh@amazon.com>, <robketr@amazon.de>,
<amos@scylladb.com>, Brian Gerst <brgerst@gmail.com>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code
Date: Wed, 26 Aug 2020 15:51:05 +0200 [thread overview]
Message-ID: <19292905-9cfc-ff36-217b-73b944e41442@amazon.com> (raw)
In-Reply-To: <20200826132210.k4pxphxvxuvb2fe6@treble>
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
>>
>> call error_entry
>> UNWIND_HINT_REGS
>> @@ -328,7 +328,9 @@ SYM_CODE_END(ret_from_fork)
>>
>> .if \has_error_code == 1
>> movq ORIG_RAX(%rsp), %rsi /* get error code into 2nd argument*/
>> - movq $-1, ORIG_RAX(%rsp) /* no syscall to restart */
>> + .if \preserve_error_code == 0
>> + movq $-1, ORIG_RAX(%rsp) /* no syscall to restart */
>> + .endif
>
> When does this happen (has_error_code=1 && preserve_error_code=0)? I
> don't see any users of this macro (or idtentry) with this combination.
It's well hidden in arch/x86/include/asm/idtentry.h:
#define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
idtentry vector asm_##func func has_error_code=1
/* Simple exception entries with error code pushed by hardware */
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_TS, exc_invalid_tss);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_NP, exc_segment_not_present);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_SS, exc_stack_segment);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_GP, exc_general_protection);
DECLARE_IDTENTRY_ERRORCODE(X86_TRAP_AC, exc_alignment_check);
[...]
DECLARE_IDTENTRY_RAW_ERRORCODE(X86_TRAP_PF, exc_page_fault);
Alex
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
next prev parent reply other threads:[~2020-08-26 13:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 11:53 Alexander Graf
2020-08-26 13:22 ` Josh Poimboeuf
2020-08-26 13:51 ` Alexander Graf [this message]
2020-08-26 14:27 ` Thomas Gleixner
2020-08-26 16:13 ` Andy Lutomirski
2020-08-26 17:47 ` Thomas Gleixner
2020-08-26 18:00 ` Andy Lutomirski
2020-08-26 18:22 ` Graf (AWS), Alexander
2020-08-26 16:33 ` Alexander Graf
2020-08-26 18:30 ` Thomas Gleixner
2020-08-26 18:53 ` Thomas Gleixner
2020-08-26 20:09 ` Alexander Graf
2020-08-26 20:21 ` x86/irq: Unbreak interrupt affinity setting Thomas Gleixner
2020-08-26 21:37 ` David Laight
2020-08-26 21:47 ` David Laight
2020-08-26 22:52 ` Alexander Graf
2020-08-27 8:31 ` David Laight
2020-08-26 22:07 ` Thomas Gleixner
2020-08-27 8:28 ` David Laight
2020-08-27 7:32 ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19292905-9cfc-ff36-217b-73b944e41442@amazon.com \
--to=graf@amazon.com \
--cc=alexandre.chartre@oracle.com \
--cc=amos@scylladb.com \
--cc=andrew.cooper3@citrix.com \
--cc=avi@scylladb.com \
--cc=benh@amazon.com \
--cc=boris.ostrovsky@oracle.com \
--cc=brgerst@gmail.com \
--cc=frederic@kernel.org \
--cc=jason.cj.chen@intel.com \
--cc=jgross@suse.com \
--cc=joel@joelfernandes.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mikelley@microsoft.com \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=robketr@amazon.de \
--cc=rostedt@goodmis.org \
--cc=sean.j.christopherson@intel.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=wei.liu@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=yakui.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®