From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49060 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUcUa-0006Ek-RE for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUcUZ-0008FE-JD for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:25:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30191) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUcUZ-0008EX-Ce for qemu-devel@nongnu.org; Fri, 02 Jul 2010 05:25:03 -0400 Message-ID: <4C2DB057.3090305@redhat.com> Date: Fri, 02 Jul 2010 11:24:39 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <4C280AE3.2060500@jp.fujitsu.com> <4C29A1E7.70609@jp.fujitsu.com> <4C2B16D8.8070706@jp.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] device-assignment: Rework "name" of assigned pci device List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Hidetoshi Seto , kvm@vger.kernel.org, xudong.hao@intel.com, qemu-devel@nongnu.org, aliguori@us.ibm.com, paul@codesourcery.com Hi, > As far as I can tell, "name" predates the qdev conversion, and was used > just for error messages and such. Yes, was already there when I touched the code the first time. > It defaulted to "host". When Gerd > did the qdev conversion, he made "id" default to "name", then "host". > See commit 6b5bbd04. > > Defaulting "id" that way was probably not such a good idea. We > generally don't make up qdev IDs, because that risks collision with > user-specified IDs. > > Since we've broken compatibility already, I figure we could just as well > stop defaulting "id" to "host". When we need to identify the device to > the user, use "id" if it exists, else its PCI address. Agree, we should not make up defaults for 'id'. I did that in a few places where some naming existed already to ease transition. nics with name= used to get that as default id too. But in the end it turned out it caused more trouble than it helped ... cheers, Gerd