> -----Original Message----- > From: Jim Mattson <jmattson@xxxxxxxxxx> > Sent: Wednesday, July 29, 2020 4:24 PM > To: Moger, Babu <Babu.Moger@xxxxxxx> > Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>; Vitaly Kuznetsov > <vkuznets@xxxxxxxxxx>; Wanpeng Li <wanpengli@xxxxxxxxxxx>; Sean > Christopherson <sean.j.christopherson@xxxxxxxxx>; kvm list > <kvm@xxxxxxxxxxxxxxx>; Joerg Roedel <joro@xxxxxxxxxx>; the arch/x86 > maintainers <x86@xxxxxxxxxx>; LKML <linux-kernel@xxxxxxxxxxxxxxx>; Ingo > Molnar <mingo@xxxxxxxxxx>; Borislav Petkov <bp@xxxxxxxxx>; H . Peter Anvin > <hpa@xxxxxxxxx>; Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Subject: Re: [PATCH v3 06/11] KVM: SVM: Add new intercept vector in > vmcb_control_area > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger <babu.moger@xxxxxxx> wrote: > > > > The new intercept bits have been added in vmcb control area to support > > few more interceptions. Here are the some of them. > > - INTERCEPT_INVLPGB, > > - INTERCEPT_INVLPGB_ILLEGAL, > > - INTERCEPT_INVPCID, > > - INTERCEPT_MCOMMIT, > > - INTERCEPT_TLBSYNC, > > > > Add new intercept vector in vmcb_control_area to support these instructions. > > Also update kvm_nested_vmrun trace function to support the new addition. > > > > AMD documentation for these instructions is available at "AMD64 > > Architecture Programmer’s Manual Volume 2: System Programming, Pub. > > 24593 Rev. 3.34(or later)" > > > > The documentation can be obtained at the links below: > > Link: > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww. > > > amd.com%2Fsystem%2Ffiles%2FTechDocs%2F24593.pdf&data=02%7C01% > 7Cbab > > > u.moger%40amd.com%7C04dafd87052d4ed59f9808d83405b0a4%7C3dd8961fe > 4884e6 > > > 08e11a82d994e183d%7C0%7C0%7C637316547054108593&sdata=2ncYK2 > NY1J3xL > > 9ZXSdb24zq0M0ZkF0iy%2FIW7SUDoFeg%3D&reserved=0 > > Link: > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz > > > illa.kernel.org%2Fshow_bug.cgi%3Fid%3D206537&data=02%7C01%7Cbab > u.m > > > oger%40amd.com%7C04dafd87052d4ed59f9808d83405b0a4%7C3dd8961fe488 > 4e608e > > > 11a82d994e183d%7C0%7C0%7C637316547054108593&sdata=Trw3tJE1Z6 > dOTXi0 > > DbPhOUAh4Ulr7HxxoJNpM2IjbvM%3D&reserved=0 > > > > Signed-off-by: Babu Moger <babu.moger@xxxxxxx> > > --- > > > @@ -16,6 +16,7 @@ enum vector_offset { > > EXCEPTION_VECTOR, > > INTERCEPT_VECTOR_3, > > INTERCEPT_VECTOR_4, > > + INTERCEPT_VECTOR_5, > > MAX_VECTORS, > > }; > > Is this enumeration actually adding any value? Yea. It is not much of a value add. It helps readability a little bit. That’s why I kept that way. Thanks > vmcb->control.intercepts[INTERCEPT_VECTOR_5] doesn't seem in any way > "better" than just vmcb->control.intercepts[5]. > > Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>