From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: graphics card pci passthrough success report Date: Thu, 13 Sep 2012 10:39:57 +0200 Message-ID: <50519BDD.2020200@siemens.com> References: <20120912155042.GD778@wantstofly.org> <50517534.9030304@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Lennert Buytenhek , kvm@vger.kernel.org, Dirk Teurlings To: Gerd Hoffmann Return-path: Received: from goliath.siemens.de ([192.35.17.28]:29590 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877Ab2IMIkH (ORCPT ); Thu, 13 Sep 2012 04:40:07 -0400 In-Reply-To: <50517534.9030304@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2012-09-13 07:55, Gerd Hoffmann wrote: > Hi, > >> - Apply the patches at the end of this mail to kvm and SeaBIOS to >> allow for more BAR space under 4G. (The relevant BARs on the >> graphics cards _are_ 64 bit BARs, but kvm seemed to turn those >> into 32 bit BARs in the guest.) > > Which qemu/seabios versions have you used? > > qemu-1.2 (+ bundled seabios) should handle that just fine without > patching. There is no fixed I/O window any more, all memory space above > lowmem is available for pci, i.e. if you give 2G to your guest > everything above 0x80000000. > > And if there isn't enougth address space below 4G (if you assign lot of > memory to your guest so qemu keeps only the 0xe0000000 - 0xffffffff > window free) seabios should try to map 64bit bars above 4G. > >> - Apply the hacky patch at the end of this mail to SeaBIOS to >> always skip initialising the Radeon's option ROMs, or the VM >> would hang inside the Radeon option ROM if you boot the VM >> without the default cirrus video. > > A better way to handle that would probably be to add an pci passthrough > config option to not expose the rom to the guest. -device pci-assign,option-rom=,... > > Any clue *why* the rom doesn't run? Maybe because we are not passing through the legacy VGA I/O ranges, maybe because the card is accessing one of the famous side channels to configure its mappings, and we do not virtualize them (as we usually do not know them). Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux