[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <76b6105e15c27c669cffc665e3a074c5cb3d5e16.1454034075.git.luto@kernel.org>
Date: Thu, 28 Jan 2016 18:31:23 -0800
From: Andy Lutomirski <luto@...nel.org>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
David Woodhouse <dwmw2@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, Joerg Roedel <jroedel@...e.de>,
Christian Borntraeger <borntraeger@...ibm.com>,
Cornelia Huck <cornelia.huck@...ibm.com>,
Sebastian Ott <sebott@...ux.vnet.ibm.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Christoph Hellwig <hch@....de>, KVM <kvm@...r.kernel.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux-s390 <linux-s390@...r.kernel.org>,
Linux Virtualization <virtualization@...ts.linux-foundation.org>,
David Vrabel <david.vrabel@...rix.com>,
Stefano Stabellini <stefano.stabellini@...citrix.com>,
xen-devel@...ts.xenproject.org, Andy Lutomirski <luto@...nel.org>
Subject: [PATCH v5 10/10] vring: Add a module parameter to force-enable the DMA API
This will be useful for testing.
Signed-off-by: Andy Lutomirski <luto@...nel.org>
---
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
Powered by blists - more mailing lists