[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yw95XR59VQSbVlY9@google.com>
Date: Wed, 31 Aug 2022 15:08:13 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Maxim Levitsky <mlevitsk@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
Li RongQing <lirongqing@...du.com>
Subject: Re: [PATCH 11/19] KVM: SVM: Add helper to perform final AVIC "kick"
of single vCPU
On Wed, Aug 31, 2022, Maxim Levitsky wrote:
> On Wed, 2022-08-31 at 00:34 +0000, Sean Christopherson wrote:
> > @@ -455,13 +461,8 @@ static void avic_kick_target_vcpus(struct kvm *kvm, struct kvm_lapic *source,
> > */
> > kvm_for_each_vcpu(i, vcpu, kvm) {
> > if (kvm_apic_match_dest(vcpu, source, icrl & APIC_SHORT_MASK,
> > - dest, icrl & APIC_DEST_MASK)) {
> > - vcpu->arch.apic->irr_pending = true;
> > - svm_complete_interrupt_delivery(vcpu,
> > - icrl & APIC_MODE_MASK,
> > - icrl & APIC_INT_LEVELTRIG,
> > - icrl & APIC_VECTOR_MASK);
> > - }
> > + dest, icrl & APIC_DEST_MASK))
> > + avic_kick_vcpu(vcpu, icrl);
> > }
> > }
> >
>
> I don't know what I think about this, sometimes *minor* code duplication
> might actually be a good thing, as it is easier to read the code, but I don't
> have much against this as well.
>
> I am not sure if before or after this code is more readable.
I don't have a strong opinion either. I think I prefer having the helper, but
have no objection to leaving things as is. Originally I was thinking there was
going to be a third call site, but that didn't happen.
Powered by blists - more mailing lists