From: Nadav Amit <nadav.amit@xxxxxxxxx> Date: Wed, May 8, 2019 at 10:47 AM To: Paolo Bonzini Cc: <kvm@xxxxxxxxxxxxxxx>, Nadav Amit, Jim Mattson, Sean Christopherson > From: Nadav Amit <nadav.amit@xxxxxxxxx> > > According to Intel SDM 26.3.1.5 "Checks on Guest Non-Register State", if > the activity state is HLT, the only events that can be injected are NMI, > MTF and "Those with interruption type hardware exception and vector 1 > (debug exception) or vector 18 (machine-check exception)." > > Two tests, verify_nmi_window_exit() and verify_intr_window_exit(), try > to do something that real hardware disallows (i.e., fail the VM-entry) > by injecting #UD in HLT-state. Inject #DB instead as the injection > should succeed in these tests. > > Cc: Jim Mattson <jmattson@xxxxxxxxxx> > Cc: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> > Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx> Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx> Thanks for the fix! It has always bothered me that there is no easy way to validate a kvm-unit-test on physical hardware. Do you have a mechanism for doing so? If so, would you be willing to share? I don't suppose you have a patch for kvm to fail the VM-entry in this case?