mbox series

[0/3] nSVM: Test host RFLAGS.TF on VMRUN

Message ID 20210203012842.101447-1-krish.sadhukhan@oracle.com (mailing list archive)
Headers show
Series nSVM: Test host RFLAGS.TF on VMRUN | expand

Message

Krish Sadhukhan Feb. 3, 2021, 1:28 a.m. UTC
According to section "VMRUN and TF/RF Bits in EFLAGS" in AMD APM vol 2,

    "From the host point of view, VMRUN acts like a single instruction,
     even though an arbitrary number of guest instructions may execute
     before a #VMEXIT effectively completes the VMRUN. As a single
     host instruction, VMRUN interacts with EFLAGS.TF like ordinary
     instructions. EFLAGS.TF causes a #DB trap after the VMRUN completes
     on the host side (i.e., after the #VMEXIT from the guest)."

Patch# 1 replaces a hard-coded value with a #define.
Patch# 2 modifies the assembly in svm_vmrun() so that a Single-Step breakpoint
can placed right before the VMRUN instruction. It also adds helper functions
for setting/un-setting that breakpoint.
Patch# 3 adds a test for the RFLAGS.TF on VMRUN.

[PATCH 1/3] KVM: SVM: Replace hard-coded value with #define
[PATCH 2/3] nVMX: Add helper functions to set/unset host RFLAGS.TF on
[PATCH 3/3] nSVM: Test effect of host RFLAGS.TF on VMRUN

 arch/x86/kvm/svm/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Krish Sadhukhan (1):
      KVM: SVM: Replace hard-coded value with #define

 x86/svm.c       | 24 +++++++++++++--
 x86/svm.h       |  3 ++
 x86/svm_tests.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 118 insertions(+), 3 deletions(-)

Krish Sadhukhan (2):
      nVMX: Add helper functions to set/unset host RFLAGS.TF on the VMRUN instruction
      nSVM: Test effect of host RFLAGS.TF on VMRUN