From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41313 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq4jq-0001B5-7e for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:49:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq4jo-00080H-TP for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:49:29 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:49891) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq4jo-00080B-P1 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:49:28 -0400 Received: by ywa6 with SMTP id 6so2364587ywa.4 for ; Mon, 30 Aug 2010 06:49:27 -0700 (PDT) Message-ID: <4C7BB5F7.6010906@codemonkey.ws> Date: Mon, 30 Aug 2010 08:45:27 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1283156160-4278-1-git-send-email-Jes.Sorensen@redhat.com> <4C7BAB85.10604@codemonkey.ws> <4C7BAE1C.2070007@redhat.com> In-Reply-To: <4C7BAE1C.2070007@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v3] Do not try loading option ROM for hotplug PCI device in pc-0.11 compat mode List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: qemu-devel@nongnu.org, Gerd Hoffmann On 08/30/2010 08:11 AM, Jes Sorensen wrote: > On 08/30/10 15:00, Anthony Liguori wrote: > >> On 08/30/2010 03:16 AM, Jes.Sorensen@redhat.com wrote: >> >>> From: Jes Sorensen >>> >>> pc-0.11 and older uses fw_cfg to provide option ROMs. As fw_cfg is setup >>> at init time, it is not possible to load an option ROM for a hotplug >>> device when running in compat mode. >>> >>> v2: Alex Williamson pointed out that one can get to qdev directly from >>> pci_dev, so no need to pass it down. >>> >>> v3: Braces >>> >>> >> What's the specific bug? The devices themselves have a check for >> hotplug which inhibits rom addition during hotplug so either there's a >> device missing this check or if we're going to go this route, we ought >> to remove those checks in the other devices. >> > If you run in -M pc-0.11 or older option ROMs are provided via fw_cfg, > which means QEMU is unable to load it after boot time if you try to > hot-plug a new network device via the monitor. Instead it decides to > exit with an error. > Which network device? Take a look at ne2k.c's rom loading. It's got logic for rom loading with hotplug but e1000 and rtl8139 don't. Maybe it's because ne2k also supports an ISA mode? Gerd, what was your intention here? Regards, Anthony Liguori > My patch makes QEMU not try to load the option ROM in this case, which > IMHO is a reasonable workaround. It means you can't PXE from the > hot-plugged device, but at least QEMU doesn't exit out on you. > > Cheers, > Jes >