From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUYoS-0002eM-M3 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 08:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUYoM-0006gD-Ku for qemu-devel@nongnu.org; Tue, 02 Aug 2016 08:28:47 -0400 Received: from david.siemens.de ([192.35.17.14]:58337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUYoM-0006fv-A8 for qemu-devel@nongnu.org; Tue, 02 Aug 2016 08:28:42 -0400 References: <1469123413-20809-1-git-send-email-mst@redhat.com> <1469123413-20809-30-git-send-email-mst@redhat.com> <98a5a157-ba83-bc61-df7e-546c21e23ad3@siemens.com> <20160802083648.GJ6207@pxdev.xzpeter.org> <4fcaa50f-6c09-f607-1c49-8494ec32f0c5@siemens.com> <20160802102838.GK6207@pxdev.xzpeter.org> <20160802121202.GL6207@pxdev.xzpeter.org> From: Jan Kiszka Message-ID: <5490cf5a-dda0-0aae-697a-6f64351fa291@siemens.com> Date: Tue, 2 Aug 2016 14:28:34 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Kiarie , Peter Xu Cc: QEMU Developers , "Michael S. Tsirkin" , Peter Maydell , Richard Henderson , Eduardo Habkost , Paolo Bonzini , Valentine Sinitsyn On 2016-08-02 14:17, David Kiarie wrote: > > > On Tue, Aug 2, 2016 at 3:12 PM, Peter Xu > wrote: > > On Tue, Aug 02, 2016 at 02:58:55PM +0300, David Kiarie wrote: > > > Sure. David, so do you like to do it or I cook this patch? :) > > > > If there are no objections I will look at this employing Jan's approach: > > associating a write with an address space. > > Do you mean to translate current stl_le_phys() into something like > address_space_stl_le(), with MemTxAttrs? (in ioapic_service()) > > > I tried doing something like that but the write gets discarded > somewhere. I don't see the write from IOMMU side. > > > Also, IIUC we also need to tweak a little bit more for split irqchip > case in kvm_arch_fixup_msi_route(). Actually for this one, I think > maybe we can assume the requester ID be IOAPIC's when dev == NULL, > since HPET should not be using kernel irqchip, right? > > > I meant do have something like what is here > http://git.kiszka.org/?p=qemu.git;a=commitdiff;h=4f27331e7769a571c7d7fb61cf75e1b2fe908f85 > This didn't take irq routes into account that start with in-kernel devices. Peter is right, there is more than just patching the MSI write handlers in the IOMMUs. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux