Skip to content
Snippets Groups Projects
Commit d7b2b32a authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

KVM: x86: Remove redundant vm_entry_controls_clearbit() call

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074832



commit 4335edbb
Author: Zhenzhong Duan <zhenzhong.duan@intel.com>
Date:   Fri Mar 11 18:26:43 2022 +0800

    KVM: x86: Remove redundant vm_entry_controls_clearbit() call

    When emulating exit from long mode, EFER_LMA is cleared with
    vmx_set_efer().  This will already unset the VM_ENTRY_IA32E_MODE control
    bit as requested by SDM, so there is no need to unset VM_ENTRY_IA32E_MODE
    again in exit_lmode() explicitly.  In case EFER isn't supported by
    hardware, long mode isn't supported, so exit_lmode() cannot be reached.

    Note that, thanks to the shadow controls mechanism, this change doesn't
    eliminate vmread or vmwrite.

Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
    Message-Id: <20220311102643.807507-3-zhenzhong.duan@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent 3f78b85e
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment