From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753346AbcHJSQ0 (ORCPT ); Wed, 10 Aug 2016 14:16:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957AbcHJSQX (ORCPT ); Wed, 10 Aug 2016 14:16:23 -0400 Subject: Re: [PATCH v12 02/11] genirq/msi: msi_compose wrapper To: Thomas Gleixner References: <1470158617-7022-1-git-send-email-eric.auger@redhat.com> <1470158617-7022-3-git-send-email-eric.auger@redhat.com> Cc: eric.auger.pro@gmail.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, robin.murphy@arm.com, alex.williamson@redhat.com, will.deacon@arm.com, joro@8bytes.org, jason@lakedaemon.net, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, drjones@redhat.com, linux-kernel@vger.kernel.org, Bharat.Bhushan@freescale.com, pranav.sawargaonkar@gmail.com, p.fedin@samsung.com, iommu@lists.linux-foundation.org, Jean-Philippe.Brucker@arm.com, yehuday@marvell.com, Manish.Jaggi@caviumnetworks.com, robert.richter@caviumnetworks.com, dennis.chen@arm.com From: Auger Eric Message-ID: Date: Wed, 10 Aug 2016 10:48:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 Aug 2016 08:48:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 09/08/2016 11:19, Thomas Gleixner wrote: > On Tue, 2 Aug 2016, Eric Auger wrote: > >> Currently the MSI message is composed by directly calling >> irq_chip_compose_msi_msg and erased by setting the memory to zero. >> >> On some platforms, we will need to complexify this composition to >> properly handle MSI emission through IOMMU. Also we will need to track >> when the MSI message is erased. > > I just can't find how you do that. After applying the series the > >> + if (erase) >> + memset(msg, 0, sizeof(*msg)); > > branch is still just a memset(). The wrapper is fine for the compose side, but > having the extra argument just to wrap the memset() for no gain is silly. Yes you're right: this was true in the first releases of the series where the iommu mapping/unmapping were done at composition & erase time. Now the mapping/unmapping is done on msi_domain_alloc/free_irqs, this is not mandated anymore. I will keep the wrapper for the compose side and remove the rest + update the commit message accordingly. Thank you for your time. Eric > > Thanks, > > tglx > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >