From: Benjamin Herrenschmidt <benh@au1•ibm.com>
To: Thomas Huth <thuth@redhat•com>,
kvm-ppc@vger•kernel.org, Alexander Graf <agraf@suse•com>,
Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@lists•ozlabs.org, kvm@vger•kernel.org
Subject: Re: [PATCH] KVM: ppc: Fix size of the PSPB register
Date: Wed, 02 Sep 2015 08:25:05 +1000 [thread overview]
Message-ID: <1441146305.2668.51.camel@au1.ibm.com> (raw)
In-Reply-To: <1441143678-14295-1-git-send-email-thuth@redhat.com>
On Tue, 2015-09-01 at 23:41 +0200, Thomas Huth wrote:
> The size of the Problem State Priority Boost Register is only
> 32 bits, so let's change the type of the corresponding variable
> accordingly to avoid future trouble.
It's not future trouble, it's broken today for LE and this should fix
it BUT ....
The asm accesses it using lwz/stw and C accesses it as a ulong. On LE
that will mean that userspace will see the value << 32
Now "fixing" it might break migration if that field is already
stored/loaded in its "broken" form. We may have to keep the "broken"
behaviour and document that qemu sees a value shifted by 32.
Cheers,
Ben.
> Signed-off-by: Thomas Huth <thuth@redhat•com>
> ---
> arch/powerpc/include/asm/kvm_host.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/kvm_host.h
> b/arch/powerpc/include/asm/kvm_host.h
> index d91f65b..c825f3a 100644
> --- a/arch/powerpc/include/asm/kvm_host.h
> +++ b/arch/powerpc/include/asm/kvm_host.h
> @@ -473,7 +473,7 @@ struct kvm_vcpu_arch {
> ulong ciabr;
> ulong cfar;
> ulong ppr;
> - ulong pspb;
> + u32 pspb;
> ulong fscr;
> ulong shadow_fscr;
> ulong ebbhr;
next prev parent reply other threads:[~2015-09-01 22:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 21:41 [PATCH] KVM: ppc: Fix size of the PSPB register Thomas Huth
2015-09-01 22:24 ` Paul Mackerras
2015-09-01 22:30 ` Benjamin Herrenschmidt
2015-09-02 7:16 ` Thomas Huth
2015-09-01 22:25 ` Benjamin Herrenschmidt [this message]
2015-09-01 22:45 ` Paul Mackerras
2015-09-01 22:55 ` Benjamin Herrenschmidt
2015-09-02 7:26 ` Thomas Huth
2015-09-02 8:26 ` Alexander Graf
2015-09-02 8:35 ` Thomas Huth
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=1441146305.2668.51.camel@au1.ibm.com \
--to=benh@au1$(echo .)ibm.com \
--cc=agraf@suse$(echo .)com \
--cc=kvm-ppc@vger$(echo .)kernel.org \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=paulus@samba$(echo .)org \
--cc=thuth@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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