• Tom Lendacky's avatar
    KVM: SVM: Add support for CR4 write traps for an SEV-ES guest · 5b51cb13
    Tom Lendacky authored
    For SEV-ES guests, the interception of control register write access
    is not recommended. Control register interception occurs prior to the
    control register being modified and the hypervisor is unable to modify
    the control register itself because the register is located in the
    encrypted register state.
    
    SEV-ES guests introduce new control register write traps. These traps
    provide intercept support of a control register write after the control
    register has been modified. The new control register value is provided in
    the VMCB EXITINFO1 field, allowing the hypervisor to track the setting
    of the guest control registers.
    
    Add support to track the value of the guest CR4 register using the control
    register write trap so that the hypervisor understands the guest operating
    mode.
    Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
    Message-Id: <c3880bf2db8693aa26f648528fbc6e967ab46e25.1607620209.git.thomas.lendacky@amd.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    5b51cb13
svm.c 118 KB