From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvVUR-0002uR-Rt for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:19:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvVUN-0002sJ-RX for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:19:31 -0400 Received: from [199.232.76.173] (port=39486 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvVUN-0002sC-Lo for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:19:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9787) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvVUN-0001Gl-5P for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:19:27 -0400 Date: Wed, 7 Oct 2009 14:17:21 +0200 From: "Michael S. Tsirkin" Message-ID: <20091007121721.GA31484@redhat.com> References: <1254737223-16129-1-git-send-email-yamahata@valinux.co.jp> <1254737223-16129-17-git-send-email-yamahata@valinux.co.jp> <20091005114120.GA30477@redhat.com> <20091006100259.GE32367%yamahata@valinux.co.jp> <20091006105701.GC8916@redhat.com> <20091006132138.GA9681@redhat.com> <20091007022546.GF32367%yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091007022546.GF32367%yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 16/23] pci: pcie host and mmcfg support. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On Wed, Oct 07, 2009 at 11:25:46AM +0900, Isaku Yamahata wrote: > The above code doesn't work. > Some bits in configuration space must be virtualized, it means that > virtualized value must be stored in memory. > Limiting 256 bytes would just make unnecessary complication. > We have to add many hooks like if (offset > 256) call_express_code() > and the express code would be almost same as pci one. > We've already had direct attached code. The difference for pci express > direct attach from pci direct attach is just that the code receives offset > in configuration space which might be greater than 255. Okay. What I mainly disliked is the complex update routines. But I found a way to get rid of them without limiting ourselves to 256 bytes size: in fact, we only need to save the first 64 bytes for default config callback, whatever the full config space size is. Since this is a single cache line, it won't get any more efficient, and we can use simple memcmp to check for bar changes etc. Patch soon, please review and let me know. -- MST