From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: marcel@redhat.com, pbonzini@redhat.com,
alex.williamson@redhat.com, qemu-devel@nongnu.org,
Marcel Apfelbaum <marcel.a@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile
Date: Mon, 3 Nov 2014 14:46:05 +0200 [thread overview]
Message-ID: <20141103124605.GA16216@redhat.com> (raw)
In-Reply-To: <87vbmwze25.fsf@blackfin.pond.sub.org>
On Mon, Nov 03, 2014 at 01:03:30PM +0100, Markus Armbruster wrote:
> Marcel Apfelbaum <marcel.a@redhat.com> writes:
>
> > Hot-plugging a device that has a romfile (either supplied by user
> > or built-in) using rombar=0 option is a user error, > > do not allow the device to be hot-plugged.
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> > ---
> > hw/pci/pci.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> > index 36226eb..371699c 100644
> > --- a/hw/pci/pci.c
> > +++ b/hw/pci/pci.c
> > @@ -1942,6 +1942,15 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom)
> > * for 0.11 compatibility.
> > */
> > int class = pci_get_word(pdev->config + PCI_CLASS_DEVICE);
> > +
> > + /*
> > + * Hot-plugged devices can't use the option ROM
> > + * if the rom bar is disabled.
> > + */
> > + if (DEVICE(pdev)->hotplugged) {
> > + return -1;
> > + }
> > +
> > if (class == 0x0300) {
> > rom_add_vga(pdev->romfile);
> > } else {
>
> Unlike the function's other unsuccessful returns, this one is silent.
> Intentional?
Marcel, Markus, as I applied the patch already, if you want to
fix things up pls send a new patch on top.
Thanks!
next prev parent reply other threads:[~2014-11-03 12:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 17:34 [Qemu-devel] [PATCH v4 0/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile Marcel Apfelbaum
2014-10-27 17:34 ` [Qemu-devel] [PATCH v4 1/2] hw/pci: fixed error flow in pci_qdev_init Marcel Apfelbaum
2014-10-30 13:33 ` Markus Armbruster
2014-10-30 17:25 ` Marcel Apfelbaum
2014-10-27 17:34 ` [Qemu-devel] [PATCH v4 2/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile Marcel Apfelbaum
2014-11-03 12:03 ` Markus Armbruster
2014-11-03 12:46 ` Michael S. Tsirkin [this message]
2014-11-03 12:52 ` Marcel Apfelbaum
2014-11-03 13:40 ` Markus Armbruster
2014-11-03 13:49 ` Marcel Apfelbaum
2014-11-03 15:54 ` Markus Armbruster
2014-11-03 16:07 ` Marcel Apfelbaum
2014-11-03 16:10 ` Michael S. Tsirkin
2014-11-24 15:22 ` [Qemu-devel] [PATCH v4 0/2] " 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=20141103124605.GA16216@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=marcel.a@redhat.com \
--cc=marcel@redhat.com \
--cc=pbonzini@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.