On 29.11.18 01:00, Jim Mattson wrote: > Per SDM volume 3, section 24.11.3: Initializing a VMCS, "to avoid the > uncertainties of implementation-specific behavior, software should > execute VMCLEAR on a VMCS region before making the corresponding VMCS > active with VMPTRLD for the first time." > > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> > --- > x86/vmx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/x86/vmx.c b/x86/vmx.c > index ab3c2a4..6ba56bc 100644 > --- a/x86/vmx.c > +++ b/x86/vmx.c > @@ -1384,7 +1384,8 @@ static void test_vmptrld(void) > make_vmcs_current(tmp_root) == 1); > > /* Pass VMXON region */ > - make_vmcs_current(vmcs); > + assert(!vmcs_clear(vmcs)); > + assert(!make_vmcs_current(vmcs)); > tmp_root = (struct vmcs *)vmxon_region; > report("test vmptrld with vmxon region", > make_vmcs_current(tmp_root) == 1); > Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> -- Thanks, David / dhildenb