Messages in this thread | | | Date | Tue, 22 Feb 2022 12:39:29 +0700 | Subject | Re: [RFC PATCH 11/13] KVM: SVM: Add logic to switch between APIC and x2APIC virtualization mode | From | "Suthikulpanit, Suravee" <> |
| |
On 2/21/2022 9:19 AM, Suravee Suthikulpanit wrote: > .... > diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c > index 3543b7a4514a..3306b74f1d8b 100644 > --- a/arch/x86/kvm/svm/avic.c > +++ b/arch/x86/kvm/svm/avic.c > @@ -79,6 +79,50 @@ static inline enum avic_modes avic_get_vcpu_apic_mode(struct vcpu_svm *svm) > .. > +void avic_activate_vmcb(struct vcpu_svm *svm)
This should be static void.
> +{ > + struct vmcb *vmcb = svm->vmcb01.ptr; > + > + vmcb->control.int_ctl |= AVIC_ENABLE_MASK; > + > + if (svm->x2apic_enabled) { > + vmcb->control.int_ctl |= X2APIC_MODE_MASK; > + vmcb->control.avic_physical_id &= ~X2AVIC_MAX_PHYSICAL_ID; > + vmcb->control.avic_physical_id |= X2AVIC_MAX_PHYSICAL_ID; > + /* Disabling MSR intercept for x2APIC registers */ > + avic_set_x2apic_msr_interception(svm, false); > + } else { > + vmcb->control.avic_physical_id &= ~AVIC_MAX_PHYSICAL_ID; > + vmcb->control.avic_physical_id |= AVIC_MAX_PHYSICAL_ID; > + /* Enabling MSR intercept for x2APIC registers */ > + avic_set_x2apic_msr_interception(svm, true); > + } > +} > + > +void avic_deactivate_vmcb(struct vcpu_svm *svm)
This should be static void.
Reported-by: kernel test robot <lkp@intel.com>
Regards, Suravee
| |