lkml.org 
[lkml]   [2022]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 7/7] KVM: SVM: Enable VNMI feature
    Date
    Enable the NMI virtualization (V_NMI_ENABLE) in the VMCB interrupt
    control when the vnmi module parameter is set.

    Signed-off-by: Santosh Shukla <santosh.shukla@amd.com>
    ---
    arch/x86/kvm/svm/svm.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
    index d81ad913542d..536aa392252b 100644
    --- a/arch/x86/kvm/svm/svm.c
    +++ b/arch/x86/kvm/svm/svm.c
    @@ -1208,6 +1208,9 @@ static void init_vmcb(struct kvm_vcpu *vcpu)
    if (kvm_vcpu_apicv_active(vcpu))
    avic_init_vmcb(svm, vmcb);

    + if (vnmi)
    + svm->vmcb->control.int_ctl |= V_NMI_ENABLE;
    +
    if (vgif) {
    svm_clr_intercept(svm, INTERCEPT_STGI);
    svm_clr_intercept(svm, INTERCEPT_CLGI);
    --
    2.25.1
    \
     
     \ /
      Last update: 2022-07-09 15:46    [W:4.370 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site