All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Paul Mackerras <paulus@samba.org>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, anton@samba.org
Subject: Re: [PATCH 5/6] KVM: PPC: Book3S HV: Access XICS in BE
Date: Tue, 17 Jun 2014 08:37:13 +0000	[thread overview]
Message-ID: <539FFE39.1000701@suse.de> (raw)
In-Reply-To: <20140617010204.GB16554@iris.ozlabs.ibm.com>


On 17.06.14 03:02, Paul Mackerras wrote:
> On Wed, Jun 11, 2014 at 12:33:50PM +0200, Alexander Graf wrote:
>> On the exit path from the guest we check what type of interrupt we received
>> if we received one. This means we're doing hardware access to the XICS interrupt
>> controller.
>>
>> However, when running on a little endian system, this access is byte reversed.
>>
>> So let's make sure to swizzle the bytes back again and virtuall make XICS
>> accesses big endian.
> ...
>
>> @@ -2241,7 +2253,8 @@ kvmppc_read_intr:
>>   42:	/* It's not an IPI and it's for the host, stash it in the PACA
>>   	 * before exit, it will be picked up by the host ICP driver
>>   	 */
>> -	stw	r0, HSTATE_SAVED_XIRR(r13)
>> +	li	r4, HSTATE_SAVED_XIRR
>> +	STWX_BE	r0, r13, r4
> This is a paca field, not something mandated by PAPR or shared with
> the guest, so why do we need to keep it BE?  If you do make it BE,
> don't you also need to fix kvmppc_get_xics_latch()?

Yikes. Yes. Thanks a lot for the catch!


Alex


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Paul Mackerras <paulus@samba.org>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, anton@samba.org
Subject: Re: [PATCH 5/6] KVM: PPC: Book3S HV: Access XICS in BE
Date: Tue, 17 Jun 2014 10:37:13 +0200	[thread overview]
Message-ID: <539FFE39.1000701@suse.de> (raw)
In-Reply-To: <20140617010204.GB16554@iris.ozlabs.ibm.com>


On 17.06.14 03:02, Paul Mackerras wrote:
> On Wed, Jun 11, 2014 at 12:33:50PM +0200, Alexander Graf wrote:
>> On the exit path from the guest we check what type of interrupt we received
>> if we received one. This means we're doing hardware access to the XICS interrupt
>> controller.
>>
>> However, when running on a little endian system, this access is byte reversed.
>>
>> So let's make sure to swizzle the bytes back again and virtuall make XICS
>> accesses big endian.
> ...
>
>> @@ -2241,7 +2253,8 @@ kvmppc_read_intr:
>>   42:	/* It's not an IPI and it's for the host, stash it in the PACA
>>   	 * before exit, it will be picked up by the host ICP driver
>>   	 */
>> -	stw	r0, HSTATE_SAVED_XIRR(r13)
>> +	li	r4, HSTATE_SAVED_XIRR
>> +	STWX_BE	r0, r13, r4
> This is a paca field, not something mandated by PAPR or shared with
> the guest, so why do we need to keep it BE?  If you do make it BE,
> don't you also need to fix kvmppc_get_xics_latch()?

Yikes. Yes. Thanks a lot for the catch!


Alex

  reply	other threads:[~2014-06-17  8:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 10:33 [PATCH 0/6] KVM: PPC: Book3S HV: Enable on little endian hosts Alexander Graf
2014-06-11 10:33 ` Alexander Graf
2014-06-11 10:33 ` [PATCH 1/6] PPC: Add asm helpers for BE 32bit load/store Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-17  0:51   ` Paul Mackerras
2014-06-17  0:51     ` Paul Mackerras
2014-06-17  8:34     ` Alexander Graf
2014-06-17  8:34       ` Alexander Graf
2014-06-11 10:33 ` [PATCH 2/6] KVM: PPC: Book3S HV: Make HTAB code LE host aware Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-11 10:33 ` [PATCH 3/6] KVM: PPC: Book3S HV: Access guest VPA in BE Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-11 10:33 ` [PATCH 4/6] KVM: PPC: Book3S HV: Access host lppaca and shadow slb " Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-11 10:33 ` [PATCH 5/6] KVM: PPC: Book3S HV: Access XICS " Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-17  1:02   ` Paul Mackerras
2014-06-17  1:02     ` Paul Mackerras
2014-06-17  8:37     ` Alexander Graf [this message]
2014-06-17  8:37       ` Alexander Graf
2014-06-17 10:22       ` Alexander Graf
2014-06-17 10:22         ` Alexander Graf
2014-06-17 12:13         ` Paul Mackerras
2014-06-17 12:13           ` Paul Mackerras
2014-06-17 12:14           ` Alexander Graf
2014-06-17 12:14             ` Alexander Graf
2014-06-11 10:33 ` [PATCH 6/6] KVM: PPC: Book3S HV: Enable for little endian hosts Alexander Graf
2014-06-11 10:33   ` Alexander Graf
2014-06-16  4:22 ` [PATCH 0/6] KVM: PPC: Book3S HV: Enable on " Aneesh Kumar K.V
2014-06-16  4:34   ` Aneesh Kumar K.V
2014-06-16 12:17   ` Alexander Graf
2014-06-16 12:17     ` Alexander Graf

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=539FFE39.1000701@suse.de \
    --to=agraf@suse.de \
    --cc=anton@samba.org \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=paulus@samba.org \
    /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.