v1 -> v2: The 'while' loop in patch# 2 is replaced with a 'for' loop According to sections "Canonicalization and Consistency Checks" and "Event Injection" in APM vol 2, VMRUN exits with VMEXIT_INVALID error code if either: - Reserved values of TYPE have been specified, or - TYPE = 3 (exception) has been specified with a vector that does not correspond to an exception (this includes vector 2, which is an NMI, not an exception). Patch# 1 adds these checks to KVM. Patch# 2 adds tests for these checks. [PATCH 1/2 v2] KVM: nSVM: Check reserved values for 'Type' and invalid [PATCH 2/2 v2] nSVM: Test reserved values for 'Type' and invalid vectors in arch/x86/include/asm/svm.h | 4 ++++ arch/x86/kvm/svm/nested.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) Krish Sadhukhan (1): KVM: nSVM: Check reserved values for 'Type' and invalid vectors in EVENTINJ [root@nsvm-sadhukhan-1 kvm-unit-tests]# /root/Tools/git-format-patch.sh 4e259a7 x86/svm_tests.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Krish Sadhukhan (1): nSVM: Test reserved values for 'Type' and invalid vectors in EVENTINJ