[SeaBIOS] Graphics card pass-through working with two pass pci-initialization

Jan Kiszka jan.kiszka at web.de
Sun May 29 22:51:46 CEST 2011

On 2011-05-29 21:30, André Weidemann wrote:
> Hi,
> On 29.05.2011 17:22, Jan Kiszka wrote:
>> On 2010-05-28 20:49, André Weidemann wrote:
>>> Hi,
>>> On 28.05.2011 10:18, Jan Kiszka wrote:
>>>> On 2011-05-26 23:19, André Weidemann wrote:
>>>>> On 27.05.2011 21:50, André Weidemann wrote:
>>>>>> On 27.05.2011 21:40, André Weidemann wrote:
>>>>>>> If I am not mistaken then the graphics card needs 2 bars, one with
>>>>>>> 256MB
>>>>>>> and one with 128K. The sound card then needs 1 bar with 16K of PCI
>>>>>>> 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 trying
>>> 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=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25
> 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:


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=,host=...

> I found the time to apply your two patches here:
> http://git.kiszka.org/?p=seabios.git;a=shortlog;h=refs/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=kraxel.q35
> How do I adjust the memory area here?

Just use my branch without any of Gerd's patches for the first step.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://www.seabios.org/pipermail/seabios/attachments/20110529/2fa5d4e7/attachment.sig>

More information about the SeaBIOS mailing list