From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Graphics card pass-through working with two pass pci-initialization Date: Sun, 29 May 2011 22:51:46 +0200 Message-ID: <4DE2B1E2.6020004@web.de> References: <1306227933-4880-1-git-send-email-kraxel@redhat.com> <1306227933-4880-2-git-send-email-kraxel@redhat.com> <20110525023406.GG8517@valinux.co.jp> <20110525043353.GH8517@valinux.co.jp> <4DDCC7A5.60706@redhat.com> <4DDCF9ED.5050208@redhat.com> <4DDDDA8D.6080807@web.de> <4DDDF62C.2010603@redhat.com> <4DDF3768.5010002@web.de> <4DDF867A.9040700@siemens.com> <4DDFFE1E.1060900@web.de> <4DE0008F.4050608@web.de> <4DDEC3F7.2060605@web.de> <4DE0AFF1.2050404@web.de> <4C001023.4030807@web.de> <4DE2649D.7070803@web.de> <4DE29ED6.50605@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig73796E1B1AEB956B1B85B2D8" Cc: Gerd Hoffmann , seabios@seabios.org, kvm@vger.kernel.org, Alex Williamson To: =?UTF-8?B?QW5kcsOpIFdlaWRlbWFubg==?= Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:53816 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467Ab1E2UwU (ORCPT ); Sun, 29 May 2011 16:52:20 -0400 In-Reply-To: <4DE29ED6.50605@web.de> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig73796E1B1AEB956B1B85B2D8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-05-29 21:30, Andr=C3=A9 Weidemann wrote: > Hi, >=20 > On 29.05.2011 17:22, Jan Kiszka wrote: >> On 2010-05-28 20:49, Andr=C3=A9 Weidemann wrote: >>> Hi, >>> >>> On 28.05.2011 10:18, Jan Kiszka wrote: >>>> On 2011-05-26 23:19, Andr=C3=A9 Weidemann wrote: >>>>> On 27.05.2011 21:50, Andr=C3=A9 Weidemann wrote: >>>>>> On 27.05.2011 21:40, Andr=C3=A9 Weidemann wrote: >>>>>> >>>>>>> If I am not mistaken then the graphics card needs 2 bars, one wit= h >>>>>>> 256MB >>>>>>> and one with 128K. The sound card then needs 1 bar with 16K of PC= I >>>>>>> memory. >>>>>>> How big is the PCI memory with seabios? >>>>>>> Is there really not enough space to "squeeze" in those extra 16K?= >>>>>> >>>>>> I obviously forgot to add up the other memory that is used... >>>>>> 32MB go to the standard VGA card. Running qemu-kvm with "-vga >>>>>> none" did >>>>>> not work, so I left it in. And the e1000 NIC needs another 128K. >>>>>> >>>>>> I'll see if I can get rid of the standard VGA card. I guess that >>>>>> should >>>>>> free enough memory for the sound card. >>>>> >>>>> I did some more testing by starting the VM with the paramter "-vga >>>>> none" >>>>> and passed both the VGA card and the sound card to it. With this >>>>> option >>>>> the VM did not boot, >>>> >>>> Where did it hang, ie. what IP was reported by info cpus? >>> >>> I added some debug options and found out, that the VM hangs when tryi= ng >>> to initialize the graphics card ROM. >>> See here: >>> http://pastebin.com/S9a8uQfU >>> >>> And some additional info here: >>> >>> http://pastebin.com/AC4rw8Ek (info cpus/registers) >>> http://pastebin.com/yYkn8jL2 (info pci) >> >> Yeah, you definitely run out of PCI memory. >> >> Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki. >> Try if this hack improves the situation: >> >> http://git.kiszka.org/?p=3Dqemu-kvm.git;a=3Dcommitdiff;h=3D96e600f4327= 5310364c0310519d6ab6540bb7d25 >> >=20 > I applied above patch, but it did not make a difference. The VM did not= > boot with the parameter "-vga none". Err, yes, of course. You also need at least legacy VGA pass-through like in this commit: http://git.kiszka.org/?p=3Dqemu-kvm.git;a=3Dcommitdiff;h=3D5c14a1b3510d97= 7f194b75672196caca0b488760 But there is no guarantee that the BIOS you try to run through POST inside the guest is actually prepared for this. Maybe specifying an empty ROM helps to get the guest a bit further: -device pci-assign,romfile=3D,host=3D... >=20 >=20 > I found the time to apply your two patches here: > http://git.kiszka.org/?p=3Dseabios.git;a=3Dshortlog;h=3Drefs/heads/vga-= assign > After doing so, Gerds q35 bios branch prints an error message during > compile. > The error comes from line 33 here: > http://www.kraxel.org/cgit/seabios/tree/src/dev-q35.c?h=3Dkraxel.q35 > How do I adjust the memory area here? Just use my branch without any of Gerd's patches for the first step. Jan --------------enig73796E1B1AEB956B1B85B2D8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk3isegACgkQitSsb3rl5xRM9gCgl/ykuMKySFS3vm2A02+wy7bx GKgAnjVz/GtuziFJRMVq7mccQIzNCYOf =VODP -----END PGP SIGNATURE----- --------------enig73796E1B1AEB956B1B85B2D8--