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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4FFCCC433F5 for ; Mon, 31 Jan 2022 16:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ab1KaXR4Cv70N9gKtdWgIQ3IaqyxfWkcDN6w1kPGttQ=; b=c+KY/8t1dZfvdT +WaQYseg8pqtW6omlcidLxFe7LVQ+BvPyf9GK6sY9gWKfp1AUD+u0NSvSrAn9oCo/JK+R5f4lVveR r6dsVJdjbfYNoUiVmYr5xZPKQEIk577eBJF7aM+a+9CH8CnYVMoM3t5gDKF5lhN+dBuq9NrEsjarY VO9FwTE1cudOpdfWx549OIQuf/RCW+uresPSVn7ur91mIk0XgneAPD4664BcomhmfT/lAobklMm6f puyM98QyEcmkGVhA21UkfQ04uxX1CL1CQrXICy/1vyTEgw5EbpK+ajX3Xa4RPrpGok//RMvY6km9u jvgFMmpP4MMF+gdN/Orw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEZ8z-009lgE-Uo; Mon, 31 Jan 2022 16:03:06 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEZ8x-009lfi-4e for linux-arm-kernel@lists.infradead.org; Mon, 31 Jan 2022 16:03:04 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 3D494B82668; Mon, 31 Jan 2022 16:03:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14FE5C340E8; Mon, 31 Jan 2022 16:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643644980; bh=WoxKeHTwQ49xXf3+LWiIiOVqL9WBTWW3q4jucXTeYB4=; h=From:To:Cc:Subject:Date:From; b=Ngp3YT2ev54nhGOOoe0eRt6dKNtZHZXARqXlgwRzvuKa6tBoKRonFW1Lzd0Ctol3J YPCZzYZjoUnCscpvPnwxythGzbBv81SaWOqW8n7DBekxwtyqJAex4QV4rR61fOIiwt x5Kl4sh1+dCI4RcpU/mlJ0heP979aJnN0v4/Brm4HqyEjMDOkzOlcl6VcRqYERl1PO tqQk86OvC836SThNR4nCphHahYATMpfGdiM7Q2PXprk4/1otxeiszZs+BYuRF2KZin XapZichuVEq/jrlRe0jlrRXZjoCIcBxDWYis4ayVMRu0hjgm6IqodaV0g0uP4kT1Lh W8uSGLCRMqvGw== Received: from sofa.misterjones.org ([185.219.108.64] helo=hot-poop.lan) 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 1nEZ8s-004OWD-1n; Mon, 31 Jan 2022 16:02:58 +0000 From: Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: Andre Przywara , Alexandru Elisei , kernel-team@android.com, Pierre Gondois , Ard Biesheuvel , Sami Mujawar , Will Deacon Subject: [PATCH][kvmtool] virtio/pci: Signal INTx interrupts as level instead of edge Date: Mon, 31 Jan 2022 16:02:42 +0000 Message-Id: <20220131160242.2665191-1-maz@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com, alexandru.elisei@arm.com, kernel-team@android.com, pierre.gondois@arm.com, ardb@kernel.org, sami.mujawar@arm.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_080303_364704_F0565073 X-CRM114-Status: GOOD ( 15.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It appears that the way INTx is emulated is "slightly" out of spec in kvmtool. We happily inject an edge interrupt, even if the spec mandates a level. This doesn't change much for either the guest or userspace (only KVM will have a bit more work tracking the EOI), but at least this is correct. Reported-by: Pierre Gondois Signed-off-by: Marc Zyngier Cc: Ard Biesheuvel Cc: Sami Mujawar Cc: Will Deacon --- pci.c | 2 +- virtio/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pci.c b/pci.c index e5930331..a769ae27 100644 --- a/pci.c +++ b/pci.c @@ -61,7 +61,7 @@ int pci__assign_irq(struct pci_device_header *pci_hdr) pci_hdr->irq_line = irq__alloc_line(); if (!pci_hdr->irq_type) - pci_hdr->irq_type = IRQ_TYPE_EDGE_RISING; + pci_hdr->irq_type = IRQ_TYPE_LEVEL_HIGH; return pci_hdr->irq_line; } diff --git a/virtio/pci.c b/virtio/pci.c index 41085291..2777d1c8 100644 --- a/virtio/pci.c +++ b/virtio/pci.c @@ -413,7 +413,7 @@ int virtio_pci__signal_vq(struct kvm *kvm, struct virtio_device *vdev, u32 vq) kvm__irq_trigger(kvm, vpci->gsis[vq]); } else { vpci->isr = VIRTIO_IRQ_HIGH; - kvm__irq_trigger(kvm, vpci->legacy_irq_line); + kvm__irq_line(kvm, vpci->legacy_irq_line, VIRTIO_IRQ_HIGH); } return 0; } -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel