From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvKyn-0002xi-Kg for qemu-devel@nongnu.org; Sun, 21 Aug 2011 23:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvKym-0000Si-Kh for qemu-devel@nongnu.org; Sun, 21 Aug 2011 23:15:13 -0400 Received: from [222.73.24.84] (port=64703 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvKym-0000OD-0w for qemu-devel@nongnu.org; Sun, 21 Aug 2011 23:15:12 -0400 Message-ID: <4E51C945.6070103@cn.fujitsu.com> Date: Mon, 22 Aug 2011 11:13:09 +0800 From: Wen Congyang MIME-Version: 1.0 References: <20110704094358.GA10960@redhat.com> <4E4B7DE1.3050405@cn.fujitsu.com> <4E4C8577.5000608@cn.fujitsu.com> <4E4D2C9F.6040805@redhat.com> <4E4DF0A0.6000108@cn.fujitsu.com> <4E4E808C.4000205@redhat.com> In-Reply-To: <4E4E808C.4000205@redhat.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH] pci: add standard bridge device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Kevin Wolf , Isaku Yamahata , qemu-devel@nongnu.org, "Michael S. Tsirkin" At 08/19/2011 11:26 PM, Avi Kivity Write: > On 08/18/2011 10:12 PM, Wen Congyang wrote: >> >> >> >> The following patch can fix this problem, but I'm not sure whether it >> >> is right. >> > >> > It's correct but insufficient, the filtering code (pci_bridge_filter) >> > needs to be updated to use the memory API. >> >> I read the function pci_bridge_filter(), and the function only read >> PCI bridge's config space(command, base and limit). If base> limit, >> it will set addr to PCI_BAR_UNMAPPED. >> >> I do not find anything that needs to updated to use the memory API. > > Currently it doesn't do any filtering at all. Bridges need to create a > new address space, then attach aliases of this region (corresponding to > the filtered area and to the legacy vga space) to the parent bus' > address space. Hmm, does this problem exist before memory API is introduced? > >> I add a scsi controller on pci bus1, and a scsi disk on this controller. >> I can read and write this disk, and I do not meet any problem. >> > > However, filtering doesn't work. You could put a BAR outside the > filtered area and it would be visible to the guest. How to put a BAR outside the filtered area and confirm whether it would be virible to the guest?