From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4qkH-0007Du-Mx for qemu-devel@nongnu.org; Mon, 23 May 2016 10:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4qkA-0000qs-Rc for qemu-devel@nongnu.org; Mon, 23 May 2016 10:22:12 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4qkA-0000qi-LH for qemu-devel@nongnu.org; Mon, 23 May 2016 10:22:06 -0400 Received: by mail-wm0-x243.google.com with SMTP id 67so15615883wmg.0 for ; Mon, 23 May 2016 07:22:06 -0700 (PDT) Reply-To: marcel@redhat.com References: <1464012090-6477-1-git-send-email-marcel@redhat.com> <1464012090-6477-2-git-send-email-marcel@redhat.com> <7f013bce-0831-df33-77b2-7d37a2e920fe@redhat.com> From: Marcel Apfelbaum Message-ID: <5743120A.703@gmail.com> Date: Mon, 23 May 2016 17:22:02 +0300 MIME-Version: 1.0 In-Reply-To: <7f013bce-0831-df33-77b2-7d37a2e920fe@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 1/2] hw/pci: delay bus_master_enable_region initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Marcel Apfelbaum , qemu-devel@nongnu.org Cc: davidkiarie4@gmail.com, bd.aviv@gmail.com, ehabkost@redhat.com, peterx@redhat.com, mst@redhat.com On 05/23/2016 05:08 PM, Paolo Bonzini wrote: > > > On 23/05/2016 16:01, Marcel Apfelbaum wrote: >> Skip bus_master_enable region creation on PCI devices init >> in order to be sure the IOMMU device (if present) would >> be created in advance. Add this memory region at machine_done time. >> >> Signed-off-by: Marcel Apfelbaum >> --- >> hw/i386/pc.c | 17 +++++++++++++++++ >> hw/pci/pci.c | 22 ++++++++++++---------- >> include/hw/pci/pci.h | 2 ++ >> 3 files changed, 31 insertions(+), 10 deletions(-) > > Does hotplug still work? Hotplug does work, but the device can't be bus_master since I am adding the bus_master_region only at machine_done... Thank you for pointing that out, this can be easily solved by checking the qdev_hotplug flag and enabling the bus_master region if we passed machine creation. Other than that, does it seems to a you a feasible approach? Thanks, Marcel > > Thanks, > > Paolo >