]> git.baikalelectronics.ru Git - kernel.git/commit
xen/xenbus: add xenbus_setup_ring() service function
authorJuergen Gross <jgross@suse.com>
Thu, 28 Apr 2022 07:01:03 +0000 (09:01 +0200)
committerJuergen Gross <jgross@suse.com>
Thu, 19 May 2022 12:21:55 +0000 (14:21 +0200)
commit6c7a21d3b31210581ffd465bdbe9fdf999faf671
treed349d6a8581287ad96ceb2c563adc2ecc0ef4f5a
parente6062eba03736c798a21de656b77418de5b9df58
xen/xenbus: add xenbus_setup_ring() service function

Most PV device frontends share very similar code for setting up shared
ring buffers:

- allocate page(s)
- init the ring admin data
- give the backend access to the ring via grants

Tearing down the ring requires similar actions in all frontends again:

- remove grants
- free the page(s)

Provide service functions xenbus_setup_ring() and xenbus_teardown_ring()
for that purpose.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_client.c
include/xen/xenbus.h