On 17/04/20 03:35, Krish Sadhukhan wrote: > > On 4/16/20 9:28 AM, Sean Christopherson wrote: >> Enhance test_cr3_targets() to verify that attempting to write CR3-target >> value fields beyond the reported number of supported targets fails. >> >> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> >> --- >> x86/vmx_tests.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c >> index 1f97fe3..f5c72e6 100644 >> --- a/x86/vmx_tests.c >> +++ b/x86/vmx_tests.c >> @@ -3570,6 +3570,10 @@ static void test_cr3_targets(void) >> for (i = 0; i <= supported_targets + 1; i++) >> try_cr3_target_count(i, supported_targets); >> vmcs_write(CR3_TARGET_COUNT, cr3_targets); >> + >> + /* VMWRITE to nonexistent target fields should fail. */ >> + for (i = supported_targets; i < 256; i++) >> + TEST_ASSERT(vmcs_write(CR3_TARGET_0 + i*2, 0)); >> } >> /* > We don't need VMREAD testing ? Patches are welcome. :D Paolo