Skip to content

KVM: x86: Interrupt-based mechanism for async_pf 'page present' notifications

Vitaly Kuznetsov kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 19 repliesIn review
  2. v18 patches 34 repliesSuperseded

Changes in v2 from the cover letter

- struct kvm_vcpu_pv_apf_data's fields renamed to 'flags' and 'token', comments added [Vivek Goyal]
- 'type1/2' names for APF events dropped from everywhere [Vivek Goyal]
- kvm_arch_can_inject_async_page_present() renamed to kvm_arch_can_dequeue_async_page_present [Vivek Goyal]
- 'KVM: x86: deprecate KVM_ASYNC_PF_SEND_ALWAYS' patch added.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10Revert "KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously"arch/x86/kvm/x86.c+1 -220 replies
2/10KVM: x86: extend struct kvm_vcpu_pv_apf_data with token infoarch/x86/include/asm/kvm_host.h arch/x86/include/asm/kvm_para.h arch/x86/include/uapi/asm/kvm_para.h +7 more+37 -254 replies
3/10KVM: rename kvm_arch_can_inject_async_page_present() to kvm_arch_can_dequeue_async_page_present()arch/s390/include/asm/kvm_host.h arch/s390/kvm/kvm-s390.c arch/x86/include/asm/kvm_host.h +2 more+5 -50 replies
4/10KVM: introduce kvm_read_guest_offset_cached()include/linux/kvm_host.h virt/kvm/kvm_main.c+17 -50 replies
5/10KVM: x86: interrupt based APF 'page ready' event deliveryDocumentation/virt/kvm/msr.rst arch/x86/include/asm/kvm_host.h arch/x86/include/uapi/asm/kvm_para.h +1 more+152 -595 replies
6/10KVM: x86: acknowledgment mechanism for async pf page ready notificationsDocumentation/virt/kvm/msr.rst arch/s390/include/asm/kvm_host.h arch/x86/include/asm/kvm_host.h +3 more+53 -53 replies
7/10KVM: x86: announce KVM_FEATURE_ASYNC_PF_INTDocumentation/virt/kvm/cpuid.rst Documentation/virt/kvm/msr.rst arch/x86/include/uapi/asm/kvm_para.h +3 more+19 -50 replies
8/10KVM: x86: Switch KVM guest to using interrupts for page ready APF deliveryarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/hardirq.h +4 more+66 -132 replies
9/10KVM: x86: drop KVM_PV_REASON_PAGE_READY case from kvm_handle_page_fault()arch/x86/kvm/mmu/mmu.c+6 -110 replies
10/10KVM: x86: deprecate KVM_ASYNC_PF_SEND_ALWAYSarch/x86/include/asm/kvm_host.h arch/x86/include/uapi/asm/kvm_para.h arch/x86/kernel/kvm.c +1 more+10 -92 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchGavin Shan
1/10R-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] KVM: x86: Interrupt-based mechanism for async_pf 'page present' notifications

Concerns were expressed around (ab)using #PF for KVM's async_pf mechanism, it seems that re-using #PF exception for a PV mechanism wasn't a great idea after all. The Grand Plan is to switch to using e.g. #VE for 'page not present' events and normal APIC interrupts for 'page ready' events. This series does the later.

Changes since v1:
- struct kvm_vcpu_pv_apf_data's fields renamed to 'flags' and 'token', comments added [Vivek Goyal]
- 'type1/2' names for APF events dropped from everywhere [Vivek Goyal]
- kvm_arch_can_inject_async_page_present() renamed to kvm_arch_can_dequeue_async_page_present [Vivek Goyal]
- 'KVM: x86: deprecate KVM_ASYNC_PF_SEND_ALWAYS' patch added.

v1: https://lore.kernel.org/kvm/[email protected]/
QEMU patches for testing: https://github.com/vittyvk/qemu.git (async_pf2_v2 branch)

Vitaly Kuznetsov (10):
Revert "KVM: async_pf: Fix #DF due to inject "Page not Present" and
"Page Ready" exceptions simultaneously"
KVM: x86: extend struct kvm_vcpu_pv_apf_data with token info
KVM: rename kvm_arch_can_inject_async_page_present() to
kvm_arch_can_dequeue_async_page_present()
KVM: introduce kvm_read_guest_offset_cached()
KVM: x86: interrupt based APF 'page ready' event delivery
KVM: x86: acknowledgment mechanism for async pf page ready
notifications
KVM: x86: announce KVM_FEATURE_ASYNC_PF_INT
KVM: x86: Switch KVM guest to using interrupts for page ready APF
delivery
KVM: x86: drop KVM_PV_REASON_PAGE_READY case from
kvm_handle_page_fault()
KVM: x86: deprecate KVM_ASYNC_PF_SEND_ALWAYS

 Documentation/virt/kvm/cpuid.rst     |   6 ++
 Documentation/virt/kvm/msr.rst       | 120 +++++++++++++++------
 arch/s390/include/asm/kvm_host.h     |   4 +-
 arch/s390/kvm/kvm-s390.c             |   2 +-
 arch/x86/entry/entry_32.S            |   5 +
 arch/x86/entry/entry_64.S            |   5 +
 arch/x86/include/asm/hardirq.h       |   3 +
 arch/x86/include/asm/irq_vectors.h   |   6 +-
 arch/x86/include/asm/kvm_host.h      |  12 ++-
 arch/x86/include/asm/kvm_para.h      |  10 +-
 arch/x86/include/uapi/asm/kvm_para.h |  19 +++-
 arch/x86/kernel/irq.c                |   9 ++
 arch/x86/kernel/kvm.c                |  62 +++++++----
 arch/x86/kvm/cpuid.c                 |   3 +-
 arch/x86/kvm/mmu/mmu.c               |  19 ++--
 arch/x86/kvm/svm/nested.c            |   2 +-
 arch/x86/kvm/svm/svm.c               |   3 +-
 arch/x86/kvm/vmx/nested.c            |   2 +-
 arch/x86/kvm/vmx/vmx.c               |   5 +-
 arch/x86/kvm/x86.c                   | 149 ++++++++++++++++++---------
 include/linux/kvm_host.h             |   3 +
 include/uapi/linux/kvm.h             |   1 +
 virt/kvm/async_pf.c                  |  12 ++-
 virt/kvm/kvm_main.c                  |  19 +++-
 24 files changed, 344 insertions(+), 137 deletions(-)
Signature · 1 line
2.25.4