From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Armbruster Subject: Re: qemu fail to parse command line with "-pcidevice 00:19.0" Date: Thu, 24 Jun 2010 08:08:03 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "qemu-devel\@nongnu.org" , "aliguori\@us.ibm.com" , "kvm\@vger.kernel.org" To: "Hao\, Xudong" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14829 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753005Ab0FXGIJ (ORCPT ); Thu, 24 Jun 2010 02:08:09 -0400 In-Reply-To: (Xudong Hao's message of "Thu, 24 Jun 2010 10:03:44 +0800") Sender: kvm-owner@vger.kernel.org List-ID: Note to qemu-devel: this issue is qemu-kvm only. "Hao, Xudong" writes: > When assign one PCI device, qemu fail to parse the command line: > qemu-system_x86 -smp 2 -m 1024 -hda /path/to/img -pcidevice host=00:19.0 > Error: > qemu-system-x86_64: Parameter 'id' expects an identifier > Identifiers consist of letters, digits, '-', '.', '_', starting with a letter. > pcidevice argument parse error; please check the help text for usage > Could not add assigned device host=00:19.0 > > https://bugs.launchpad.net/qemu/+bug/597932 > > This issue caused by qemu-kvm commit b560a9ab9be06afcbb78b3791ab836dad208a239. The bug is in add_assigned_device(): r = get_param_value(id, sizeof(id), "id", arg); if (!r) r = get_param_value(id, sizeof(id), "name", arg); if (!r) r = get_param_value(id, sizeof(id), "host", arg); We end up with invalid ID "00:19.0". Is there a technical reason why we must have an ID? I doubt it. Work-around: -device pci-assign,host=00:19.1 See the last section of docs/qdev-device-use.txt for details.