From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] kvm: qemu: check device assignment command Date: Sun, 29 Mar 2009 17:35:02 +0300 Message-ID: <49CF8716.4060300@redhat.com> References: <715D42877B251141A38726ABF5CABF2C01A11B66EE@pdsmsx503.ccr.corp.intel.com> <49CB6F55.10603@redhat.com> <715D42877B251141A38726ABF5CABF2C01A11B6AB9@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "'kvm@vger.kernel.org'" To: "Han, Weidong" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59030 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755572AbZC2OfF (ORCPT ); Sun, 29 Mar 2009 10:35:05 -0400 In-Reply-To: <715D42877B251141A38726ABF5CABF2C01A11B6AB9@pdsmsx503.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Han, Weidong wrote: >> I suggest replacing the parsing code with pci_parse_devaddr() (needs >> to be extended to support functions) so that all the checking and >> parsing is done in one place. >> > > If use pci_parse_devaddr(), it needs to add domain section to assigning command, and add function section to pci_add/pci_del commands. What's more, pci_parse_devaddr() parses guest device bdf, there are some assumption, such as function is 0. But here parse host bdf. It's a little complex to combine them together. > Right, but we end up with overall better code. -- error compiling committee.c: too many arguments to function