Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754270AbbGCCZI (ORCPT ); Thu, 2 Jul 2015 22:25:08 -0400 Received: from mga02.intel.com ([134.134.136.20]:21822 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754105AbbGCCY6 convert rfc822-to-8bit (ORCPT ); Thu, 2 Jul 2015 22:24:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,396,1432623600"; d="scan'208";a="599332318" From: "Wu, Feng" To: Paolo Bonzini , Eric Auger , "eric.auger@st.com" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "christoffer.dall@linaro.org" , "marc.zyngier@arm.com" , "alex.williamson@redhat.com" , "avi.kivity@gmail.com" , "mtosatti@redhat.com" , "joro@8bytes.org" , "b.reynal@virtualopensystems.com" CC: "linux-kernel@vger.kernel.org" , "patches@linaro.org" , "Wu, Feng" Subject: RE: [RFC 12/17] irq: bypass: Extend skeleton for ARM forwarding control Thread-Topic: [RFC 12/17] irq: bypass: Extend skeleton for ARM forwarding control Thread-Index: AQHQtMzMpLJ6OCktLkOStYoZvFNkX53JAvZQgAABwGA= Date: Fri, 3 Jul 2015 02:24:04 +0000 Message-ID: References: <1435843047-6327-1-git-send-email-eric.auger@linaro.org> <1435843047-6327-13-git-send-email-eric.auger@linaro.org> <55953F5F.9090203@redhat.com> In-Reply-To: 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="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2908 Lines: 74 > -----Original Message----- > From: Wu, Feng > Sent: Friday, July 03, 2015 10:20 AM > To: Paolo Bonzini; Eric Auger; eric.auger@st.com; > linux-arm-kernel@lists.infradead.org; kvmarm@lists.cs.columbia.edu; > kvm@vger.kernel.org; christoffer.dall@linaro.org; marc.zyngier@arm.com; > alex.williamson@redhat.com; avi.kivity@gmail.com; mtosatti@redhat.com; > joro@8bytes.org; b.reynal@virtualopensystems.com > Cc: linux-kernel@vger.kernel.org; patches@linaro.org; Wu, Feng > Subject: RE: [RFC 12/17] irq: bypass: Extend skeleton for ARM forwarding > control > > > > > -----Original Message----- > > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > > Sent: Thursday, July 02, 2015 9:41 PM > > To: Eric Auger; eric.auger@st.com; linux-arm-kernel@lists.infradead.org; > > kvmarm@lists.cs.columbia.edu; kvm@vger.kernel.org; > > christoffer.dall@linaro.org; marc.zyngier@arm.com; > > alex.williamson@redhat.com; avi.kivity@gmail.com; mtosatti@redhat.com; > > Wu, Feng; joro@8bytes.org; b.reynal@virtualopensystems.com > > Cc: linux-kernel@vger.kernel.org; patches@linaro.org > > Subject: Re: [RFC 12/17] irq: bypass: Extend skeleton for ARM forwarding > > control > > > > > > > > On 02/07/2015 15:17, Eric Auger wrote: > > > - new fields are added on producer side: linux irq, vfio_device handle, > > > active which reflects whether the source is active (at interrupt > > > controller level or at VFIO level - automasked -) and finally an > > > opaque pointer which will be used to point to the vfio_platform_device > > > in this series. > > > > Linux IRQ and active should be okay. As to the vfio_device handle, you > > should link it from the vfio_platform_device instead. And for the > > vfio_platform_device, you can link it from the vfio_platform_irq instead. > > > > Once you've done this, embed the irq_bypass_producer struct in the > > vfio_platform_irq struct; in the new kvm_arch_* functions, go back to > > the vfio_platform_irq struct via container_of. From there you can > > retrieve pointers to the vfio_platform_device and the vfio_device. > > > > > - new fields on consumer side: the kvm handle, the gsi > > > > You do not need to add these. Instead, add the kvm handle to irqfd > > only. Like above, embed the irq_bypass_consumer struct in the irqfd > > struct; in the new kvm_arch_* functions, go back to the > > vfio_platform_irq struct via container_of. > > > > I also need the gsi field here, for posted-interrupts, I need 'gsi', 'irq' to > update the IRTE. Oh... we can get gsi from irq_bypass_consumer -> _irqfd -> gsi, so it is not needed in irq_bypass_consumer. Got it! :) Thanks, Feng > > Thanks, > Feng > > > > Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/