[PATCH 0/3] Handle MMIO during event delivery error on SVM

Ivan Orlov posted 3 patches 2 months ago
arch/x86/include/asm/kvm_host.h               |  8 ++++
arch/x86/kvm/mmu/mmu.c                        | 15 +++++-
arch/x86/kvm/svm/svm.c                        |  4 ++
arch/x86/kvm/vmx/vmx.c                        | 32 ++++---------
arch/x86/kvm/x86.c                            | 22 +++++++++
.../selftests/kvm/set_memory_region_test.c    | 46 +++++++++++++++++++
6 files changed, 104 insertions(+), 23 deletions(-)
[PATCH 0/3] Handle MMIO during event delivery error on SVM
Posted by Ivan Orlov 2 months ago
Currently, the situation when guest accesses MMIO during event delivery
is handled differently in VMX and SVM: on VMX KVM returns internal error
with suberror = KVM_INTERNAL_ERROR_DELIVERY_EV, when SVM simply goes
into infinite loop trying to deliver an event again and again.

This patch series eliminates this difference by returning a KVM internal
error with suberror = KVM_INTERNAL_ERROR_DELIVERY_EV when guest is
performing MMIO during event delivery, for both VMX and SVM.

Also, it introduces a selftest test case which covers the MMIO during
event delivery error handling.

Ivan Orlov (3):
  KVM: x86, vmx: Add function for event delivery error generation
  KVM: vmx, svm, mmu: Process MMIO during event delivery
  selftests: KVM: Add test case for MMIO during event delivery

 arch/x86/include/asm/kvm_host.h               |  8 ++++
 arch/x86/kvm/mmu/mmu.c                        | 15 +++++-
 arch/x86/kvm/svm/svm.c                        |  4 ++
 arch/x86/kvm/vmx/vmx.c                        | 32 ++++---------
 arch/x86/kvm/x86.c                            | 22 +++++++++
 .../selftests/kvm/set_memory_region_test.c    | 46 +++++++++++++++++++
 6 files changed, 104 insertions(+), 23 deletions(-)

-- 
2.43.0