[PATCH v5 04/12] ARM: KVM: Initial VGIC infrastructure code
From: Will Deacon <hidden>
Date: 2013-01-14 22:50:42
Also in:
kvm
On Mon, Jan 14, 2013 at 09:08:54PM +0000, Christoffer Dall wrote:
On Mon, Jan 14, 2013 at 10:31 AM, Will Deacon [off-list ref] wrote:quoted
On Tue, Jan 08, 2013 at 06:41:51PM +0000, Christoffer Dall wrote:quoted
+ 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