From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAaI6-00014M-8l for qemu-devel@nongnu.org; Wed, 08 Jun 2016 06:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAaI0-0004BF-CZ for qemu-devel@nongnu.org; Wed, 08 Jun 2016 06:00:49 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:34348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAaHz-0004Ae-Vx for qemu-devel@nongnu.org; Wed, 08 Jun 2016 06:00:44 -0400 Received: by mail-wm0-x241.google.com with SMTP id n184so1634235wmn.1 for ; Wed, 08 Jun 2016 03:00:43 -0700 (PDT) From: David Kiarie Date: Wed, 8 Jun 2016 13:00:31 +0300 Message-Id: <1465380032-12807-1-git-send-email-davidkiarie4@gmail.com> Subject: [Qemu-devel] [RFC] AMD IOMMU: emulate multiple devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, ehabkost@redhat.com, marcel@redhat.com, mst@redhat.com, pbonzini@redhat.com, davidkiarie4@gmail.com, peterx@redhat.com, wexu@redhat.com, alex.williamson@redhat.com, rkrcmar@redhat.com, jan.kiszka@web.de Hello all, This patch tries to solve a problem whereby real AMD IOMMUs exhibit both PCI and Platform device properties. AMD IOMMU properties that conflict with conventional PCI devices' features include the fact that its not a BusMaster device and reserves MMIO region without a BAR register among others. There is some already ongoing work on Intel IOMMU Interrupt remapping with implements an IOMMU base class[1], as a platform device(which means the moment I inherit from this class my device loses it's PCI properties). I am therefore forced to find a way to combine both PCI and platform features(which I had previously avoided) into AMD IOMMU. X86-IOMMU(common code) | | / \ / \ Intel IOMMU AMD IOMMU This patch implements a stripped down sample of how I plan to solve this issue. It basically implements PCI device which serves to 'steal' PCI config space while the main device remains a platform device. The platform device maintains a reference to the PCI device and hence the relevant PCI config space. This device will also require [2] to work. Looking forward to your comments! [1] http://thread.gmane.org/gmane.comp.emulators.qemu/414510 [2] http://thread.gmane.org/gmane.comp.emulators.qemu/413018 David Kiarie (1): hw/i386: Composite Bus and PCI device hw/i386/compositedevice.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 hw/i386/compositedevice.c -- 2.1.4