mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 11:28:28 +00:00
KVM: arm64: vgic-its: Fix handling of indirect tables
The current code will fail on valid indirect tables, and happily use the ones that are pointing out of the guest RAM. Funny what a small "!" can do for you... Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
parent
d97594e6bc
commit
c0091073dd
@ -702,9 +702,9 @@ static bool vgic_its_check_device_id(struct kvm *kvm, struct vgic_its *its,
|
||||
return false;
|
||||
|
||||
/* Each 1st level entry is represented by a 64-bit value. */
|
||||
if (!kvm_read_guest(kvm,
|
||||
BASER_ADDRESS(r) + index * sizeof(indirect_ptr),
|
||||
&indirect_ptr, sizeof(indirect_ptr)))
|
||||
if (kvm_read_guest(kvm,
|
||||
BASER_ADDRESS(r) + index * sizeof(indirect_ptr),
|
||||
&indirect_ptr, sizeof(indirect_ptr)))
|
||||
return false;
|
||||
|
||||
/* check the valid bit of the first level entry */
|
||||
|
Loading…
Reference in New Issue
Block a user