From: Paul Mackerras <paulus@ozlabs.org>
To: Thomas Huth <thuth@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH] powerpc: Fix definition of SIAR register
Date: Thu, 12 May 2016 14:51:23 +1000 [thread overview]
Message-ID: <20160512045123.GA1421@oak.ozlabs.ibm.com> (raw)
In-Reply-To: <1460130851-29021-1-git-send-email-thuth@redhat.com>
On Fri, Apr 08, 2016 at 05:54:11PM +0200, Thomas Huth wrote:
> The SIAR register is available twice, one time as SPR 780 (unprivileged,
> but read-only), and one time as SPR 796 (privileged, but read and write).
> The Linux kernel code currently uses SPR 780 - and 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 other SPR numer 796 instead.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> Note: The perf code in core-book3s.c also seems to write to the SIAR
> SPR, so that might be affected by this issue, too - but I did
> not test the perf code, so I'm not sure about that part.
EBBs mean we need to context-switch the SIAR between user tasks (among
other registers).
I notice that SDAR is also wrong, and the MMCR2 definition is also
using the user-accessible number (though it at least is writable as
well as readable).
Paul.
prev parent reply other threads:[~2016-05-12 4:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 15:54 [PATCH] powerpc: Fix definition of SIAR register Thomas Huth
2016-04-25 6:50 ` Thomas Huth
2016-04-25 8:08 ` Madhavan Srinivasan
2016-04-25 8:15 ` Alexander Graf
2016-04-25 9:16 ` Thomas Huth
2016-04-25 9:31 ` Alexander Graf
2016-04-25 11:15 ` Madhavan Srinivasan
2016-05-12 4:57 ` Paul Mackerras
2016-05-12 7:27 ` Thomas Huth
2016-05-12 10:40 ` Paul Mackerras
2016-05-12 4:51 ` Paul Mackerras [this message]
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=20160512045123.GA1421@oak.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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).