All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Marcel Apfelbaum <marcel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()
Date: Mon, 29 May 2017 11:42:35 +0200	[thread overview]
Message-ID: <87k2506ltg.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170529060813.GF22816@pxdev.xzpeter.org> (Peter Xu's message of "Mon, 29 May 2017 14:08:13 +0800")

Peter Xu <peterx@redhat.com> writes:

> On Mon, May 15, 2017 at 09:14:33PM +0800, Peter Xu wrote:
>> MSI should be supported by all interrupt controllers. Switching the old
>> check for msi_nonbroken into assertion. Do similar thing to
>> pci_add_capability2() below that. Then time to remove *errp.
>> 
>> Since msi_init() won't fail now, touch up all the callers to avoid
>> checks against it. One side effect is that we fixed a possible leak in
>> current edu device.
>> 
>> Reported-by: Markus Armbruster <armbru@redhat.com>
>> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Peter Xu <peterx@redhat.com>
>> ---
>>  hw/audio/intel-hda.c               | 18 +-----------------
>>  hw/i386/amd_iommu.c                |  2 +-
>>  hw/ide/ich.c                       |  6 +-----
>>  hw/misc/edu.c                      |  4 +---
>>  hw/net/e1000e.c                    |  6 +-----
>>  hw/net/trace-events                |  1 -
>>  hw/net/vmxnet3.c                   |  8 ++------
>>  hw/pci-bridge/ioh3420.c            | 17 ++++-------------
>>  hw/pci-bridge/pci_bridge_dev.c     | 19 +------------------
>>  hw/pci-bridge/xio3130_downstream.c | 11 +++--------
>>  hw/pci-bridge/xio3130_upstream.c   | 11 +++--------
>>  hw/pci/msi.c                       | 25 ++++++-------------------
>>  hw/scsi/megasas.c                  | 18 +-----------------
>>  hw/scsi/mptsas.c                   | 20 ++------------------
>>  hw/scsi/trace-events               |  1 -
>>  hw/scsi/vmw_pvscsi.c               | 12 +++---------
>>  hw/usb/hcd-xhci.c                  | 16 +---------------
>>  hw/vfio/pci.c                      | 13 ++-----------
>>  include/hw/pci/msi.h               |  6 +++---
>>  19 files changed, 36 insertions(+), 178 deletions(-)
>
> Ping?
>
> Just to mention in case missed - this is also a bug fix for edu
> device.
>
> Also CC Markus since he's the reporter and I forgot to CC him in
> previous post. Sorry.

The patch indeed fixes the leak in the edu device.  It might fix similar
cleanup errors in other devices; I didn't check.

The interesting part is of course having devices assert the interrrupt
controller isn't broken.  The commit message claims "MSI should be
supported by all interrupt controllers".  Does that mean "you think it
is supported", or does it mean "it really should be supported"?

If the former, shouldn't we drop @msi_nonbroken entirely?

If the latter, why is it okay to assert?

The Suggested-by makes me suspect this has been explained elsewhere
already; feel free to send me just a pointer.

  reply	other threads:[~2017-05-29  9:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 13:14 [Qemu-devel] [PATCH] msi: remove return code for msi_init() Peter Xu
2017-05-29  6:08 ` Peter Xu
2017-05-29  9:42   ` Markus Armbruster [this message]
2017-05-29 10:13     ` Peter Xu
2017-05-29 12:16       ` Markus Armbruster
2017-05-30  9:16         ` Paolo Bonzini
2017-05-30 14:28           ` Markus Armbruster
2017-05-30 14:29             ` Paolo Bonzini
2017-05-31  7:03               ` Peter Xu
2017-05-31  7:40                 ` Paolo Bonzini
2017-05-31  8:26                   ` Peter Xu
2017-05-31  8:28                     ` Paolo Bonzini
2017-05-31  8:55                       ` Peter Xu
2017-06-01  8:27                       ` Marcel Apfelbaum
2017-06-01 14:23                         ` Paolo Bonzini
2017-06-01 19:22                           ` Aurelien Jarno
2017-06-01 22:06                             ` Paul Burton
2017-06-02  4:18                               ` Peter Xu
2017-06-02  7:47                                 ` Markus Armbruster

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=87k2506ltg.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.