Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
+Andrea; comments below On 08/08/18 23:11, Alex Williamson wrote: > On Wed, 8 Aug 2018 14:11:16 +0200 > Gerd Hoffmann wrote: > >> On Sun, Jul 29, 2018 at 01:49:10PM +0200, Konrad Eisele wrote: >>> I'm passing through a Marvell 88SE9230 card to a KVM guest under >>> Ubuntu 18.04. The card is a Sata controller with 4 ports. >>> The option rom of the Marvell 88SE9230 card shows on a normal boot a >>> bios screen. When pressing CTRL-m quick enough, you can interrupt the >>> bootprocess and enter a menue wherer you can define raid >>> arrays. >>> >>> When booting seabios inside KVM the bootprocess is very slow. >>> There is a 1 min holdtime where the cpu is about 30%. The screen is >>> black with only the seabios version string shown. I suspect that >>> the passed-through Marvell 88SE9230 cards option roms causes this >>> behaviour. >>> Maybe the scanning for option rom cause the slow bootprocess? >>> >>> In the seabios boot case no bios menue is shown, after >>> around 1 min the boot continues. >>> >>> Is it possible to disable the options rom processing? Is there some >>> documentation about this (How can I configure it for Ubuntu) ? >> >> Set the romfile option to the empty string (for vfio-pci, on the qemu >> command line) should do that (qemu will not expose the rom to the guest >> then). > > Typically rombar=0 on the QEMU command line is how to disable the option > ROM for an assigned device, or > > > > in libvirt. Thanks, On a tangent: Not sure about assigned devices, but for emulated devices, romfile='' "scales" better. With rombar=0, the oprom is still loaded into fw_cfg as a "genrom", and if multiple devices of the same type attempt to do that, the genroms will conflict, and QEMU will not launch: https://bugzilla.redhat.com/show_bug.cgi?id=1425058#c19 For this reason (as well), libvirt now supports a further attribute for the element, namely @enabled. It maps to the "romfile" property: https://bugzilla.redhat.com/show_bug.cgi?id=1425058#c34 By now I've updated all my long-term domains that used to specify , to . Thanks! Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
On Wed, 8 Aug 2018 14:11:16 +0200 Gerd Hoffmann wrote: > On Sun, Jul 29, 2018 at 01:49:10PM +0200, Konrad Eisele wrote: > > I'm passing through a Marvell 88SE9230 card to a KVM guest under > > Ubuntu 18.04. The card is a Sata controller with 4 ports. > > The option rom of the Marvell 88SE9230 card shows on a normal boot a > > bios screen. When pressing CTRL-m quick enough, you can interrupt the > > bootprocess and enter a menue wherer you can define raid > > arrays. > > > > When booting seabios inside KVM the bootprocess is very slow. > > There is a 1 min holdtime where the cpu is about 30%. The screen is > > black with only the seabios version string shown. I suspect that > > the passed-through Marvell 88SE9230 cards option roms causes this > > behaviour. > > Maybe the scanning for option rom cause the slow bootprocess? > > > > In the seabios boot case no bios menue is shown, after > > around 1 min the boot continues. > > > > Is it possible to disable the options rom processing? Is there some > > documentation about this (How can I configure it for Ubuntu) ? > > Set the romfile option to the empty string (for vfio-pci, on the qemu > command line) should do that (qemu will not expose the rom to the guest > then). Typically rombar=0 on the QEMU command line is how to disable the option ROM for an assigned device, or in libvirt. Thanks, Alex ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
On Sun, Jul 29, 2018 at 01:49:10PM +0200, Konrad Eisele wrote: > I'm passing through a Marvell 88SE9230 card to a KVM guest under > Ubuntu 18.04. The card is a Sata controller with 4 ports. > The option rom of the Marvell 88SE9230 card shows on a normal boot a > bios screen. When pressing CTRL-m quick enough, you can interrupt the > bootprocess and enter a menue wherer you can define raid > arrays. > > When booting seabios inside KVM the bootprocess is very slow. > There is a 1 min holdtime where the cpu is about 30%. The screen is > black with only the seabios version string shown. I suspect that > the passed-through Marvell 88SE9230 cards option roms causes this > behaviour. > Maybe the scanning for option rom cause the slow bootprocess? > > In the seabios boot case no bios menue is shown, after > around 1 min the boot continues. > > Is it possible to disable the options rom processing? Is there some > documentation about this (How can I configure it for Ubuntu) ? Set the romfile option to the empty string (for vfio-pci, on the qemu command line) should do that (qemu will not expose the rom to the guest then). cheers, Gerd ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
side comment: On 07/29/18 21:43, Konrad Eisele wrote: > changed /usr/bin/kvm (which > libvirtd is calling at boot) > qemu-system-x86_64 -enable-kvm -bios /usr/lib/qemu/bios.bin "$@" This should not be necessary. Libvirt lets you specify the desired firmware in the domain XML: https://libvirt.org/formatdomain.html#elementsOSBIOS In this case, it should be /path/to/your/bios.bin Thanks Laszlo ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
> > You could try playing with the etc/pci-optionrom-exec setting. > > See QEMU's -fw_cfg command line option. You'll need to pass in a > binary integer zero or binary integer one to control that setting. > > I tried the pci-optionrom-exec option but it has the effect that the screen stays black: $dd if=/dev/zero of=/tmp/pci-optionrom-exec bs=1 count=4 $qemu-system-x86_64 -hda testimg.img -cdrom FreeNAS-11.2-BETA1.iso -boot d -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x7 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -fw_cfg name=etc/pci-optionrom-exec,file=/tmp/pci-optionrom-exec (the vfio_pci device is :01:00.0 is the SATA card) There is no seabios version printed out, still the cpu is at 100%. I also recompiled seabios 1.11 with standard qemu options and disabled the OPTIONROM config setting. This had the same effect as when running with pci-optionrom-exec==0 (black screen). I then recompiled the seabios 1.11 with the standard qemu options only copied it to /usr/lib/qemu/bios.bin and changed /usr/bin/kvm (which libvirtd is calling at boot) qemu-system-x86_64 -enable-kvm -bios /usr/lib/qemu/bios.bin "$@" This gave me a workaround: It seems like the baked in seabios 1.10 sets the SATA card into a state that even if I start qemu with "-bios /usr/lib/qemu/bios.bin" next time it will hang. Never using seabios 1.10 and only seabios 1.11 seems to make it work (no 1min hang)... Not shure what was wrong in the first place though.. ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
On Sun, Jul 29, 2018 at 01:49:10PM +0200, Konrad Eisele wrote: > I'm passing through a Marvell 88SE9230 card to a KVM guest under > Ubuntu 18.04. The card is a Sata controller with 4 ports. > The option rom of the Marvell 88SE9230 card shows on a normal boot a > bios screen. When pressing CTRL-m quick enough, you can interrupt the > bootprocess and enter a menue wherer you can define raid > arrays. > > When booting seabios inside KVM the bootprocess is very slow. > There is a 1 min holdtime where the cpu is about 30%. The screen is > black with only the seabios version string shown. I suspect that > the passed-through Marvell 88SE9230 cards option roms causes this > behaviour. > Maybe the scanning for option rom cause the slow bootprocess? > > In the seabios boot case no bios menue is shown, after > around 1 min the boot continues. > > Is it possible to disable the options rom processing? Is there some > documentation about this (How can I configure it for Ubuntu) ? The list of runtime SeaBIOS settings is at: https://www.seabios.org/Runtime_config You could try playing with the etc/pci-optionrom-exec setting. See QEMU's -fw_cfg command line option. You'll need to pass in a binary integer zero or binary integer one to control that setting. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios
[SeaBIOS] Marvell 88SE9230 passthrough in KVM takes long time to boot
I'm passing through a Marvell 88SE9230 card to a KVM guest under Ubuntu 18.04. The card is a Sata controller with 4 ports. The option rom of the Marvell 88SE9230 card shows on a normal boot a bios screen. When pressing CTRL-m quick enough, you can interrupt the bootprocess and enter a menue wherer you can define raid arrays. When booting seabios inside KVM the bootprocess is very slow. There is a 1 min holdtime where the cpu is about 30%. The screen is black with only the seabios version string shown. I suspect that the passed-through Marvell 88SE9230 cards option roms causes this behaviour. Maybe the scanning for option rom cause the slow bootprocess? In the seabios boot case no bios menue is shown, after around 1 min the boot continues. Is it possible to disable the options rom processing? Is there some documentation about this (How can I configure it for Ubuntu) ? // Greetings Konrad ___ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios