On Mi, 2015-11-18 at 23:01 -0500, Sasha Levin wrote:> On 11/18/2015 11:00 PM, Sasha Levin wrote: > > 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. > > Err, *read*, obviously. > > I've never implemented that because the kernel doesn't try to do that (it doesn't > make much sense, I think...).It doesn't make sense indeed (kvmtool still shouldn't segfault though), and on a quick look I can't spot a place in seabios doing that ... It's reading ISR, as part of device reset, to make sure any pending interrupts are cleared. cheers, Gerd
On 11/19/2015 02:21 AM, Gerd Hoffmann wrote:> On Mi, 2015-11-18 at 23:01 -0500, Sasha Levin wrote: >> On 11/18/2015 11:00 PM, Sasha Levin wrote: >>> 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. >> >> Err, *read*, obviously. >> >> I've never implemented that because the kernel doesn't try to do that (it doesn't >> make much sense, I think...). > > It doesn't make sense indeed (kvmtool still shouldn't segfault though), > and on a quick look I can't spot a place in seabios doing that ... > > It's reading ISR, as part of device reset, to make sure any pending > interrupts are cleared.That was indeed the ISR field. Fixing that makes seabios reach the same point as legacy virtio before failing. I don't see the original correspondence about seabios failures you've reported, if you want to forward them over we can look at it further. Thanks, Sasha
Hi,> That was indeed the ISR field. Fixing that makes seabios reach the same point as > legacy virtio before failing. > > I don't see the original correspondence about seabios failures you've reported, if > you want to forward them over we can look at it further.It was a few months back, when I posted the seabios patches for kvmtool to both seabios and kvm lists. Issue #1 is that kvmtool adds a bunch of kernel command line options, not only for stuff like rootfs configuration, but also to force specific things the kernel fails to autodetect (or to speedup boot by shortcutting hardware probing). Among them is "pci=conf1", without that the kernel doesn't find a pci bus and therefore also doesn't find the virtio-{blk,net} devices. So, when booting with seabios and let grub or another boot loader load the kernel from the guest disk image those kernel arguments are not there. Of course you can boot the image with qemu, add "pci=conf1" to grub.cfg (maybe others are required too, don't remember exactly), then try again with kvmtool. That gets the boot one step further and leads to ... Issue #2: virtio kernel drivers fail initialize the virtio devices. I suspect virtio device reset is not implemented properly and because of that the state of the device as left by seabios confuses the kernel driver. Didn't check that in detail though. cheers, Gerd