From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSFXP-0003gP-7R for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:57:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSFXF-0003YH-1r for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:57:50 -0500 Received: from [199.232.76.173] (port=43260 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSFXE-0003Xg-JX for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:57:44 -0500 Received: from mx20.gnu.org ([199.232.41.8]:36599) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSFXE-0006DR-4f for qemu-devel@nongnu.org; Tue, 05 Jan 2010 14:57:44 -0500 Received: from gate.crashing.org ([63.228.1.57]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRtJ0-0006LG-4a for qemu-devel@nongnu.org; Mon, 04 Jan 2010 15:13:34 -0500 Subject: Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable From: Benjamin Herrenschmidt In-Reply-To: <20100104110758.GE8522@redhat.com> References: <75078DD9-314F-4FA8-896B-36C5B771C6A7@suse.de> <20100103172937.GB8508@redhat.com> <20100103174430.GA8522@redhat.com> <41679128-EE37-47DA-82F6-830A4C364183@suse.de> <20100103180609.GB8522@redhat.com> <472F306A-0699-401C-8E6A-8E79B86E4C95@suse.de> <1262551822.2173.267.camel@pasglop> <19BFDDD5-85E0-42EC-9D71-391CECC023F5@suse.de> <20100104104516.GD4672@valinux.co.jp> <20100104110758.GE8522@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 05 Jan 2010 07:10:58 +1100 Message-ID: <1262635858.2173.371.camel@pasglop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Blue Swirl , Isaku Yamahata , Alexander Graf , Aurelien Jarno , QEMU Developers On Mon, 2010-01-04 at 13:07 +0200, Michael S. Tsirkin wrote: > BTW, I think we really should think about the right way to address the > swap/noswap issue without using a preprocessor. Maybe make pci host > bridge explicitly specify whether to swap bytes? How about adding a > field in PCIHostState to make it do this? No, this is a non issue if you get your design right. Just abstract out the reference to a device in a struct like Alex is proposing and have the host bridge specific code fill that up appropriately. I don't see why there would be any need for swapping and in any case, this should go away once the host bridge code knows how to interpret the write to whatever config access registers it exposes. Ben.