Commit 7e3963a5 authored by Marc Zyngier's avatar Marc Zyngier

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: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent c0091073
...@@ -707,6 +707,8 @@ static bool vgic_its_check_device_id(struct kvm *kvm, struct vgic_its *its, ...@@ -707,6 +707,8 @@ static bool vgic_its_check_device_id(struct kvm *kvm, struct vgic_its *its,
&indirect_ptr, sizeof(indirect_ptr))) &indirect_ptr, sizeof(indirect_ptr)))
return false; return false;
indirect_ptr = le64_to_cpu(indirect_ptr);
/* check the valid bit of the first level entry */ /* check the valid bit of the first level entry */
if (!(indirect_ptr & BIT_ULL(63))) if (!(indirect_ptr & BIT_ULL(63)))
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment