From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45903 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM2XX-0001LK-4g for qemu-devel@nongnu.org; Tue, 08 Jun 2010 13:24:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM2XW-0001SF-26 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 13:24:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33766) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM2XV-0001S9-Rn for qemu-devel@nongnu.org; Tue, 08 Jun 2010 13:24:38 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o58HOaav011161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Jun 2010 13:24:37 -0400 Date: Tue, 8 Jun 2010 22:56:11 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH v2] net: Fix hotplug with pci_add Message-ID: <20100608172525.GB10305@amit-laptop.redhat.com> References: <356ef9bdde008d695e7c75dd1566222d6160d4b6.1276011638.git.amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Gerd Hoffmann , qemu list , Juan Quintela On (Tue) Jun 08 2010 [18:33:00], Markus Armbruster wrote: > Amit Shah writes: > > > The correct model type wasn't getting added when hotplugging nics with > > pci_add. > > > > Testcase: start VM with default nic type. In the qemu_monitor: > > > > (qemu) pci_add auto nic model=virtio > > > > This results in a nic hot-plug of the same nic type as the default. > > Works fine for me on master, fd1dc858370d9a9ac7ea2512812c3a152ee6484b. > What am I doing wrong? Did you start with a virtio nic added? The 'default' here is the nic type that's added as the first nic. Try this: start a VM with model e1000 and use pci_add to add a nic type of virtio. > > This was broken in 5294e2c774f120e10b44652ac143abda356f44eb > > > > Also changes the behaviour where no .init is defined for a > > net_client_type. Previously, 0 was returned, which indicated the init > > was successful and that 0 was the index into the nd_tables[] array. > > Return -1, indicating unsuccessful init, in such a case. > > The only element of net_client_types[] without an init() method is type > "none", index 0. So, doesn't this break -net none? And what does it > fix? The net_client_types[] index isn't relevant here. -net none works fine, no problem. Amit