1
0
Fork 0

KVM: arm64: vgic-its: Fix vgic_its_check_device_id BE handling

The ITS tables are stored in LE format. If the host is reading
a L1 table entry to check its validity, it must convert it to
the CPU endianness.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
steinar/wifi_calib_4_9_kernel
Marc Zyngier 2016-07-17 11:34:53 +01:00
parent c0091073dd
commit 7e3963a515
1 changed files with 2 additions and 0 deletions

View File

@ -707,6 +707,8 @@ static bool vgic_its_check_device_id(struct kvm *kvm, struct vgic_its *its,
&indirect_ptr, sizeof(indirect_ptr)))
return false;
indirect_ptr = le64_to_cpu(indirect_ptr);
/* check the valid bit of the first level entry */
if (!(indirect_ptr & BIT_ULL(63)))
return false;