Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1290002imm; Wed, 19 Sep 2018 15:52:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaCAR31iKdCqc2Mc8CQs2eGEkeesbj8zqpfmATZG0PqALPu/rDYD4/PYB2CHrXI/Rf9XPzo X-Received: by 2002:a62:3306:: with SMTP id z6-v6mr37860812pfz.85.1537397523098; Wed, 19 Sep 2018 15:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537397523; cv=none; d=google.com; s=arc-20160816; b=E48zQV69eWdzNX581vpFJNuNzLB+KZ3hmmJ2QRsBXQeqWf72akBz7NuKVcFeOBB9rp aP2Mq6SGPChBy/5BMCses4w26fQQpjow5WnviJsUzxvZvZ0i14fuCQYEAA9+tdSy4qio hBiPJgi/6x0bO2gA8u1Pdvh8rtai/9peLXJMbEfg62cebSFzIxXF3hpfj3ArNRyYkVvs xMf+BG6Em7MFit4SUhbOYsk86x+pxlpXqh/rUico8n5MBcG8YufYq2Mr5HRjacja+C0N zZH6EuUrkmFxtNMuYvJDj8pxREiQbTD29Jeg2+39q264KO5t1Dt814sW4NaEIGSmJ/u6 kuiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=zNs2q30yHkVzk6STS80dMA47P9emhcdQoRBU5FpOKs0=; b=nAvlRPs/fb+WGHyAzvSmTRJiWuw+aO59vexMKpsvQiFgzZg0MAl2nInWAzOs2KbB/J jIVTaKrT1JtKPXuOSyoNOi4vwTkYHZYeOJJ6t5Y/T2l4sY90Tag9wCYNqYS9JCa3AsIt IAwNJGyB+dW5i4w0mkPcKLzFVkLRaCFH1oZ95CWyBqcpb2sCOK+eIES9kg0bJXpld0Af SzIvwA1QZuZoFZYqChHYl56tXwFD4CaYs9DzHJu82DxTbEiKlhIZVmXxCWG10D2DsvBk 912Y2CQH1L5x0n3AB2YN99d1yVi3prFJuqzIVG1MaJO2f5Z0CsV90vrkFsdmIpVg++VK 6zUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24-v6si21983037pge.28.2018.09.19.15.51.47; Wed, 19 Sep 2018 15:52:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733173AbeITE1u (ORCPT + 99 others); Thu, 20 Sep 2018 00:27:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47706 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725755AbeITE1t (ORCPT ); Thu, 20 Sep 2018 00:27:49 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B12E73082A27; Wed, 19 Sep 2018 22:47:42 +0000 (UTC) Received: from t450s.home (ovpn-116-77.phx2.redhat.com [10.3.116.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE9832CFC6; Wed, 19 Sep 2018 22:47:41 +0000 (UTC) Date: Wed, 19 Sep 2018 16:47:41 -0600 From: Alex Williamson To: "Eads, Gage" Cc: "Raj, Ashok" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , Joerg Roedel , Bjorn Helgaas , "Alan Cox" Subject: Re: [PATCH] vfio/pci: Some buggy virtual functions incorrectly report 1 for intx. Message-ID: <20180919164741.76fbcc88@t450s.home> In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E44721113@fmsmsx101.amr.corp.intel.com> References: <1533843426-79170-1-git-send-email-ashok.raj@intel.com> <20180809134417.50de7fe7@t450s.home> <20180912174618.GA19551@araj-mobl1.jf.intel.com> <20180918215957.0d155684@t450s.home> <20180919194617.GA14924@otc-nc-03> <9184057F7FC11744A2107296B6B8EB1E44721113@fmsmsx101.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 19 Sep 2018 22:47:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Sep 2018 22:25:03 +0000 "Eads, Gage" wrote: > > This looks good and also addresses Alan's concern that don't > > silently hide under the rug for all devices. We'll also queue it > > for testing just to confirm and keep you posted. > > > > Reviewed-by: Ashok Raj > > > > Hi Alex, > > I've confirmed that the patch works as intended for the 8086:270c > device, and negative tested the warning by commenting out the > device's entry in known_bogus_vf_intx_pin. > > For what it's worth, my positive test case - launching a QEMU VM with > a VFIO-owned 0x270c device - did not trigger the warning. This is > because the change to vfio_pci_config.c caused QEMU to read a > PCI_INTERRUPT_PIN value of 0, and so didn't execute a codepath that > calls vfio_pci_get_irq_count(). Instead, I used a simple C program > that calls the VFIO_DEVICE_GET_IRQ_INFO ioctl for negative testing. > > Also, there's one typo in the comment: 'quite' -> 'quiet' > > Tested-by: Gage Eads Thanks for the thorough testing, Gage! So it sounds like we're not quite generating the desired result. We'd really like QEMU, as the predominant userspace driver for VFIO, to generate the warning, otherwise there's hardly any purpose to having it. That suggests I should have put the warning where the config space emulation is setup rather than the irq count path. Thanks, Alex