linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Thomas Huth <thuth@redhat.com>
Cc: Paul Mackerras <paulus@ozlabs.org>,
	linuxppc-dev@lists.ozlabs.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	kvm-ppc@vger.kernel.org, Alexander Graf <agraf@suse.de>,
	Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc: Fix definition of SIAR and SDAR registers
Date: Tue, 31 May 2016 09:27:22 +1000	[thread overview]
Message-ID: <1464650842.16938.7.camel@ellerman.id.au> (raw)
In-Reply-To: <574BF41F.4050305@redhat.com>

On Mon, 2016-05-30 at 10:04 +0200, Thomas Huth wrote:
> On 13.05.2016 05:35, Paul Mackerras wrote:
> > On Thu, May 12, 2016 at 01:26:44PM +0200, Thomas Huth wrote:
> > > The SIAR and SDAR registers are available twice, one time as SPRs
> > > 780 / 781 (unprivileged, but read-only), and one time as the SPRs
> > > 796 / 797 (privileged, but read and write). The Linux kernel code
> > > currently uses the unprivileged  SPRs - while this is OK for reading,
> > > writing to that register of course does not work.
> > > Since the KVM code tries to write to this register, too (see the mtspr
> > > in book3s_hv_rmhandlers.S), the contents of this register sometimes get
> > > lost for the guests, e.g. during migration of a VM.
> > > To fix this issue, simply switch to the privileged SPR numbers instead.
> > > 
> > > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > 
> > Acked-by: Paul Mackerras <paulus@ozlabs.org>
> 
> *ping*
> 
> Michael, could you please pick this patch up? I think it should rather
> go through the generic powerpc tree instead of kvm-ppc, since it also
> affects other parts than just KVM...

Yeah that's actually why I hesitated to merge it, because I want to know what
the broader implications are ...

I have also gone back and confirmed that the 796/797 numbers exist and are
correct on all CPUs we support, which involved a lot of digging through PDFs.

cheers

  reply	other threads:[~2016-05-30 23:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:26 [PATCH] powerpc: Fix definition of SIAR and SDAR registers Thomas Huth
2016-05-13  3:35 ` Paul Mackerras
2016-05-30  8:04   ` Thomas Huth
2016-05-30 23:27     ` Michael Ellerman [this message]
2016-05-31 10:17 ` Michael Ellerman

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=1464650842.16938.7.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.vnet.ibm.com \
    --cc=paulus@ozlabs.org \
    --cc=thuth@redhat.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).