From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] Re: pci_default_config_write() clean up.
Date: Thu, 7 May 2009 13:25:38 +0300 [thread overview]
Message-ID: <20090507102538.GF32039@redhat.com> (raw)
In-Reply-To: <20090507095540.GC25512%yamahata@valinux.co.jp>
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
next prev parent reply other threads:[~2009-05-07 10:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 8:40 [Qemu-devel] pci_default_config_write() clean up Isaku Yamahata
2009-05-07 8:50 ` [Qemu-devel] " Michael S. Tsirkin
2009-05-07 9:06 ` Isaku Yamahata
2009-05-07 9:34 ` Michael S. Tsirkin
2009-05-07 9:29 ` Michael S. Tsirkin
2009-05-07 9:55 ` Isaku Yamahata
2009-05-07 10:25 ` Michael S. Tsirkin [this message]
2009-05-07 11:13 ` Isaku Yamahata
2009-05-07 11:46 ` Michael S. Tsirkin
2009-05-07 11:57 ` Paul Brook
-- strict thread matches above, loose matches on Subject: below --
2009-05-08 3:43 [Qemu-devel] " Isaku Yamahata
2009-05-08 14:21 ` [Qemu-devel] " Michael S. Tsirkin
2009-05-10 8:38 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090507102538.GF32039@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).