Re: [PATCH v4 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness

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

 



On 08/05/14 11:06, Peter Maydell wrote:
> On 8 May 2014 10:32, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
>> +int kvm_cpu__get_endianness(struct kvm_cpu *vcpu)
>> +{
>> +       struct kvm_one_reg reg;
>> +       u64 psr;
>> +       u64 sctlr;
>> +
>> +       /*
>> +        * Quoting the definition given by Peter Maydell:
>> +        *
>> +        * "Endianness of the CPU which does the virtio reset at the
>> +        * point when it does that reset"
>> +        *
>> +        * We first check for an AArch32 guest: its endianness can
>> +        * change when using SETEND, which affects the CPSR.E bit.
>> +        *
>> +        * If we're AArch64, use SCTLR_EL1.E0E if access comes from
>> +        * EL0, and SCTLR_EL1.EE if access comes from EL1.
>> +        */
> 
> I note that the set of checks described here match the logic
> of the ARM ARM BigEndian() pseudocode function, which is
> a good sign.

Pure luck. Or maybe I'm now going slightly mad. Either way, consistency
is good... ;-)

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux