Re: [PATCH] arm64: KVM: fix 64bit CP15 VM access for 32bit guests

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

 



On Fri, Aug 01, 2014 at 12:00:36PM +0100, Marc Zyngier wrote:
> Commit f0a3eaff71b8 (ARM64: KVM: fix big endian issue in
> access_vm_reg for 32bit guest) changed the way we handle CP15
> VM accesses, so that all 64bit accesses are done via vcpu_sys_reg.
> 
> This looks like a good idea as it solves indianness issues in an
> elegant way, except for one small detail: the register index is
> doesn't refer to the same array! We end up corrupting some random
> data structure instead.

Ouch!

> 
> Fix this by reverting to the original code, except for the introduction
> of a vcpu_cp15_64_high macro that deals with the endianness thing.
> 
> Tested on Juno with 32bit SMP guests.
> 
> Cc: Victor Kamensky <victor.kamensky@xxxxxxxxxx>
> Cc: Christoffer Dall <christoffer.dall@xxxxxxxxxx>
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> ---
> Christoffer, can you please have a look at this one and and queue it if
> you find it acceptable?
> 

Good catch, it looks good, I'll queue it on kvmarm/next right away.

Reviewed-by: Christoffer Dall <christoffer.dall@xxxxxxxxxx>

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