From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M22Dx-0005Z1-7M for qemu-devel@nongnu.org; Thu, 07 May 2009 07:57:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M22Ds-0005OZ-Cp for qemu-devel@nongnu.org; Thu, 07 May 2009 07:57:12 -0400 Received: from [199.232.76.173] (port=34779 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M22Ds-0005OF-7M for qemu-devel@nongnu.org; Thu, 07 May 2009 07:57:08 -0400 Received: from mx20.gnu.org ([199.232.41.8]:3636) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M22Dr-0001rx-5W for qemu-devel@nongnu.org; Thu, 07 May 2009 07:57:07 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M22Dq-0002Kd-3Y for qemu-devel@nongnu.org; Thu, 07 May 2009 07:57:06 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: pci_default_config_write() clean up. Date: Thu, 7 May 2009 12:57:03 +0100 References: <20090507084019.GA25512%yamahata@valinux.co.jp> <20090507111351.GD25512%yamahata@valinux.co.jp> <20090507114609.GH32039@redhat.com> In-Reply-To: <20090507114609.GH32039@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905071257.04059.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Isaku Yamahata , mtosatti@redhat.com, armbru@redhat.com, "Michael S. Tsirkin" On Thursday 07 May 2009, Michael S. Tsirkin wrote: > On Thu, May 07, 2009 at 08:13:51PM +0900, Isaku Yamahata wrote: > > On Thu, May 07, 2009 at 01:25:38PM +0300, Michael S. Tsirkin wrote: > > > > How about callback? > > > > > > Yes, I think callbacks have the potential to simplify code. > > > Would you like to add them on top of my patch then? > > > > Okay. > > > > > - There's some tricky code there to trigger callbacks only once > > > on a multibyte transaction. It would be simpler just to have > > > per-dword callbacks. These could get the mask of the written-to bytes > > > and do if (written_mask & interesting_mask) > > > stuff > > > > Are you assuming that word/dword io port access is word/dword aligned? > > I think this does not have to be the case in I/O generally. You can assume all accesses are naturally aligned. The softmmu code will split unaligned accesses before devices see them. Paul