qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: pci_default_config_write() clean up.


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] Re: pci_default_config_write() clean up.
Date: Thu, 7 May 2009 13:25:38 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, May 07, 2009 at 06:55:40PM +0900, Isaku Yamahata wrote:
> On Thu, May 07, 2009 at 12:29:08PM +0300, Michael S. Tsirkin wrote:
> > In my opinion, the approach of a mask-filling function is cleaner,
> > maintaining the tables manually at you do will be more fragile.  For
> > example:
> 
> Hmm, to be honest, I don't have strong opinion for
> static table v.s. dynamic initialization here.
> Okay, you prefer dynamic initialization.
> 
> 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?

Here are some random thoughts on that part of your patch:
- To make e.g. clear on write implementable, callback must get the
  value written
- 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


-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]