Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1322734
| From | "Michael S. Tsirkin" <mst@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen |
| Date | 2016-01-31 21:20 +0100 |
| Message-ID | <qX6Dw-5f-13@gated-at.bofh.it> (permalink) |
| References | <qW78C-4lQ-5@gated-at.bofh.it> <qW78C-4lQ-7@gated-at.bofh.it> <qWeD8-1qJ-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jan 29, 2016 at 10:34:59AM +0000, David Vrabel wrote:
> On 29/01/16 02:31, Andy Lutomirski wrote:
> > Signed-off-by: Andy Lutomirski <luto@kernel.org>
> > ---
> > drivers/virtio/virtio_ring.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> > index c169c6444637..305c05cc249a 100644
> > --- a/drivers/virtio/virtio_ring.c
> > +++ b/drivers/virtio/virtio_ring.c
> > @@ -47,6 +47,18 @@
> >
> > static bool vring_use_dma_api(void)
> > {
> > +#if defined(CONFIG_X86) && defined(CONFIG_XEN)
> > + /*
> > + * In theory, it's possible to have a buggy QEMU-supposed
> > + * emulated Q35 IOMMU and Xen enabled at the same time. On
> > + * such a configuration, virtio has never worked and will
> > + * not work without an even larger kludge. Instead, enable
> > + * the DMA API if we're a Xen guest, which at least allows
> > + * all of the sensible Xen configurations to work correctly.
> > + */
> > + return static_cpu_has(X86_FEATURE_XENPV);
>
> You want:
>
> if (xen_domain())
> return true;
>
> Without the #if so we use the DMA API for all types of Xen guest on all
> architectures.
>
> David
I doubt HVM domains can have virtio devices.
--
MST
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 09/10] vring: Use the DMA API on Xen Andy Lutomirski <luto@kernel.org> - 2016-01-29 03:40 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen David Vrabel <david.vrabel@citrix.com> - 2016-01-29 11:40 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-31 21:20 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen Andy Lutomirski <luto@amacapital.net> - 2016-01-31 21:30 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen Andy Lutomirski <luto@amacapital.net> - 2016-01-31 21:20 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen "Michael S. Tsirkin" <mst@redhat.com> - 2016-01-31 21:20 +0100
Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen Wei Liu <wei.liu2@citrix.com> - 2016-02-01 22:30 +0100
csiph-web