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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B063C43441 for ; Tue, 27 Nov 2018 18:13:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CD472145D for ; Tue, 27 Nov 2018 18:13:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CD472145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-pci-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728951AbeK1FMV (ORCPT ); Wed, 28 Nov 2018 00:12:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56410 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725752AbeK1FMV (ORCPT ); Wed, 28 Nov 2018 00:12:21 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97C2176545; Tue, 27 Nov 2018 18:13:37 +0000 (UTC) Received: from redhat.com (ovpn-116-85.ams2.redhat.com [10.36.116.85]) by smtp.corp.redhat.com (Postfix) with SMTP id 363C95C5BB; Tue, 27 Nov 2018 18:13:25 +0000 (UTC) Date: Tue, 27 Nov 2018 13:13:24 -0500 From: "Michael S. Tsirkin" To: Jean-Philippe Brucker Cc: mark.rutland@arm.com, virtio-dev@lists.oasis-open.org, lorenzo.pieralisi@arm.com, tnowicki@caviumnetworks.com, devicetree@vger.kernel.org, marc.zyngier@arm.com, linux-pci@vger.kernel.org, joro@8bytes.org, will.deacon@arm.com, virtualization@lists.linux-foundation.org, eric.auger@redhat.com, iommu@lists.linux-foundation.org, robh+dt@kernel.org, bhelgaas@google.com, robin.murphy@arm.com, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v5 5/7] iommu: Add virtio-iommu driver Message-ID: <20181127131116-mutt-send-email-mst@kernel.org> References: <20181122193801.50510-1-jean-philippe.brucker@arm.com> <20181122193801.50510-6-jean-philippe.brucker@arm.com> <20181123165742-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 27 Nov 2018 18:13:38 +0000 (UTC) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Tue, Nov 27, 2018 at 05:50:50PM +0000, Jean-Philippe Brucker wrote: > > I didn't notice this in the past but it seems this will spin > > with interrupts disabled until host handles the request. > > Please do not do this - host execution can be another > > task that needs the same host CPU. This will then disable > > interrupts for a very very long time. > > In the guest yes, but that doesn't prevent the host from running another > task right? My tests run fine when QEMU is bound to a single CPU, even > though vcpu and viommu run in different threads So a kind of a solution is to add a config space field for sync. That at least can give host a hint that yes, vcpu is stopped now and it should do something else. Not ideal but better than polling VQ forever. -- MST