All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	sthemmin@microsoft.com, mikelley@microsoft.com,
	kys@microsoft.com, haiyangz@microsoft.com,
	yi.y.sun@linux.intel.com, hpa@zytor.com
Subject: Re: [tip:x86/hyperv] x86/hyperv: Enable PV qspinlock for Hyper-V
Date: Tue, 2 Oct 2018 14:13:14 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1810021412060.12704@nanos.tec.linutronix.de> (raw)
In-Reply-To: <0005fc50-4415-87a0-1954-fb15a1f8bd0b@suse.com>

On Tue, 2 Oct 2018, Juergen Gross wrote:

> Sorry for noticing this only now, but I have been fighting with
> Xen PV qspinlocks last weekend:
> 
> > +	/*
> > +	 * Read HV_X64_MSR_GUEST_IDLE MSR can trigger the guest's
> > +	 * transition to the idle power state which can be exited
> > +	 * by an IPI even if IF flag is disabled.
> > +	 */
> 
> What if interrupts are enabled? Won't a kick happening here just
> interrupt and then the following rdmsr result in a hang?
> 
> I believe the correct way would be to:
> 
> - disable interrupts before above READ_ONCE() and restore them
>   after the rdmsrl()
> 
> - return early if in_nmi()
> 
> similar as the kvm specific variant is doing it.

Interesting question. I zapped the last commit for now until this is
clarified.

Thanks,

	tglx

  reply	other threads:[~2018-10-02 12:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27  6:01 [PATCH v3 0/2] Enable PV qspinlock for Hyper-V Yi Sun
2018-09-27  6:01 ` [PATCH v3 1/2] X86/Hyper-V: Add Guest IDLE MSR support Yi Sun
2018-10-02 11:27   ` [tip:x86/hyperv] x86/hyperv: Add GUEST_IDLE_MSR support tip-bot for Yi Sun
2018-10-09 12:27   ` [tip:x86/paravirt] " tip-bot for Yi Sun
2018-09-27  6:01 ` [PATCH v3 2/2] locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V Yi Sun
2018-09-28 22:09   ` Michael Kelley (EOSG)
2018-10-02 11:28   ` [tip:x86/hyperv] x86/hyperv: " tip-bot for Yi Sun
2018-10-02 11:38     ` Juergen Gross
2018-10-02 12:13       ` Thomas Gleixner [this message]
2018-10-08  8:12       ` Yi Sun
2018-10-08  8:29 [PATCH v4 2/2] locking/pvqspinlock, hv: " Yi Sun
2018-10-09  9:30 ` [tip:x86/hyperv] x86/hyperv: " tip-bot for Yi Sun

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=alpine.DEB.2.21.1810021412060.12704@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=mingo@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=yi.y.sun@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.