From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC1C4C433EF for ; Mon, 10 Jan 2022 20:39:01 +0000 (UTC) Received: from localhost ([::1]:51748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n71RU-0004NZ-DP for qemu-devel@archiver.kernel.org; Mon, 10 Jan 2022 15:39:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n71QL-0003T8-Px for qemu-devel@nongnu.org; Mon, 10 Jan 2022 15:37:53 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:52054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n71QJ-0000au-Pq for qemu-devel@nongnu.org; Mon, 10 Jan 2022 15:37:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 387A56140C; Mon, 10 Jan 2022 20:37:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A685C36AE9; Mon, 10 Jan 2022 20:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641847064; bh=RADN7OFmDxxRxsxVDQZe0XEsdt+4fI76bIEwA7D7LLQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QS8CAIY8jNxFKFnmad/W+tvEOA8xn2wAzKL7Ysh/QDK8auI2WgHmf9pI/c1jwAnKa mwQPqIAD91SvIXeMiIL55xAmFvNgU2vtcMpcFWcq7I9W9tZI3DM0I+zLsiADMyULOR bipWceqynHVTA5rx3kP9oVZLILXcd7iMuwE5xomynU7ZVD45TOC1JFbCbgR0a0sPew vi1E0gVXRyAJtt9Ns979/ouiUAet1zVGWUNxNaD8ScNxZUP5ldpQj2E0THVkRkZaqP /pu7C4WyZ1ym3cOSl7DbKRfiXvjockwHidHu5YDqDLuq3vYPTYqfwN4oMqAKbe8YCx Motwi0yIMWaSg== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n71QE-00HDd8-Iy; Mon, 10 Jan 2022 20:37:42 +0000 Date: Mon, 10 Jan 2022 20:37:43 +0000 Message-ID: <87zgo3xr6w.wl-maz@kernel.org> From: Marc Zyngier To: "Michael S. Tsirkin" Subject: Re: [PATCH] virtio-pci: fix up config interrupt handling In-Reply-To: <20220109173136.35848-1-mst@redhat.com> References: <20220109173136.35848-1-mst@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mst@redhat.com, qemu-devel@nongnu.org, vr_qemu@t-online.de, clg@kaod.org, lulu@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Received-SPF: pass client-ip=139.178.84.217; envelope-from=maz@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -76 X-Spam_score: -7.7 X-Spam_bar: ------- X-Spam_report: (-7.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.597, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Volker =?UTF-8?B?UsO8bWVsaW4=?= , qemu-devel@nongnu.org, Cindy Lu , =?UTF-8?B?Q8OpZHJpYw==?= Le Goater Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi Michael, On Sun, 09 Jan 2022 17:49:19 +0000, "Michael S. Tsirkin" wrote: > > Fixes a couple of issues with irqfd use by config interrupt: > - Rearrange initialization so cleanup happens in the reverse order > - Don't use irqfd for config when not in use for data path > I am not sure this is a complete fix though: I think we > are better off limiting the effect to vdpa devices > with config interrupt support. Or even bypass irqfd > for config completely and inject into KVM using ioctl? > The advantage would be less FDs used. > This would mean mostly reverting the patchset though. > > Fixes: d5d24d859c ("virtio-pci: add support for configure interrupt") > Cc: "Cindy Lu" > Signed-off-by: Michael S. Tsirkin This doesn't seem to fix the problems I'm seeing here with a KVM/arm64 guest (the issue exists with and without this patch) On initial boot: Loading Linux 5.7.0-1-arm64 ... Loading initial ramdisk ... qemu-system-aarch64: virtio-blk failed to set guest notifier (-16), ensure -accel kvm is set. qemu-system-aarch64: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). qemu-system-aarch64: virtio-scsi: Failed to set guest notifiers (-16), ensure -accel kvm is set. qemu-system-aarch64: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). The guest is functional though. However, on reboot: Loading Linux 5.7.0-1-arm64 ... Loading initial ramdisk ... qemu-system-aarch64: ../hw/pci/msix.c:622: msix_unset_vector_notifiers: Assertion `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier' failed. Reverting d5d24d859c fixes the issue. For the record, my qemu command line: /home/maz/qemu/build/qemu-system-aarch64 -m 1G -smp 8 -cpu host,aarch64=on -machine virt,accel=kvm,gic-version=host -nographic -drive if=pflash,format=raw,readonly=on,file=/usr/share/AAVMF/AAVMF_CODE.fd -drive if=pflash,format=raw,file=bullseye/bBwcgtDY2UwXklV6.fd -netdev user,id=hostnet0 -device virtio-net-pci,netdev=hostnet0 -drive if=none,format=raw,cache=none,aio=native,file=bullseye/bBwcgtDY2UwXklV6.img,id=disk0 -device virtio-blk-pci,drive=disk0 -drive file=debian-testing-arm64-netinst-preseed.iso,id=cdrom,if=none,media=cdrom -device virtio-scsi-pci -device scsi-cd,drive=cdrom Thanks, M. -- Without deviation from the norm, progress is not possible.