|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH v2 1/4] pci: allow devices being tagged as not hotpluggable. |
Date: | Thu, 13 Jan 2011 13:12:25 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Red Hat/3.1.7-3.el6_0 Thunderbird/3.1.7 |
@@ -1620,6 +1620,11 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base) info->is_bridge); if (pci_dev == NULL) return -1; + if (qdev->hotplugged&& info->no_hotplug) { + qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name); + do_pci_unregister_device(pci_dev); + return -1; + }Any particular reason for not check this before do_pci_register_device()?
Don't remember, probably not. I think can could be moved up (and loose the unregister call) and behavior will not change.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |