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 14:07:29 +0100 [thread overview]
Message-ID: <4B1E4F91.9010206@redhat.com> (raw)
In-Reply-To: <4B1E4BFA.4010207@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
On 12/08/09 13:52, Gerd Hoffmann wrote:
>> 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?
One more fix for the "hw_error() when slots full" case.
cheers,
Gerd
[-- Attachment #2: 0001-pci-don-t-hw_error-when-no-slot-is-available.patch --]
[-- Type: text/plain, Size: 2007 bytes --]
>From 1c1de5c577a3241df4fb52cfdf15e97af9283caa Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 8 Dec 2009 14:05:11 +0100
Subject: [PATCH] pci: don't hw_error() when no slot is available.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/pci.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 4f662b7..404eead 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -580,11 +580,13 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
if (!bus->devices[devfn])
goto found;
}
- hw_error("PCI: no devfn available for %s, all in use\n", name);
+ qemu_error("PCI: no devfn available for %s, all in use\n", name);
+ return NULL;
found: ;
} else if (bus->devices[devfn]) {
- hw_error("PCI: devfn %d not available for %s, in use by %s\n", devfn,
+ qemu_error("PCI: devfn %d not available for %s, in use by %s\n", devfn,
name, bus->devices[devfn]->name);
+ return NULL;
}
pci_dev->bus = bus;
pci_dev->devfn = devfn;
@@ -625,6 +627,9 @@ PCIDevice *pci_register_device(PCIBus *bus, const char *name,
pci_dev = do_pci_register_device(pci_dev, bus, name, devfn,
config_read, config_write,
PCI_HEADER_TYPE_NORMAL);
+ if (pci_dev == NULL) {
+ hw_error("PCI: can't register device\n");
+ }
return pci_dev;
}
static target_phys_addr_t pci_to_cpu_addr(target_phys_addr_t addr)
@@ -1376,6 +1381,8 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
pci_dev = do_pci_register_device(pci_dev, bus, base->name, devfn,
info->config_read, info->config_write,
info->header_type);
+ if (pci_dev == NULL)
+ return -1;
rc = info->init(pci_dev);
if (rc != 0)
return rc;
--
1.6.5.2
next prev parent reply other threads:[~2009-12-08 13:07 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
2009-12-08 13:07 ` Gerd Hoffmann [this message]
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=4B1E4F91.9010206@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 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.