Re: [PATCH 5/6] KVM: PPC: Book3S HV: Access XICS in BE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()?

Paul.
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux