[PATCH v5 04/12] ARM: KVM: Initial VGIC infrastructure code
Will Deacon
will.deacon at arm.com
Mon Jan 14 17:50:42 EST 2013
On Mon, Jan 14, 2013 at 09:08:54PM +0000, Christoffer Dall wrote:
> On Mon, Jan 14, 2013 at 10:31 AM, Will Deacon <will.deacon at arm.com> wrote:
> > On Tue, Jan 08, 2013 at 06:41:51PM +0000, Christoffer Dall wrote:
> >> + case ACCESS_READ_VALUE:
> >> + *((u32 *)mmio->data) = (regval >> shift) & mask;
> >> + }
> >> + }
> >> +}
> >
> > As I mentioned previously, I suspect that this doesn't work with big-endian
> > systems. Whilst that's reasonable for the moment, a comment would be useful
> > for the unlucky soul that decides to do that work in future (or add
> > accessors for mmio->data as I suggested before).
> >
> admittedly this really hurts my brain, but I think there's actually no
> problem with endianness: whatever comes in mmio->data will have native
> endianness and the vgic is always little-endian, so a guest would have
> to make sure to do its own endianness conversion before writing data,
> or did I get this backwards? (some nasty feeling about if the OS is
> compiled in another endianness than the hardware everything may
> break).
No, you're right. As long as the vgic is always little-endian the access
will be ok.
Sorry for the false alarm,
Will
More information about the linux-arm-kernel
mailing list