From: Jan Kiszka <jan.kiszka@web.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>,
Alexander Graf <agraf@suse.de>, Gerd Hoffmann <kraxel@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 5/9] msi: Invoke msi/msix_reset from PCI core
Date: Wed, 08 Jun 2011 22:47:34 +0200 [thread overview]
Message-ID: <4DEFDFE6.6020707@web.de> (raw)
In-Reply-To: <20110608195923.GE30805@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2407 bytes --]
On 2011-06-08 21:59, Michael S. Tsirkin wrote:
> On Wed, Jun 08, 2011 at 06:21:48PM +0200, Jan Kiszka wrote:
>> There is no point in pushing this burden to the devices, they may rather
>> forget to call them (like intel-hda and ahci ATM). Instead, reset
>> functions are now called from pci_device_reset and pci_bridge_reset.
>> They do nothing if the MSI/MSI-X is not in use.
>>
>> CC: Alexander Graf <agraf@suse.de>
>> CC: Gerd Hoffmann <kraxel@redhat.com>
>> CC: Isaku Yamahata <yamahata@valinux.co.jp>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>> hw/ioh3420.c | 2 +-
>> hw/pci.c | 5 +++++
>> hw/pci_bridge.c | 4 ++++
>> hw/virtio-pci.c | 1 -
>> hw/xio3130_downstream.c | 2 +-
>> hw/xio3130_upstream.c | 1 -
>> 6 files changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/ioh3420.c b/hw/ioh3420.c
>> index 95adf09..73bc55f 100644
>> --- a/hw/ioh3420.c
>> +++ b/hw/ioh3420.c
>> @@ -81,7 +81,7 @@ static void ioh3420_write_config(PCIDevice *d,
>> static void ioh3420_reset(DeviceState *qdev)
>> {
>> PCIDevice *d = DO_UPCAST(PCIDevice, qdev, qdev);
>> - msi_reset(d);
>> +
>> ioh3420_aer_vector_update(d);
>> pcie_cap_root_reset(d);
>> pcie_cap_deverr_reset(d);
>> diff --git a/hw/pci.c b/hw/pci.c
>> index 1d297d6..967f812 100644
>> --- a/hw/pci.c
>> +++ b/hw/pci.c
>> @@ -31,6 +31,8 @@
>> #include "loader.h"
>> #include "qemu-objects.h"
>> #include "range.h"
>> +#include "msi.h"
>> +#include "msix.h"
>>
>> //#define DEBUG_PCI
>> #ifdef DEBUG_PCI
>> @@ -191,6 +193,9 @@ void pci_device_reset(PCIDevice *dev)
>> }
>> }
>> pci_update_mappings(dev);
>> +
>> + msi_reset(dev);
>> + msix_reset(dev);
>> }
>>
>> /*
>
> I am reluctant to add this dependency in pci.c:
> this goes against the efforts to modularise the
> pci subsystem. As I see it, pci.c should really only handle the common
> header. Instead I would like to add pci_caps.c and have
> that call out to all the capabilities (not just reset, same
> applies to other caps really).
Yeah, true. The result should just remain that devices no longer need to
worry about this.
>
> I started doing that, if no one beats me to it,
> I'll try to dust off that patch and post it next week.
Would be welcome.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2011-06-08 20:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 16:21 [Qemu-devel] [PATCH v2 0/9] msi: Small cleanups and fixes Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 1/9] msi: Fix copy&paste mistake in msi_uninit Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 2/9] msi: Guard msi/msix_write_config with msi_present Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 3/9] msi: Guard msi_reset " Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 4/9] msi: Use msi/msix_present more consistently Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 5/9] msi: Invoke msi/msix_reset from PCI core Jan Kiszka
2011-06-08 19:59 ` Michael S. Tsirkin
2011-06-08 20:47 ` Jan Kiszka [this message]
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 6/9] msi: Invoke msi/msix_write_config " Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 7/9] msi: Invoke msi/msix_uninit " Jan Kiszka
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 8/9] msix: Align MSI-X constants to libpci definitions and extend them Jan Kiszka
2011-06-08 19:46 ` Michael S. Tsirkin
2011-06-08 19:53 ` Michael S. Tsirkin
2011-06-08 20:48 ` Jan Kiszka
2011-06-08 21:00 ` Michael S. Tsirkin
2011-06-08 21:02 ` Jan Kiszka
2011-06-08 21:09 ` Michael S. Tsirkin
2011-06-08 21:11 ` Jan Kiszka
2011-06-08 21:15 ` Michael S. Tsirkin
2011-06-08 16:21 ` [Qemu-devel] [PATCH v2 9/9] msi: Move PCI_MSI_PENDING_32/64 into pci_regs.h Jan Kiszka
2011-06-08 19:48 ` Michael S. Tsirkin
2011-06-08 20:44 ` Jan Kiszka
2011-06-08 20:56 ` Michael S. Tsirkin
2011-06-08 20:57 ` Jan Kiszka
2011-06-08 21:01 ` Michael S. Tsirkin
2011-06-08 21:03 ` Jan Kiszka
2011-06-08 21:14 ` Michael S. Tsirkin
2011-06-08 21:18 ` Jan Kiszka
2011-06-08 21:24 ` Jan Kiszka
2011-06-08 21:30 ` 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=4DEFDFE6.6020707@web.de \
--to=jan.kiszka@web.de \
--cc=agraf@suse.de \
--cc=kraxel@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.