From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH kernel] vfio-pci: Mask INTx if a device is not capabable of enabling it Date: Wed, 20 Dec 2017 12:02:27 -0700 Message-ID: <20171220120227.365fb6fd@t450s.home> References: <20171207015654.5982-1-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Alexey Kardashevskiy Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43428 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755910AbdLTTC2 (ORCPT ); Wed, 20 Dec 2017 14:02:28 -0500 In-Reply-To: <20171207015654.5982-1-aik@ozlabs.ru> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 7 Dec 2017 12:56:54 +1100 Alexey Kardashevskiy wrote: > At the moment VFIO rightfully assumes that INTx is supported if > the interrupt pin is not set to zero in the device config space. > However if that is not the case (the pin is not zero but pdev->irq is), > vfio_intx_enable() fails. > > In order to prevent the userspace from trying to enable INTx when we know > that it cannot work, let's mask the PCI_INTERRUPT_PIN register. > > Signed-off-by: Alexey Kardashevskiy > --- > drivers/vfio/pci/vfio_pci.c | 3 +++ > 1 file changed, 3 insertions(+) Applied to v4.16/vfio. Thanks, Alex