Re-posting v2 as some code were left commented out in patch#2. Sorry about that ! v1 -> v2: Patch# 1: I have maded nested_vmx_check_pml_controls() more concise. I have also removed the redundant check for reserved bits. Patch# 2: I have removed the test for the reserved bits since the existing test_vmcs_page_addr() already covers it. [PATCH 1/2 v2][KVM] nVMX x86: Make nested_vmx_check_pml_controls() concise [PATCH 2/2 v2][kvm-unit-test] nVMX x86: Check PML and EPT on vmentry of L2 guests arch/x86/kvm/vmx.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) Krish Sadhukhan (1): nVMX x86: Make nested_vmx_check_pml_controls() concise x86/vmx_tests.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) Krish Sadhukhan (1): nVMX x86: Check PML and EPT on vmentry of L2 guests