Skip to content

KVM: Add a kvm_run flag to signal need for completion

Sean Christopherson kvm kvmarm linux-arm-kernel linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: x86: Document that KVM_EXIT_HYPERCALL requires completionDocumentation/virt/kvm/api.rst+20 -190 replies
2/5KVM: Clear vcpu->run->flags at start of KVM_RUN for all architecturesarch/arm64/kvm/arm.c arch/arm64/kvm/handle_exit.c arch/powerpc/kvm/book3s_hv.c +2 more+5 -60 replies
3/5KVM: Add a common kvm_run flag to communicate an exit needs completionDocumentation/virt/kvm/api.rst arch/powerpc/kvm/book3s_emulate.c arch/powerpc/kvm/book3s_hv.c +6 more+49 -1710 replies
4/5KVM: selftests: Provide separate helper for KVM_RUN with immediate_exittools/testing/selftests/kvm/include/kvm_util.h tools/testing/selftests/kvm/lib/kvm_util.c tools/testing/selftests/kvm/x86/nested_exceptions_test.c+10 -40 replies
5/5KVM: selftests: Rely on KVM_RUN_NEEDS_COMPLETION to complete userspace exitstools/testing/selftests/kvm/include/kvm_util.h tools/testing/selftests/kvm/lib/kvm_util.c tools/testing/selftests/kvm/lib/ucall_common.c +2 more+13 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] KVM: Add a kvm_run flag to signal need for completion

Add a flag to kvm_run, KVM_RUN_NEEDS_COMPLETION, that is set by KVM to inform userspace that KVM_RUN needs to be re-invoked prior to state save/restore. The current approach of relying on KVM developers to update documentation, and on VMM developers to read said documentation, is brittle and error prone.

Note, this series is *very* lightly tested (borderline RFC).

Sean Christopherson (5):
KVM: x86: Document that KVM_EXIT_HYPERCALL requires completion
KVM: Clear vcpu->run->flags at start of KVM_RUN for all architectures
KVM: Add a common kvm_run flag to communicate an exit needs completion
KVM: selftests: Provide separate helper for KVM_RUN with
immediate_exit
KVM: selftests: Rely on KVM_RUN_NEEDS_COMPLETION to complete userspace
exits

 Documentation/virt/kvm/api.rst                | 77 ++++++++++++-------
 arch/arm64/kvm/arm.c                          |  1 -
 arch/arm64/kvm/handle_exit.c                  |  2 +-
 arch/powerpc/kvm/book3s_emulate.c             |  1 +
 arch/powerpc/kvm/book3s_hv.c                  |  5 +-
 arch/powerpc/kvm/book3s_pr.c                  |  2 +
 arch/powerpc/kvm/booke.c                      |  1 +
 arch/x86/include/uapi/asm/kvm.h               |  7 +-
 arch/x86/kvm/x86.c                            |  3 +-
 include/uapi/linux/kvm.h                      |  3 +
 .../testing/selftests/kvm/include/kvm_util.h  | 13 +++-
 tools/testing/selftests/kvm/lib/kvm_util.c    |  6 +-
 .../testing/selftests/kvm/lib/ucall_common.c  |  2 +-
 .../testing/selftests/kvm/lib/x86/processor.c |  8 +-
 .../kvm/x86/nested_exceptions_test.c          |  3 +-
 .../kvm/x86/triple_fault_event_test.c         |  3 +-
 virt/kvm/kvm_main.c                           |  4 +
 17 files changed, 90 insertions(+), 51 deletions(-)

base-commit: 10b2c8a67c4b8ec15f9d07d177f63b563418e948

Signature · 1 line
2.47.1.613.gc27f4b7a9f-goog