From: Gerd Hoffmann <kraxel@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [ANNOUNCE][Call-For-Testing] Release 0.12.0-rc1 of QEMU
Date: Tue, 08 Dec 2009 13:52:10 +0100 [thread overview]
Message-ID: <4B1E4BFA.4010207@redhat.com> (raw)
In-Reply-To: <20091208105206.GA16596@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
On 12/08/09 11:52, Daniel P. Berrange wrote:
> On Tue, Dec 08, 2009 at 11:40:54AM +0100, Gerd Hoffmann wrote:
>> "worked" as in "guest actually sees the new device (without reboot)" or
>> "worked" as in "qemu didn't abort" ?
>
> The latter. The guest does not see it, but it at least does not abort.
> It is the 'does not abort' behaviour I'm interested in - quite OK with
> this returning an error to the monitor client when acpi is disabled.
Does the attached patch fix it for you?
cheers,
Gerd
[-- Attachment #2: 0001-fix-pci-hotplug.patch --]
[-- Type: text/plain, Size: 1452 bytes --]
>From c87a20bc8c0347770f55c8267ec10667cd2ba24c Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 8 Dec 2009 13:50:16 +0100
Subject: [PATCH] fix pci hotplug
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/pci-hotplug.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 081d6d1..7e5c51d 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -40,7 +40,18 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
const char *opts_str)
{
QemuOpts *opts;
- int ret;
+ PCIBus *bus;
+ int ret, devfn;
+
+ bus = pci_get_bus_devfn(&devfn, devaddr);
+ if (!bus) {
+ monitor_printf(mon, "Invalid PCI device address %s\n", devaddr);
+ return NULL;
+ }
+ if (!((BusState*)bus)->allow_hotplug) {
+ monitor_printf(mon, "PCI bus doesn't support hotplug\n");
+ return NULL;
+ }
opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", NULL);
if (!opts) {
@@ -179,6 +190,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
monitor_printf(mon, "Invalid PCI device address %s\n", devaddr);
return NULL;
}
+ if (!((BusState*)bus)->allow_hotplug) {
+ monitor_printf(mon, "PCI bus doesn't support hotplug\n");
+ return NULL;
+ }
switch (type) {
case IF_SCSI:
--
1.6.5.2
next prev parent reply other threads:[~2009-12-08 12:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 22:43 [Qemu-devel] [ANNOUNCE][Call-For-Testing] Release 0.12.0-rc1 of QEMU Anthony Liguori
2009-12-07 12:49 ` Luiz Capitulino
2009-12-07 13:45 ` Anthony Liguori
2009-12-07 13:59 ` Luiz Capitulino
2009-12-07 14:30 ` [Qemu-devel] " Michael S. Tsirkin
2009-12-07 14:36 ` Anthony Liguori
2009-12-07 14:45 ` Michael S. Tsirkin
2009-12-07 14:56 ` Anthony Liguori
2009-12-07 18:34 ` [Qemu-devel] " Daniel P. Berrange
2009-12-07 19:43 ` Anthony Liguori
2009-12-07 20:25 ` Daniel P. Berrange
2009-12-08 10:40 ` Gerd Hoffmann
2009-12-08 10:52 ` Daniel P. Berrange
2009-12-08 12:52 ` Gerd Hoffmann [this message]
2009-12-08 13:07 ` Gerd Hoffmann
2009-12-09 10:21 ` Daniel P. Berrange
2009-12-07 20:18 ` [Qemu-devel] [PULL] pci compliance fixes Michael S. Tsirkin
2009-12-09 10:27 ` [Qemu-devel] [ANNOUNCE][Call-For-Testing] Release 0.12.0-rc1 of QEMU Ian Molton
2009-12-09 16:56 ` Daniel P. Berrange
2009-12-10 9:22 ` Gerd Hoffmann
2009-12-10 12:16 ` Daniel P. Berrange
-- strict thread matches above, loose matches on Subject: below --
2009-12-14 14:06 Anthony Liguori
2009-12-14 16:08 ` Artyom Tarasenko
2009-12-14 16:20 ` Anthony Liguori
2009-12-14 16:56 ` Blue Swirl
2009-12-14 17:00 ` Avi Kivity
2009-12-14 17:28 ` Anthony Liguori
2009-12-16 3:19 ` Ryan Harper
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=4B1E4BFA.4010207@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=berrange@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 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).