From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liran Alon Subject: Re: [PATCH v3 01/11] KVM: x86: Optimization: Create SVM stubs for sync_pir_to_irr() Date: Wed, 27 Dec 2017 12:01:24 +0200 Message-ID: <5A436F74.9040506@ORACLE.COM> References: <1514131983-24305-1-git-send-email-liran.alon@oracle.com> <1514131983-24305-2-git-send-email-liran.alon@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jmattson@google.com, wanpeng.li@hotmail.com, idan.brown@ORACLE.COM, Liam Merwick To: Paolo Bonzini , rkrcmar@redhat.com, kvm@vger.kernel.org Return-path: Received: from aserp2130.oracle.com ([141.146.126.79]:40415 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbdL0KBe (ORCPT ); Wed, 27 Dec 2017 05:01:34 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 27/12/17 11:56, Paolo Bonzini wrote: > On 24/12/2017 17:12, Liran Alon wrote: >> - if (kvm_x86_ops->sync_pir_to_irr && apic->vcpu->arch.apicv_active) >> + if (apic->vcpu->arch.apicv_active) >> highest_irr = kvm_x86_ops->sync_pir_to_irr(apic->vcpu); >> else >> highest_irr = apic_find_highest_irr(apic); >> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c >> index eb714f1cdf7e..99c42deb742b 100644 >> --- a/arch/x86/kvm/svm.c >> +++ b/arch/x86/kvm/svm.c >> @@ -4449,6 +4449,11 @@ static void svm_hwapic_isr_update(struct kvm_vcpu *vcpu, int max_isr) >> { >> } >> >> +static int svm_sync_pir_to_irr(struct kvm_vcpu *vcpu) >> +{ >> + return -1; >> +} > > Shouldn't this be > > return kvm_lapic_find_highest_irr(vcpu); > > ? > > Paolo > Yes you are correct. My bad. This would break apic_has_interrupt_for_ppr() in case apicv_active in case of AMD SVM. If there is more comments justifying a v4 series, I would fix it in that series. Otherwise, could you just change this commit when applying? Thanks, -Liran