From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URda7-0006Nt-OD for qemu-devel@nongnu.org; Mon, 15 Apr 2013 03:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URda6-0005lK-5Y for qemu-devel@nongnu.org; Mon, 15 Apr 2013 03:12:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URda5-0005kZ-Ta for qemu-devel@nongnu.org; Mon, 15 Apr 2013 03:12:02 -0400 Message-ID: <516BA83A.6070700@redhat.com> Date: Mon, 15 Apr 2013 09:11:54 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/5] register: Add Register API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: blauwirbel@gmail.com, Peter Maydell , mst@redhat.com, qemu-devel@nongnu.org, edgar.iglesias@gmail.com Hi, > - Add a "lite" flag that is (automatically) computed once that takes a > fast path through the read/write handlers. A reg is lite if it > requires no read-modify-write (no ro, nw, ge, ui, wtc). Only the > actual write and post_write handlers are executed. Sounds good to me. > - Remove the byte loops. Just switch on register size and cast to > uint_XXt. Remove support for non power-of-two size registers and > non-host endianess (needed for potential PCI conversion) but should > make the code faster. This too. Also: you might want to pass both old and new value to the post-write hook so the handler can easily figure what has actually changed. cheers, Gerd