qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Satheesh Rajendran <sathnaga@linux.ibm.com>,
	Gustavo Romero <gromero@linux.ibm.com>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH for-5.2] Revert series "spapr/xive: Allocate vCPU IPIs from the vCPU contexts"
Date: Mon, 16 Nov 2020 17:24:17 +0100	[thread overview]
Message-ID: <20201116172417.6c23a679@bahia.lan> (raw)
In-Reply-To: <46173c00-f0db-1d58-2dec-7c4f1acc9847@kaod.org>

On Mon, 16 Nov 2020 16:54:32 +0100
Cédric Le Goater <clg@kaod.org> wrote:

> On 11/16/20 4:34 PM, Greg Kurz wrote:
> > This series was largely built on the assumption that IPI numbers are
> > numerically equal to vCPU ids. Even if this happens to be the case
> > in practice with the default machine settings, this ceases to be true
> > if VSMT is set to a different value than the number of vCPUs per core.
> > This causes bogus IPI numbers to be created in KVM from a guest stand
> > point. This leads to unknow results in the guest, including crashes
> > or missing vCPUs (see BugLink) and even non-fatal oopses in current
> > KVM that lacks a check before accessing misconfigured HW (see [1]).
> > 
> > A tentative patch was sent (see [2]) but it seems too complex to be
> > merged in an RC. Since the original changes are essentially an
> > optimization, it seems safer to revert them for now. The damage is
> > done by commit acbdb9956fe9 ("spapr/xive: Allocate IPIs independently
> > from the other sources") but the previous patches in the series are
> > really preparatory patches. So this reverts the whole series:
> > 
> > eab0a2d06e97 ("spapr/xive: Allocate vCPU IPIs from the vCPU contexts")
> > acbdb9956fe9 ("spapr/xive: Allocate IPIs independently from the other sources")
> 
> These are introducing the optimisation to allocate the vCPU IPI from the 
> running task, and, at the same time, the issue for guests using vSMT.
> 
> > fa94447a2cd6 ("spapr/xive: Use kvmppc_xive_source_reset() in post_load")
> > 235d3b116213 ("spapr/xive: Modify kvm_cpu_is_enabled() interface")
> 
> IMO, these two last patches are fine. 
> 

235d3b116213 is useless if you no longer want to feed kvm_cpu_is_enabled()
with IPI numbers ;-) , so it seems safer to keep it taking a CPU state
pointer.

Keeping fa94447a2cd6 without 235d3b116213 and fa94447a2cd6 wouldn't make
a lot of sense since the next try at implementing the optimization will
likely result in a different set of changes. It would certainly be more
beneficial to get the feature with a brand new series IMHO.

Cheers,

--
Greg

> C. 
> 
>  


  reply	other threads:[~2020-11-16 16:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 15:34 [PATCH for-5.2] Revert series "spapr/xive: Allocate vCPU IPIs from the vCPU contexts" Greg Kurz
2020-11-16 15:54 ` Cédric Le Goater
2020-11-16 16:24   ` Greg Kurz [this message]
2020-11-18  5:24 ` David Gibson
2020-11-18  7:13   ` Cédric Le Goater

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=20201116172417.6c23a679@bahia.lan \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=gromero@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sathnaga@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).