From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH][v2] kvm-userspace: Load PCI option ROMs Date: Mon, 29 Dec 2008 11:49:21 +0200 Message-ID: <49589D21.9070201@redhat.com> References: <49588A4A.8020902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" , "Shan, Haitao" To: "Liu, Kechao" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:53540 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbYL2Jt3 (ORCPT ); Mon, 29 Dec 2008 04:49:29 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Liu, Kechao wrote: >> How is the last bit performed on real hardware? Obviously the ROM can't >> have devfn embedded. >> > > On a real hardware, BIOS scans PCI devices, loads ROMs and it can get devices' devfns. Here, in an easier way, we load option ROMs in QEMU and thus need to > store and pass the devfns. > Well, it may make sense to provide the ROMs as virtual PCI BARs, and have the bios do the work. This way, if some driver relies on remapping the BAR (graphic cards?), it can still work. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.