Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933078AbbHZAgU (ORCPT ); Tue, 25 Aug 2015 20:36:20 -0400 Received: from mga14.intel.com ([192.55.52.115]:37097 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755882AbbHZAgS (ORCPT ); Tue, 25 Aug 2015 20:36:18 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,412,1437462000"; d="scan'208";a="775666943" From: "Wu, Feng" To: Alex Williamson CC: "pbonzini@redhat.com" , "joro@8bytes.org" , "mtosatti@redhat.com" , "eric.auger@linaro.org" , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Wu, Feng" Subject: RE: [PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts Thread-Topic: [PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts Thread-Index: AQHQ33BRYx6znbX17Uq3iQ9HzxsmPZ4db1MQ Date: Wed, 26 Aug 2015 00:36:13 +0000 Message-ID: References: <1440492620-15934-1-git-send-email-feng.wu@intel.com> <1440492620-15934-11-git-send-email-feng.wu@intel.com> <1440532664.20355.9.camel@redhat.com> In-Reply-To: <1440532664.20355.9.camel@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7Q0aPMv021980 Content-Length: 1628 Lines: 50 > -----Original Message----- > From: Alex Williamson [mailto:alex.williamson@redhat.com] > Sent: Wednesday, August 26, 2015 3:58 AM > To: Wu, Feng > Cc: pbonzini@redhat.com; joro@8bytes.org; mtosatti@redhat.com; > eric.auger@linaro.org; kvm@vger.kernel.org; > iommu@lists.linux-foundation.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH v7 10/17] KVM: x86: Update IRTE for posted-interrupts > > On Tue, 2015-08-25 at 16:50 +0800, Feng Wu wrote: > > This patch adds the routine to update IRTE for posted-interrupts > > when guest changes the interrupt configuration. > > > > Signed-off-by: Feng Wu > > --- > > arch/x86/kvm/x86.c | 73 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 73 insertions(+) > > + kvm_set_msi_irq(e, &irq); > > + if (!kvm_intr_is_single_vcpu(kvm, &irq, &vcpu)) > > + continue; > > + > > + vcpu_info.pi_desc_addr = kvm_x86_ops->get_pi_desc_addr(vcpu); > > + vcpu_info.vector = irq.vector; > > + > > + if (set) > > + ret = irq_set_vcpu_affinity(host_irq, &vcpu_info); > > + else { > > + /* suppress notification event before unposting */ > > + kvm_x86_ops->pi_set_sn(vcpu); > > + ret = irq_set_vcpu_affinity(host_irq, NULL); > > + kvm_x86_ops->pi_clear_sn(vcpu); > > + } > > Can we add trace events so that we have a way to tell when PI is being > enabled/disabled other than performance heuristics? Thanks, Sure, I will add it. Thanks, Feng > > Alex > > > ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?