From: Marcel Apfelbaum <marcel@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>,
qemu devel list <qemu-devel@nongnu.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pci-bridge/i82801b11: clear bridge registers on platform reset
Date: Wed, 7 Feb 2018 15:35:44 +0200 [thread overview]
Message-ID: <ca07e122-dedc-91cc-7469-8518618349ae@redhat.com> (raw)
In-Reply-To: <20180207121027.32466-1-lersek@redhat.com>
Hi Laszlo,
On 07/02/2018 14:10, Laszlo Ersek wrote:
> The "i82801b11-bridge" device model is a descendant of "base-pci-bridge"
> (TYPE_PCI_BRIDGE). However, unlike other similar devices, such as
>
> - pci-bridge,
> - pcie-pci-bridge,
> - PCIE Root Port,
> - xio3130 switch upstream and downstream ports,
> - dec-21154-p2p-bridge,
> - pbm-bridge,
> - xilinx-pcie-root,
>
> "i82801b11-bridge" does not clear the bridge specific registers at
> platform reset.
>
> This is a problem because devices on "i82801b11-bridge" continue to
> respond to config space cycles after platform reset, when addressed with
> the bus number that was previously programmed into the secondary bus
> number register of "i82801b11-bridge". This error breaks OVMF's search for
> extra (PXB) root buses, for example.
>
Now I understand why we didn't catch the error until now. Nobody
tried to use the pxb device with the dmi-pci bridge.
> The device class reset method for "i82801b11-bridge" is currently NULL;
This is sad, the device was always broken.
> set it directly to pci_bridge_reset(), like the last three bridge models
> in the above listing do.
>
Thanks for catching it!
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Thanks,
Marcel
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel@redhat.com>
> Cc: qemu-stable@nongnu.org
> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1541839
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> hw/pci-bridge/i82801b11.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
> index cb522bf30c31..ebf7f5f0e81c 100644
> --- a/hw/pci-bridge/i82801b11.c
> +++ b/hw/pci-bridge/i82801b11.c
> @@ -98,6 +98,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
> k->realize = i82801b11_bridge_realize;
> k->config_write = pci_bridge_write_config;
> dc->vmsd = &i82801b11_bridge_dev_vmstate;
> + dc->reset = pci_bridge_reset;
> set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
> }
>
>
next prev parent reply other threads:[~2018-02-07 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 12:10 [Qemu-devel] [PATCH] pci-bridge/i82801b11: clear bridge registers on platform reset Laszlo Ersek
2018-02-07 13:35 ` Marcel Apfelbaum [this message]
2018-02-07 13:55 ` Laszlo Ersek
2018-02-07 17:11 ` Marcel Apfelbaum
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=ca07e122-dedc-91cc-7469-8518618349ae@redhat.com \
--to=marcel@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 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).