From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: Re: [kvm-devel] PATCH: dont call exit() from pci_nic_init(), let caller handle Date: Thu, 20 Mar 2008 08:10:53 -0500 Message-ID: <20080320131052.GJ14060@us.ibm.com> References: <20080320001951.GI14060@us.ibm.com> <47E2560B.8020902@qumranet.com> Reply-To: qemu-devel@nongnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <47E2560B.8020902@qumranet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.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