• Sean Christopherson's avatar
    KVM: x86: Remove emulator's broken checks on CR0/CR3/CR4 loads · d0fe7b64
    Sean Christopherson authored
    Remove the emulator's checks for illegal CR0, CR3, and CR4 values, as
    the checks are redundant, outdated, and in the case of SEV's C-bit,
    broken.  The emulator manually calculates MAXPHYADDR from CPUID and
    neglects to mask off the C-bit.  For all other checks, kvm_set_cr*() are
    a superset of the emulator checks, e.g. see CR4.LA57.
    
    Fixes: a780a3ea ("KVM: X86: Fix reserved bits check for MOV to CR3")
    Cc: Babu Moger <babu.moger@amd.com>
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20210422022128.3464144-2-seanjc@google.com>
    Cc: stable@vger.kernel.org
    [Unify check_cr_read and check_cr_write. - Paolo]
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    d0fe7b64
emulate.c 150 KB