[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] PV audio drivers for Linux


  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: "Ughreja, Rakesh A" <rakesh.a.ughreja@xxxxxxxxx>
  • Date: Tue, 17 Jan 2017 18:01:30 +0000
  • Accept-language: en-US
  • Delivery-date: Tue, 17 Jan 2017 18:02:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AdJw6Wn+KQN/3rPNS9u4qvDxTiHmSg==
  • Thread-topic: PV audio drivers for Linux

Hi,

I am trying to develop PV audio drivers and facing one issue to 
achieve zero copy of the buffers between Front End (DOM1) and 
Back End (DOM0) drivers.

When the buffer is allocated using __get_free_pages() on the DOM0 
OS, I am able to grant the access using gnttab_grant_foreign_access() 
to DOM1 as well as I am able to map it in the DOM1 virtual space 
using xenbus_map_ring_valloc().

However the existing audio driver allocates buffer using 
dma_alloc_coherent(). In that case I am able to grant the access using 
gnttab_grant_foreign_access() to DOM1 but when I try to map in the 
DOM1 virtual space using xenbus_map_ring_valloc(), it returns an error.

[1] Code returns from here.

507                         xenbus_dev_fatal(dev, map[i].status,
508                                          "mapping in shared page %d from 
domain %d",
509                                          gnt_refs[i], dev->otherend_id);

gnttab_batch_map(map, i) is unable to map the page, but I am unable to 
understand why. May be its due to the difference in the way buffers
are allocated dma_alloc_coherent() vs __get_free_pages().

Since I don't want to touch existing audio driver, I need to figure out 
how to map buffer to DOM1 space with dma_alloc_coherent().

Any pointers would be really helpful. Thank you in advance.

Regards,
Rakesh

[1] http://lxr.free-electrons.com/source/drivers/xen/xenbus/xenbus_client.c#L469


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.