From patchwork Tue Sep 22 23:00:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 54010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id EDD3822D91 for ; Tue, 22 Sep 2015 23:00:42 +0000 (UTC) Received: by lagj9 with SMTP id j9sf14254325lag.0 for ; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=jjj5ossZHJnvIM6BlUyR2q+lGAUn7TKZ+BJWmncAafA=; b=A+IZhXz5ytq9e7wbAYCd2qFUB4YLlOU6yDa4L9sGCFLcYrIJ0VAfG/g8xkDQSKEyQD lrRhhL2JSjN0pzoBHl+HIukNJn7n9biZbBEdQlIPZZ5sG0Ypb3flCIHyRUEJH/WkjeAd 4A6uH6zKNbvFEJ3jakeMTv31EwBcbpZHELNW4RJSFNCa7x1AAl4dGb0hUEpUtrxHPiKP 1vlIiBtI9ldOuK0N0RUIsASPZUCxpmVLPmWjpUTpJURu/lAYEJznItbUhnJWSASJ6mxI moaGbbO1DimxEXl54Qw8uw95fQK0HOf9CKUebGnIDXTW2Mt1725tKNouZQLpLIjRL2+R 9INQ== X-Gm-Message-State: ALoCoQmCpRVoxdmktih8ZQOdx61cCt9LqkOvsztO6NqJ+XPX0cwnj4RWe3aXD2DsiMUUjKCXzPWU X-Received: by 10.112.145.3 with SMTP id sq3mr4747277lbb.7.1442962841889; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.230 with SMTP id e6ls11522lah.66.gmail; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) X-Received: by 10.152.19.136 with SMTP id f8mr6787876lae.30.1442962841630; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id q140si1447940lfe.30.2015.09.22.16.00.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 16:00:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lahh2 with SMTP id h2so6844230lah.0 for ; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) X-Received: by 10.152.26.98 with SMTP id k2mr10261361lag.41.1442962841147; Tue, 22 Sep 2015 16:00:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp756978lbq; Tue, 22 Sep 2015 16:00:40 -0700 (PDT) X-Received: by 10.180.104.38 with SMTP id gb6mr216860wib.86.1442962839124; Tue, 22 Sep 2015 16:00:39 -0700 (PDT) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com. [209.85.212.171]) by mx.google.com with ESMTPS id gt4si7134576wib.57.2015.09.22.16.00.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 16:00:39 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.171 as permitted sender) client-ip=209.85.212.171; Received: by wicge5 with SMTP id ge5so183039391wic.0 for ; Tue, 22 Sep 2015 16:00:39 -0700 (PDT) X-Received: by 10.194.60.115 with SMTP id g19mr30785051wjr.29.1442962838959; Tue, 22 Sep 2015 16:00:38 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by smtp.gmail.com with ESMTPSA id qc4sm4127010wjc.33.2015.09.22.16.00.37 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Sep 2015 16:00:37 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com Cc: peter.maydell@linaro.org, patches@linaro.org, christoffer.dall@linaro.org Subject: [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS Date: Wed, 23 Sep 2015 00:00:30 +0100 Message-Id: <1442962830-7437-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1442962830-7437-1-git-send-email-eric.auger@linaro.org> References: <1442962830-7437-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In irqfd mode, current code attempts to set a resamplefd whatever the type of the IRQ. For an edge-sensitive IRQ this attempt fails and as a consequence the whole irqfd setup fails and we fall back to the slow mode. This patch bypasses the resamplefd setting for non level-sentive IRQs. Signed-off-by: Eric Auger --- hw/vfio/platform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 38eaccf..2c91650 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -352,6 +352,10 @@ static int vfio_set_resample_eventfd(VFIOINTp *intp) int argsz, ret; int32_t *pfd; + if (!(intp->flags & VFIO_IRQ_INFO_AUTOMASKED)) { + return 0; + } + argsz = sizeof(*irq_set) + sizeof(*pfd); irq_set = g_malloc0(argsz); irq_set->argsz = argsz;