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 33D66C433F5 for ; Mon, 31 Jan 2022 16:06:13 +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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SA9c0CppaEtKWlWGKsxdPah8h0FamAvQ5894kMhGVYg=; b=ZZ7yCBQzbaXyJ9 PS+3KhCwu8MfOGDqtbBae/ZHpx2+4cUxVdAZ8ruo2bQ1FA2XzbMEcftAFVySF5VCakMDBaocl61QQ YKoekR+GckY5XNV9DUTJ37f/NYKx4q3b5xq3MvcLgE/8QF3CkSjFBBh2MGH27LyDEMscXJAYIYH5z X4bRIWZ+WhfsIFPzIu6S5W9c7gh6M1TEbewRw2kjmXEHNS2J9Qk5s3f/HdGSifj3D35y8l7eU5Ws6 x3iKKsqMlJB+pvQyp6hjM4fRQg+8C0AuF0uEAIvZV13V3Cnv1nIa4a+EnS3ftvAbRLxaXLFCqjChF vowLEusqKz1atmVREyvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEZAZ-009lva-H0; Mon, 31 Jan 2022 16:04:43 +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 1nEZAV-009luz-KT for linux-arm-kernel@lists.infradead.org; Mon, 31 Jan 2022 16:04:41 +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 4224DB82B88 for ; Mon, 31 Jan 2022 16:04:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECA7CC36AE3 for ; Mon, 31 Jan 2022 16:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643645078; bh=wiO4ZRw1b6lmTh/6Zr4lNCCO143MzKfI73CvCo4t9g0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SfyzIaLYvZ1GzkTy9RzQBvuxR5GfEYEzaZ8z0I8a3ob1K/lOgqlxhlXD7RHh3yI1y ZGefZOhOp/ohNTJjHACGn/wGjgKgFjpKG66WHP+hKGiBpPxOq1XckVl7vssjzq1Oqh tVfE16c09bb0lfJkxHWLPVVvplfIz+25izc/Dk+zJE2j2sA79EndXQBxFyIKaY2cY7 F+sNpw47zj2b+jFzmG7WMYKzrqiAhZSVRKpFT2Bfw+VXAC7UMGXHYcWTx4mN4msZ5E mkS7OR3yGSe8SFcLp54LF/Wu1n8xA77ESKKcPHM/xPP1LmyRn8LlRyItKzBdcrTjnu J7o8K74rzDr9g== Received: by mail-wm1-f50.google.com with SMTP id k6-20020a05600c1c8600b003524656034cso6645658wms.2 for ; Mon, 31 Jan 2022 08:04:37 -0800 (PST) X-Gm-Message-State: AOAM5304niDa18D96lOC3bvbd/ABkssKbcFwVbZnFCyctEqAwFTPCj9j o10QNjTAZ2JtdFXkHW7pXmk3c0uTfo27s6/INW8= X-Google-Smtp-Source: ABdhPJyrC268GgYJ+693n0Flvtu/v6yIY2XkRh9X0P4iHuW1vA3wxV7WPlnD1Ke6ieXGc/oN7Kea0gsztKjxDpxWbh0= X-Received: by 2002:a05:600c:4248:: with SMTP id r8mr19183690wmm.56.1643645076306; Mon, 31 Jan 2022 08:04:36 -0800 (PST) MIME-Version: 1.0 References: <20220131160242.2665191-1-maz@kernel.org> In-Reply-To: <20220131160242.2665191-1-maz@kernel.org> From: Ard Biesheuvel Date: Mon, 31 Jan 2022 17:04:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH][kvmtool] virtio/pci: Signal INTx interrupts as level instead of edge To: Marc Zyngier Cc: kvmarm , Linux ARM , Andre Przywara , Alexandru Elisei , Android Kernel Team , Pierre Gondois , Sami Mujawar , Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_080439_967788_9E0B6605 X-CRM114-Status: GOOD ( 22.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 On Mon, 31 Jan 2022 at 17:03, Marc Zyngier wrote: > > 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 Acked-by: Ard Biesheuvel > --- > 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