Fix race condition and simplify vgic active handler
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest3 patches 11 repliesIn review
Changes in v2 from the cover letter
- Separate guest and uaccess distributor active register writes.
- Only take the mutex in the guest access path.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | KVM: arm/arm64: Allow GICv2 to supply a uaccess register functionvirt/ virt/ | +14 | 1 reply | |
| 2/3 | KVM: arm/arm64: Separate guest and uaccess writes to dist {sc}activevirt/ virt/ virt/ +1 more | +60 | 1 reply | |
| 3/3 | KVM: arm/arm64: Simplify active_change_prepare and plug racearch/ arch/ virt/ +2 more | +20 | 9 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Marc Zyngier |
|---|---|
| 1/3 | A-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] Fix race condition and simplify vgic active handler
This is a small series that reworks a problem in a previously submitted patch [1]. The previous patch version did not consider that userspace accesses already hold the KVM mutex and therefore end up in deadlock.
These patches therefore introduces uaccess read/write functions for the GICv2 MMIO register descriptor framework, splits out the distributor active register write functionality into separate guest and userspace access functions, and then finally take the KVM mutex on the guest access path and gets rid of unneeded complexity from active_change_prepare/finish.
Applied on top of v4.12-rc1.
[1]: https://lists.cs.columbia.edu/pipermail/kvmarm/2017-May/025542.html
Changes from v1:
- Separate guest and uaccess distributor active register writes.
- Only take the mutex in the guest access path.
Christoffer Dall (3):
KVM: arm/arm64: Allow GICv2 to supply a uaccess register function
KVM: arm/arm64: Separate guest and uaccess writes to dist {sc}active
KVM: arm/arm64: Simplify active_change_prepare and plug race
arch/arm/include/asm/kvm_host.h | 2 -- arch/arm64/include/asm/kvm_host.h | 2 -- virt/kvm/arm/arm.c | 20 +++--------- virt/kvm/arm/vgic/vgic-mmio-v2.c | 24 +++++++------- virt/kvm/arm/vgic/vgic-mmio-v3.c | 8 +++-- virt/kvm/arm/vgic/vgic-mmio.c | 68 ++++++++++++++++++++++++++++++--------- virt/kvm/arm/vgic/vgic-mmio.h | 12 ++++++- virt/kvm/arm/vgic/vgic.c | 11 ++++--- 8 files changed, 92 insertions(+), 55 deletions(-)
Signature · 1 line
2.9.0