All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: yamahata@valinux.co.jp, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/3] msi: Store the capability size in PCIDevice
Date: Tue, 02 Nov 2010 08:00:38 -0600	[thread overview]
Message-ID: <1288706438.3045.7.camel@x201> (raw)
In-Reply-To: <20101102092508.GA3390@redhat.com>

On Tue, 2010-11-02 at 11:25 +0200, Michael S. Tsirkin wrote:
> On Mon, Nov 01, 2010 at 11:37:53PM -0600, Alex Williamson wrote:
> > Avoid needing to get the MSI capability flags every time we need to
> > check the capability length.  This also makes it accessible outside
> > of msi.c, making it easier for users to filter config space writes
> > using msi_cap and msi_cap_size.
> 
> I think for this last use-case, we are better off with returning a
> boolean from msi_write_config which tells us whether the write is in
> range. This has the advantage in that it will also work well for other
> capabilities. Or second best, if that is insufficient for some reason,
> export an msi_cap_size function.

Returning whether the write was in range isn't enough.  For device
assignment, I need to know whether the capability was enabled or
disabled.  This currently means checking the enable state before and
after calling msi_write_config and doing the appropriate backend setup.
I think the only way I could blindly call the msi/x write config
routines is if we init the capability with enable/disable callbacks.
I'd be ok with an msi_cap_size function if we don't want to go that far
too.  What do you prefer?  Thanks,

Alex

  reply	other threads:[~2010-11-02 14:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02  5:37 [Qemu-devel] [PATCH 0/3] msi: Small fixes and enhancements Alex Williamson
2010-11-02  5:37 ` [Qemu-devel] [PATCH 1/3] msi: Allow pre-existing MSI capabilities Alex Williamson
2010-11-02 12:02   ` [Qemu-devel] " Michael S. Tsirkin
2010-11-02  5:37 ` [Qemu-devel] [PATCH 2/3] msi: Cleanup uninit Alex Williamson
2010-11-02  5:37 ` [Qemu-devel] [PATCH 3/3] msi: Store the capability size in PCIDevice Alex Williamson
2010-11-02  9:25   ` [Qemu-devel] " Michael S. Tsirkin
2010-11-02 14:00     ` Alex Williamson [this message]
2010-11-02 14:07       ` Michael S. Tsirkin
2010-11-02 14:23         ` Alex Williamson
2010-11-02 15:39           ` Michael S. Tsirkin
2010-11-02 16:08             ` Alex Williamson
2010-11-02 19:26               ` 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=1288706438.3045.7.camel@x201 \
    --to=alex.williamson@redhat.com \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.