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

Re: [Xen-devel] Paravitrualization drivers query




On 07/21/2017 03:12 PM, shishir tiwari wrote:
> 
>     > Hi
>     >
>     > I am trying understand Xen Pv drivers and i writing my own pv fronend 
> and
>     > backend driver.
>     >
>     > 1. For driver internal communication how do i create/write node in 
> backend
>     > driver and how to read in fronted drivers.
>     > 2.how do i create one shared page in backend driver to write/read data 
> in
>     > frontend driver.
>     >
> 
>     >Depending on where your driver lives >(kernel or userspace), the APIs are
>     >going to be different.
> 
> 
> My driver will be in kernel space. I want to create some Node and shared page 
> or
> queue. So I can transfer data for domu to dom0. 

Hi Shishir

I suggest you read about drivers/net/xen-netfront.c and
drivers/net/xen-netback/* in linux kernel.

You would rely on xenbus/xenstore to read/write node in frontend or backend and
the corresponding APIs are xenbus_write, xenbus_printf, xenbus_read, etc.

To create shared page between frontend and backend, you create use grant tale
mechanism. Generally, each grant table reference is used to indicate one shared
memory page. The frontend allocates a page to share and bind this page to a
grant table reference. This reference is then passed to backend via xenstore or
ring buffer. Backend maps the shared page with this reference via APIs like
gnttab_map_refs().

I suggest you read about the book "Definitive Guide to Xen Hypervisor" and read
about linux paravirtual driver code.

Dongli Zhang

> 
> 
>     > I gone-through kernel code and but its tittle bit confusing to me.
> 
>     >>Which bits do you find confusing?
> 
> 
> I am not able to understand who first create Node and shared memory by xen or
> domO or may be by frontend drivers
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> https://lists.xen.org/xen-devel
> 

_______________________________________________
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®.