projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c009107
)
KVM: arm64: vgic-its: Fix vgic_its_check_device_id BE handling
author
Marc Zyngier
<marc.zyngier@arm.com>
Sun, 17 Jul 2016 10:34:53 +0000
(11:34 +0100)
committer
Marc Zyngier
<marc.zyngier@arm.com>
Mon, 18 Jul 2016 17:15:16 +0000
(18:15 +0100)
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>
virt/kvm/arm/vgic/vgic-its.c
patch
|
blob
|
blame
|
history
diff --git
a/virt/kvm/arm/vgic/vgic-its.c
b/virt/kvm/arm/vgic/vgic-its.c
index d6697c4d81ec5c6084ecb0b3dd596160ffac1a70..2ac5927b1d91366142647b51d3a1ccf2e05fd3da 100644
(file)
--- a/
virt/kvm/arm/vgic/vgic-its.c
+++ b/
virt/kvm/arm/vgic/vgic-its.c
@@
-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;