From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JcKY0-00030o-0T for qemu-devel@nongnu.org; Thu, 20 Mar 2008 09:11:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JcKXy-0002z2-DX for qemu-devel@nongnu.org; Thu, 20 Mar 2008 09:11:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcKXy-0002yo-Ac for qemu-devel@nongnu.org; Thu, 20 Mar 2008 09:11:06 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JcKXy-0006hL-3F for qemu-devel@nongnu.org; Thu, 20 Mar 2008 09:11:06 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m2KDAt0a031032 for ; Thu, 20 Mar 2008 09:10:55 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m2KDAtIL389348 for ; Thu, 20 Mar 2008 09:10:55 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m2KDAsUC018885 for ; Thu, 20 Mar 2008 09:10:54 -0400 Date: Thu, 20 Mar 2008 08:10:53 -0500 From: Ryan Harper Subject: Re: [kvm-devel] [Qemu-devel] PATCH: dont call exit() from pci_nic_init(), let caller handle Message-ID: <20080320131052.GJ14060@us.ibm.com> References: <20080320001951.GI14060@us.ibm.com> <47E2560B.8020902@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47E2560B.8020902@qumranet.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org * Avi Kivity [2008-03-20 07:19]: > Ryan Harper wrote: > > While exploring the PCI hotplug code recently posted, I encountered a > > situation where I don't believe the current behavior is ideal. With > > hotplug, we can add additional pci-based nic devices like e1000 and > > rtl8139 from the qemu monitor. If one mistakenly specifies model=ne2000 > > (the ISA version), qemu just exits. If a command is run from the > > monitor and specifies bogus values, I don't believe the right behavior > > is to exit out of the guest entirely. The attached patch (which doesn't > > apply directly against qemu-cvs since hotplug hasn't been merged) > > changes pci_nic_init() to return NULL on error instead of exiting > > and then I've replaced all callers to check the return value and exit(), > > preserving the existing behavior, but allowing flexibility so > > hotplug can do the right thing and just report the error rather than > > exiting the guest. > > > > > > Applied, thanks. > > [this didn't make it to kvm-devel for some reason?] Yeah, not sure about that, sometimes it gets clogged in our outgoing system; they tend to not get along with some servers for unknown reasons to me. It has worked in the past for me. *shrugs* -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@us.ibm.com