KVM: Fix dirty-ring ordering on weakly ordered architectures
Status from this message: Applied to next, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 3 repliesApplied
- v16 patches 21 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | KVM: Use acquire/release semantics when accessing dirty ring GFN statevirt/ | +2 | 0 replies | |
| 2/6 | KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config optionarch/ include/ virt/ +1 more | +24 | 0 replies | |
| 3/6 | KVM: x86: Select CONFIG_HAVE_KVM_DIRTY_RING_ACQ_RELarch/ | +1 | 0 replies | |
| 4/6 | KVM: Document weakly ordered architecture requirements for dirty ringDocumentation/ | +15 | 0 replies | |
| 5/6 | KVM: selftests: dirty-log: Upgrade flag accesses to acquire/release semanticstools/ | +3 | 0 replies | |
| 6/6 | KVM: selftests: dirty-log: Use KVM_CAP_DIRTY_LOG_RING_ACQ_REL if availabletools/ tools/ | +6 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Gavin Shan | Peter Xu |
|---|---|---|
| Series | R-b | R-b |
| 1/6 | ||
| 2/6 | ||
| 3/6 | ||
| 4/6 | ||
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] KVM: Fix dirty-ring ordering on weakly ordered architectures
[Same distribution list as Gavin's dirty-ring on arm64 series]
This is an update on the initial series posted as [0].
As Gavin started posting patches enabling the dirty-ring infrastructure on arm64 [1], it quickly became apparent that the API was never intended to work on relaxed memory ordering architectures (owing to its x86 origins).
This series tries to retrofit some ordering into the existing API by:
- relying on acquire/release semantics which are the default on x86, but need to be explicit on arm64
- adding a new capability that indicate which flavor is supported, either with explicit ordering (arm64) or both implicit and explicit (x86), as suggested by Paolo at KVM Forum
- documenting the requirements for this new capability on weakly ordered architectures
- updating the selftests to do the right thing
Ideally, this series should be a prefix of Gavin's, plus a small change to his series:
arch/arm64/kvm/Kconfig +1 -1
@@ -32,7 +32,7 @@ menuconfig KVM select KVM_VFIO select HAVE_KVM_EVENTFD select HAVE_KVM_IRQFD - select HAVE_KVM_DIRTY_RING + select HAVE_KVM_DIRTY_RING_ACQ_REL select HAVE_KVM_MSI select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQ_ROUTING
This has been very lightly tested on an arm64 box with Gavin's v3 [2] series.
* From v1:
- Repainted the config symbols and new capability so that their naming is more acceptable and causes less churn
- Fixed a couple of blunders as pointed out by Peter and Paolo
- Updated the documentation
[0] https://lore.kernel.org/r/[email protected]
[1] https://lore.kernel.org/lkml/YyiV%[email protected]/T/
[2] https://lore.kernel.org/r/[email protected]
Marc Zyngier (6):
KVM: Use acquire/release semantics when accessing dirty ring GFN state
KVM: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and config option
KVM: x86: Select CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL
KVM: Document weakly ordered architecture requirements for dirty ring
KVM: selftests: dirty-log: Upgrade flag accesses to acquire/release
semantics
KVM: selftests: dirty-log: Use KVM_CAP_DIRTY_LOG_RING_ACQ_REL if
available
Documentation/virt/kvm/api.rst | 17 +++++++++++++++-- arch/x86/kvm/Kconfig | 3 ++- include/uapi/linux/kvm.h | 1 + tools/testing/selftests/kvm/dirty_log_test.c | 8 +++++--- tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++++- virt/kvm/Kconfig | 14 ++++++++++++++ virt/kvm/dirty_ring.c | 4 ++-- virt/kvm/kvm_main.c | 9 ++++++++- 8 files changed, 51 insertions(+), 10 deletions(-)
Signature · 6 lines
2.34.1 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm