Skip to content

Enable notify VM exit

Chenyi Qiang kvm qemu-devel 9 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest posting 2/24 patches 0 repliesNew
  2. v8 posting 1/24 patches 2 repliesSuperseded
  3. v72 patches 5 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v62 patches7 repliesSuperseded
v53 patches7 repliesSuperseded
v43 patches2 repliesSuperseded
v33 patches0 repliesSuperseded
v23 patches0 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v8 from the cover letter

- Add triple_fault_pending field transmission on migration (Paolo)
- Change the notify-vmexit and notify-window to the accelerator property. Add it as a x86-specific property. (Paolo)
- Add a preparation patch to expose struct KVMState in order to add target-specific property.
- Define three option for notify-vmexit. Make it on by default. (Paolo)
- Raise a KVM internal error instead of triple fault if invalid context of guest VMCS detected.
- v7: https://lore.kernel.org/qemu-devel/[email protected]/

Patches in v8 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple faulttarget/i386/cpu.c target/i386/cpu.h target/i386/kvm/kvm.c +1 more+42 -00 replies
2/4kvm: allow target-specific accelerator propertiesaccel/kvm/kvm-all.c include/sysemu/kvm.h target/arm/kvm.c +5 more+28 -00 replies
3/4kvm: expose struct KVMStateaccel/kvm/kvm-all.c include/sysemu/kvm_int.h+75 -740 replies
4/4i386: add notify VM exit supportaccel/kvm/kvm-all.c qapi/run-state.json qemu-options.hx +1 more+128 -00 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchPeter Xu
1/4A-b
2/4
3/4
4/4A-b

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

Read the v8 thread

Cover letter [RESEND PATCH v8 0/4] Enable notify VM exit

There's a minor issue in previous version. Sorry for that and please ignore that version. Resend the patch set.

---

Notify VM exit is introduced to mitigate the potential DOS attach from malicious VM. This series is the userspace part to enable this feature through a new KVM capability KVM_CAP_X86_NOTIFY_VMEXIT. The detailed info can be seen in Patch 4.

The corresponding KVM support can be found in linux 6.0-rc:
(2f4073e08f4c KVM: VMX: Enable Notify VM exit)

---
Change logs:
v7 -> v8
- Add triple_fault_pending field transmission on migration (Paolo)
- Change the notify-vmexit and notify-window to the accelerator property. Add it as a x86-specific property. (Paolo)
- Add a preparation patch to expose struct KVMState in order to add target-specific property.
- Define three option for notify-vmexit. Make it on by default. (Paolo)
- Raise a KVM internal error instead of triple fault if invalid context of guest VMCS detected.
- v7: https://lore.kernel.org/qemu-devel/[email protected]/

v6 -> v7
- Add a warning message when exiting to userspace (Peter Xu)
- v6: https://lore.kernel.org/all/[email protected]/

v5 -> v6
- Add some info related to the valid range of notify_window in patch 2. (Peter Xu)
- Add the doc in qemu-options.hx. (Peter Xu)
- v5: https://lore.kernel.org/qemu-devel/[email protected]/

---

Chenyi Qiang (3):
i386: kvm: extend kvm_{get, put}_vcpu_events to support pending triple
fault
kvm: expose struct KVMState
i386: add notify VM exit support

Paolo Bonzini (1):
kvm: allow target-specific accelerator properties

 accel/kvm/kvm-all.c      |  78 ++-----------------------
 include/sysemu/kvm.h     |   2 +
 include/sysemu/kvm_int.h |  75 ++++++++++++++++++++++++
 qapi/run-state.json      |  17 ++++++
 qemu-options.hx          |  11 ++++
 target/arm/kvm.c         |   4 ++
 target/i386/cpu.c        |   1 +
 target/i386/cpu.h        |   1 +
 target/i386/kvm/kvm.c    | 122 +++++++++++++++++++++++++++++++++++++++
 target/i386/machine.c    |  20 +++++++
 target/mips/kvm.c        |   4 ++
 target/ppc/kvm.c         |   4 ++
 target/riscv/kvm.c       |   4 ++
 target/s390x/kvm/kvm.c   |   4 ++
 14 files changed, 273 insertions(+), 74 deletions(-)
Signature · 1 line
2.17.1