diff options
author | Tom Zanussi <zanussi@kernel.org> | 2019-06-11 08:42:20 -0500 |
---|---|---|
committer | Tom Zanussi <zanussi@kernel.org> | 2019-06-11 08:42:20 -0500 |
commit | d0232ce07eea759cf685caf2917fbc8cc71ff7c1 (patch) | |
tree | 44b98fe3c98cdda708e80396ec69349b8777ff94 /virt/kvm | |
parent | 9a1d3ac30fa261dc84546225f5b1683b0cb12464 (diff) | |
parent | 6d1510d86ef67e5fadb8038671e2ec43416daf7f (diff) | |
download | linux-rt-d0232ce07eea759cf685caf2917fbc8cc71ff7c1.tar.gz |
Merge tag 'v4.14.116' into v4.14-rt-work
This is the 4.14.116 stable release
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-its.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index d72b8481f250..dc06f5e40041 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -704,8 +704,9 @@ static bool vgic_its_check_id(struct vgic_its *its, u64 baser, u32 id, int l1_tbl_size = GITS_BASER_NR_PAGES(baser) * SZ_64K; u64 indirect_ptr, type = GITS_BASER_TYPE(baser); int esz = GITS_BASER_ENTRY_SIZE(baser); - int index; + int index, idx; gfn_t gfn; + bool ret; switch (type) { case GITS_BASER_TYPE_DEVICE: @@ -732,7 +733,8 @@ static bool vgic_its_check_id(struct vgic_its *its, u64 baser, u32 id, if (eaddr) *eaddr = addr; - return kvm_is_visible_gfn(its->dev->kvm, gfn); + + goto out; } /* calculate and check the index into the 1st level */ @@ -766,7 +768,12 @@ static bool vgic_its_check_id(struct vgic_its *its, u64 baser, u32 id, if (eaddr) *eaddr = indirect_ptr; - return kvm_is_visible_gfn(its->dev->kvm, gfn); + +out: + idx = srcu_read_lock(&its->dev->kvm->srcu); + ret = kvm_is_visible_gfn(its->dev->kvm, gfn); + srcu_read_unlock(&its->dev->kvm->srcu, idx); + return ret; } static int vgic_its_alloc_collection(struct vgic_its *its, |