From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmHhL-0007uJ-89 for qemu-devel@nongnu.org; Wed, 14 Oct 2015 04:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmHhI-0006Wl-12 for qemu-devel@nongnu.org; Wed, 14 Oct 2015 04:46:11 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:43420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmHhH-0006WL-Qq for qemu-devel@nongnu.org; Wed, 14 Oct 2015 04:46:07 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NW700EJLCCR7I60@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 14 Oct 2015 09:46:03 +0100 (BST) From: Pavel Fedin References: <20151014112515-mutt-send-email-mst@redhat.com> In-reply-to: <20151014112515-mutt-send-email-mst@redhat.com> Date: Wed, 14 Oct 2015 11:46:02 +0300 Message-id: <00d201d1065c$c1f1eb30$45d5c190$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Content-language: ru Subject: Re: [Qemu-devel] [PATCH v2 0/3] Make KVM/MSI code device-ID-aware List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "'Michael S. Tsirkin'" Cc: 'Peter Maydell' , qemu-devel@nongnu.org, 'Paolo Bonzini' Hello! > I'm confused by pci changes. It's all arm specific stuff leaking > out to pci core. But... How else would you implement it? I tried to do this as abstract as possible. Just pass device pointer to functions which will use it. Or, would you like to override all these functions for ARM architecture? That would be a huge code duplication. And, still, they would need PCI device specifier, which they don't have, and what patch 0003 takes care about. > Maybe it was a mistake to put stream id in struct MemTxAttrs: there's > still nothing using it. It will be used by ITS emulation too. Take a look at RFC, ITS code injects it into the kernel together with MSI data. Also, i know that it has something to do with SMMU too, so, if we ever implement ARM SMMU, we'll likely have to deal with them too. Presence of device ID pretty well emulates what the hardware does - it just sends this ID along with PCI transaction. We will use it as soon as we either: a) Get kernel API approved b) Get software GICv3 emulation from Shlomo, then i'll be able to rebase my old software-emulated ITS on top of that. > How about we stick PCIDevice * (or even DeviceState *) there? "there" = where? In MemTxAttrs? Would it be good to have 64-bit pointer instead of 16-bit ID there? It is passed by value, and current version fits into register even on 32-bit host. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia