mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, <x86@kernel.org>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Tony Battersby" <tonyb@cybernetics.com>,
	Ashok Raj <ashok.raj@linux.intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Arjan van de Veen <arjan@linux.intel.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Ashok Raj <ashok.raj@intel.com>
Subject: Re: [patch v3 1/7] x86/smp: Make stop_other_cpus() more robust
Date: Mon, 19 Jun 2023 10:51:39 -0700	[thread overview]
Message-ID: <ZJCVq/cBCDFBcpwa@a4bf019067fa.jf.intel.com> (raw)
In-Reply-To: <ZIzM13q+zI7d1eZs@araj-dh-work>

On Fri, Jun 16, 2023 at 01:57:59PM -0700, Ashok Raj wrote:
> On Fri, Jun 16, 2023 at 08:01:56PM +0200, Thomas Gleixner wrote:
> > On Fri, Jun 16 2023 at 07:13, Ashok Raj wrote:
> > > On Fri, Jun 16, 2023 at 09:53:25AM +0200, Thomas Gleixner wrote:
> > >> > can we simplify this by just apic->send_IPI(cpu, NMI_VECTOR); ??
> > >> 
> > >> That would not set APIC_DM_NMI in delivery mode and the IPI would be
> > >> sent with APIC_DM_FIXED.
> > >
> > > That's correct. 
> > >
> > > Maybe if we use apic->send_IPI_mask(cpumask_of(cpu), NMI_VECTOR)
> > >
> > > apic->send_IPI_mask(cpumask_of(cpu),NMI_VECTOR)
> > >    __x2apic_send_IPI_mask() 
> > >       __x2apic_send_IPI_dest()
> > > 	  unsigned long cfg = __prepare_ICR(0, vector, dest);
> > > 	  native_x2apic_icr_write(cfg, apicid);
> > >
> > > __prepare_ICR() seems to have the magic for APIC_DM_NMI?
> > 
> > Bah. I clearly neither can read nor can remember any of the internals of
> > that code:
> > 
> > apic->send_IPI()
> >   x2apic_send_IPI()
> >     __x2apic_send_IPI_dest()
> > 
> > It also works for all other APIC incarnations. 
> 
> Works!
> 

Forgot to add 

Reviewed-by: Ashok Raj <ashok.raj@intel.com>


  reply	other threads:[~2023-06-19 17:53 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 20:33 [patch v3 0/7] x86/smp: Cure stop_other_cpus() and kexec() troubles Thomas Gleixner
2023-06-15 20:33 ` [patch v3 1/7] x86/smp: Make stop_other_cpus() more robust Thomas Gleixner
2023-06-16  1:58   ` Ashok Raj
2023-06-16  7:53     ` Thomas Gleixner
2023-06-16 14:13       ` Ashok Raj
2023-06-16 18:01         ` Thomas Gleixner
2023-06-16 20:57           ` Ashok Raj
2023-06-19 17:51             ` Ashok Raj [this message]
2023-06-20  8:09           ` Borislav Petkov
2023-06-16 16:36     ` Tony Battersby
2023-06-15 20:33 ` [patch v3 2/7] x86/smp: Dont access non-existing CPUID leaf Thomas Gleixner
2023-06-19 17:02   ` Limonciello, Mario
2023-06-19 17:15     ` Thomas Gleixner
2023-06-20  8:20   ` Borislav Petkov
2023-06-15 20:33 ` [patch v3 3/7] x86/smp: Remove pointless wmb()s from native_stop_other_cpus() Thomas Gleixner
2023-06-20  8:47   ` Borislav Petkov
2023-06-20 13:00   ` [tip: x86/core] " tip-bot2 for Thomas Gleixner
2023-06-15 20:33 ` [patch v3 4/7] x86/smp: Use dedicated cache-line for mwait_play_dead() Thomas Gleixner
2023-06-20  9:01   ` Borislav Petkov
2023-06-20 13:00   ` [tip: x86/core] " tip-bot2 for Thomas Gleixner
2023-06-15 20:33 ` [patch v3 5/7] x86/smp: Cure kexec() vs. mwait_play_dead() breakage Thomas Gleixner
2023-06-20  9:23   ` Borislav Petkov
2023-06-20 12:25     ` Thomas Gleixner
2023-06-20 13:00   ` [tip: x86/core] " tip-bot2 for Thomas Gleixner
2023-06-15 20:33 ` [patch v3 6/7] x86/smp: Split sending INIT IPI out into a helper function Thomas Gleixner
2023-06-20  9:29   ` Borislav Petkov
2023-06-20 12:30     ` Thomas Gleixner
2023-06-20 13:00   ` [tip: x86/core] " tip-bot2 for Thomas Gleixner
2023-06-15 20:34 ` [patch v3 7/7] x86/smp: Put CPUs into INIT on shutdown if possible Thomas Gleixner
2023-06-20 10:27   ` Borislav Petkov
2023-06-20 13:00   ` [tip: x86/core] " tip-bot2 for Thomas Gleixner
2023-07-03  3:44   ` [BUG REPORT] Triggering a panic in an x86 virtual machine does not wait Baokun Li
2023-07-05  8:59     ` Thomas Gleixner
2023-07-06  6:44       ` Baokun Li
2023-07-07 10:18         ` Thomas Gleixner
2023-07-07 12:40           ` Baokun Li
2023-07-07 13:49       ` [tip: x86/core] x86/smp: Don't send INIT to boot CPU 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=ZJCVq/cBCDFBcpwa@a4bf019067fa.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=arjan@linux.intel.com \
    --cc=ashok.raj@linux.intel.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=tony.luck@intel.com \
    --cc=tonyb@cybernetics.com \
    --cc=x86@kernel.org \
    /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

Powered by JetHome