From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH][v2] kvm-userspace: Load PCI option ROMs Date: Wed, 31 Dec 2008 11:28:35 +0200 Message-ID: <495B3B43.2090200@redhat.com> References: <49588A4A.8020902@redhat.com> <49589D21.9070201@redhat.com> <61563CE63B4F854986A895DA7AD3C177044E6ECA@pdsmsx502.ccr.corp.intel.com> <495A4367.6050203@redhat.com> <61563CE63B4F854986A895DA7AD3C177044E7098@pdsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Liu, Kechao" , "'kvm@vger.kernel.org'" To: "Shan, Haitao" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59845 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160AbYLaJ2j (ORCPT ); Wed, 31 Dec 2008 04:28:39 -0500 In-Reply-To: <61563CE63B4F854986A895DA7AD3C177044E7098@pdsmsx502.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Shan, Haitao wrote: > Hi, Avi, > > Option ROM already has its own BAR at 0x30h. I think the devices assignment code now already handles this register. > Okay good. > Can I summary your proposals like the following: In guest BIOS, scan all the pci devices (virtual) for existance of Option ROMs. Copy them to available BIOS space in 0xC0000 - 0xDFFFF. Execute the ROM code at copied location. > Yes. > I don't understand why this makes differences compared to scanning and copying Option ROMs in QEMU, If the ROM BAR is already handled (including registering the memory when the BAR is programmed -- I don't see that in the code), then there is no big advantage. It's closer to how real hardware works, but that's about it. > especially given that the VGA BIOS and etherboot ROM are also copied to BIOS space in QEMU before they execute in rom_scan loop in guest BIOS. > The VGA BIOS is typically present on the motherboard itself, at least on some configurations. You're right about etherboot. I'll apply the patch. Can you take a look at the ROM BAR? -- error compiling committee.c: too many arguments to function