From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: [PATCH v5 10/10] vring: Add a module parameter to force-enable the DMA API Date: Thu, 28 Jan 2016 18:31:23 -0800 Message-ID: <76b6105e15c27c669cffc665e3a074c5cb3d5e16.1454034075.git.luto__28306.7286982716$1454034783$gmane$org@kernel.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aOyqn-0001BA-EY for xen-devel@lists.xenproject.org; Fri, 29 Jan 2016 02:31:53 +0000 In-Reply-To: In-Reply-To: References: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Michael S. Tsirkin" Cc: Cornelia Huck , Joerg Roedel , KVM , linux-s390 , Benjamin Herrenschmidt , Stefano Stabellini , Sebastian Ott , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Christian Borntraeger , David Vrabel , Andy Lutomirski , xen-devel@lists.xenproject.org, sparclinux@vger.kernel.org, Paolo Bonzini , Linux Virtualization , David Woodhouse , "David S. Miller" , Martin Schwidefsky List-Id: xen-devel@lists.xenproject.org This will be useful for testing. Signed-off-by: Andy Lutomirski --- drivers/virtio/virtio_ring.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 305c05cc249a..46fb77d824e9 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -45,6 +45,10 @@ * API. */ +static bool force_dma_api = false; +module_param(force_dma_api, bool, 0644); +MODULE_PARM_DESC(force_dma_api, "force-enable the DMA API"); + static bool vring_use_dma_api(void) { #if defined(CONFIG_X86) && defined(CONFIG_XEN) @@ -59,7 +63,7 @@ static bool vring_use_dma_api(void) return static_cpu_has(X86_FEATURE_XENPV); #endif - return false; + return force_dma_api; } #ifdef DEBUG -- 2.5.0