Skip to content
  • Vitaly Kuznetsov's avatar
    x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests · a8350231
    Vitaly Kuznetsov authored
    
    
    Sane L1 hypervisors are not supposed to turn any of the unsupported VMX
    controls on for its guests and nested_vmx_check_controls() checks for
    that. This is, however, not the case for the controls which are supported
    on the host but are missing in enlightened VMCS and when eVMCS is in use.
    
    It would certainly be possible to add these missing checks to
    nested_check_vm_execution_controls()/_vm_exit_controls()/.. but it seems
    preferable to keep eVMCS-specific stuff in eVMCS and reduce the impact on
    non-eVMCS guests by doing less unrelated checks. Create a separate
    nested_evmcs_check_controls() for this purpose.
    
    Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    a8350231