On 11/18/2015 03:22 AM, Gerd Hoffmann wrote:> /me goes undust the kvmtool patches for seabios. > > (see https://www.kraxel.org/cgit/seabios/commit/?h=kvmtool, > build with CONFIG_KVMTOOL=y + CONFIG_DEBUG_LEVEL=9) > > nilsson kraxel ~# ~kraxel/projects/kvmtool/lkvm run --name seabios > --firmware /home/kraxel/projects/seabios/out-bios-kvmtool/bios.bin > --disk /vmdisk/cloud/persistent/Fedora-Cloud-Base-22-20150521.x86_64.raw > # lkvm run -k /boot/vmlinuz-3.10.0-324.el7.x86_64 -m 448 -c 4 --name > seabiosThanks for testing! I didn't even thing about seabios as a testing target. I tried to do what you described, and built seabios with: $ cat .config | grep 'KVMTOOL\|DEBUG' CONFIG_KVMTOOL=y CONFIG_DEBUG_LEVEL=9 But when booting, it just hangs on: $ ./lkvm run --firmware ~/seabios/out/bios.bin -d dummy # lkvm run -k /boot/vmlinuz-4.2.0-17-generic -m 448 -c 4 --name guest-12566 And same result with --virtio-legacy... What did I miss? Thanks, Sasha
Hi,> Thanks for testing! I didn't even thing about seabios as a testing target.Not surprising, support isn't upstream, ran into a bunch of issues[1][2] last time I tried to combine the two, ran into some issues and nobody seemed to care, so the seabios patches where just sitting in a branch in my repo ...> $ cat .config | grep 'KVMTOOL\|DEBUG' > CONFIG_KVMTOOL=y > CONFIG_DEBUG_LEVEL=9Hmm, 'CONFIG_KVMTOOL=y > .config; make olddefconfig' should give you a working configuration. Setting 'CONFIG_DEBUG_LEVEL=9' is useful for trouble-shooting as it makes the virtio drivers more verbose, but not mandatory to have. Serial line support is needed to get output: CONFIG_DEBUG_SERIAL=y CONFIG_DEBUG_SERIAL_PORT=0x3f8 Also I think rom size must be 128k b/c kvmtool expects it to be that way: CONFIG_ROM_SIZE=128 But those are the defaults, and after "make olddefconfig" you should already have them ... cheers, Gerd [1] kernel doesn't find pci (can be worked around by tweaking kernel command line in boot loader config). [2] kernel virtio drivers fail to initialize (probably device reset not working properly).
On 11/18/2015 12:52 PM, Gerd Hoffmann wrote:> Hi, > >> Thanks for testing! I didn't even thing about seabios as a testing target. > > Not surprising, support isn't upstream, ran into a bunch of issues[1][2] > last time I tried to combine the two, ran into some issues and nobody > seemed to care, so the seabios patches where just sitting in a branch in > my repo ... > >> $ cat .config | grep 'KVMTOOL\|DEBUG' >> CONFIG_KVMTOOL=y >> CONFIG_DEBUG_LEVEL=9 > > Hmm, 'CONFIG_KVMTOOL=y > .config; make olddefconfig' should give you a > working configuration. > > Setting 'CONFIG_DEBUG_LEVEL=9' is useful for trouble-shooting as it > makes the virtio drivers more verbose, but not mandatory to have. > > Serial line support is needed to get output: > > CONFIG_DEBUG_SERIAL=y > CONFIG_DEBUG_SERIAL_PORT=0x3f8 > > Also I think rom size must be 128k b/c kvmtool expects it to be that > way: > > CONFIG_ROM_SIZE=128 > > But those are the defaults, and after "make olddefconfig" you should > already have them ...It was the ROM_SIZE one as it seems, it was set to 0 here. Anyways, I debugged it for a bit a found that seabios attempts to write to the notification BAR, I look further tomorrow to narrow it down and fix it. Thanks, Sasha