Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LcIMN-0006Cg-46 for qemu-devel@nongnu.org; Wed, 25 Feb 2009 06:55:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LcIML-0006CD-2k for qemu-devel@nongnu.org; Wed, 25 Feb 2009 06:55:30 -0500 Received: from [199.232.76.173] (port=39339 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LcIMK-0006CA-Ss for qemu-devel@nongnu.org; Wed, 25 Feb 2009 06:55:28 -0500 Received: from pop-siberian.atl.sa.earthlink.net ([207.69.195.71]:48935) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LcIMK-00085j-Hj for qemu-devel@nongnu.org; Wed, 25 Feb 2009 06:55:28 -0500 Message-ID: <49A531AE.9080301@earthlink.net> Date: Wed, 25 Feb 2009 06:55:26 -0500 From: Robert Reif MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] 64 bit device I/O References: <49A01839.3090402@earthlink.net> <49A3ECF9.1050507@earthlink.net> <49A486D1.3000305@earthlink.net> <49A4F272.3010005@redhat.com> In-Reply-To: <49A4F272.3010005@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl Avi Kivity wrote: > Robert Reif wrote: >> Blue Swirl wrote: >>> Would it be better to use a structure with four elements with correct >>> types (including uint8/16_t) instead of the cast? This could also be >>> limited to only cpu_register_io_memory64. >>> >>> >>> >> This is what I would prefer and is what the first version of this patch >> that I submitted a year ago did: >> http://landley.net/qemu/2008-01-01.html >> >> The problem is that every hardware driver would need to be changed and >> some of them would need to be changed drastically because they use the >> same functions for all three data sizes. No one seemed interested in >> this >> approach so I abandoned it. >> >> This approach while uglier requires no changes to the hardware drivers >> unless they need 64 bit support so I hoped it would be better received. > > You might try adding a struct-based 4-function interface, and > implementing the array-based 3-function interface on top of that. > This way, no immediate changes would be needed for devices, but we > could change them incrementally from the old interface to the new > interface. > > I just tried this by changing exec.c to use a structure internally but still provide an array interface through the old interface and it's a real nice cleanup until you have to deal with subpages. Changing the subpage code over to a structure doesn't really improve it any. Why is the subpage code now saving so much redundant stuff compared to what it initially started out as. Is it because that one VGA driver is messing with the internals of QEMU?