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 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.

thanks
-- PMM
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux