Index | Thread | Search

From:
Stefan Fritsch <sf@sfritsch.de>
Subject:
Re: iavf: panic on QEMU with i440fx chipset emulation
To:
YASUOKA Masahiko <yasuoka@openbsd.org>, naito.yuichiro@gmail.com, kettenis@openbsd.org
Cc:
tech@openbsd.org
Date:
Sat, 5 Oct 2024 12:59:23 +0200

Download raw body.

Thread
Am 04.10.24 um 10:19 schrieb YASUOKA Masahiko:
> On Wed, 25 Sep 2024 11:42:02 +0900 (JST)
> Yuichiro NAITO <naito.yuichiro@gmail.com> wrote:
>> Hi, While I'm testing iavf(4) on Linux QEMU with i440fx chipset emulation,
>> I had the following panic message on my OpenBSD current build.
>> I440fx is the default chipset emulation of QEMU. I know q35 chipset
>> emulation is required for msix interrupts. But if users forget to select it,
>> I tested what happens on the default chipset emulation.
> 
> I think the root problem is this i440fx situation.
> 
> The driver assumes the device works with msix.  The physical device is
> connected on PCI-E bus and msix is usable of cource.  Since QEMU is
> doing PCI-passthrough the device to the guest, I think QEMU should
> configure a PCI bus which support msxi for the guest.  But actually
> msix is not usable on OpenBSD guest.
> 
> On FreeBSD, it seems to work around this problem by PCI_QUIRK_ENABLE_MSI_VM
> 
>    https://github.com/freebsd/freebsd-src/blob/release/14.1.0/sys/dev/pci/pci.c#L279-L283
> 
> I think this kind of quirk is needed for us.
> What do you think?

virtio_pci sets PCI_FLAGS_MSI_ENABLED explicitly on i386/amd64 to work 
around the problem. I think it would make sense to have some quirk in 
generic code so that other drivers profit as well. The sub-system vendor 
id of the pci host bridge is qumranet on qemu, that could be used to 
detect the situation.