diff options
author | Juergen Gross <jgross@suse.com> | 2017-09-22 14:07:24 +0200 |
---|---|---|
committer | Stefano Stabellini <sstabellini@kernel.org> | 2017-10-26 14:23:06 -0700 |
commit | b5e397a79ec874d9739e096f5e27a912d857a0ec (patch) | |
tree | 21ccdd964b623fecce512bf29fa613a46f2b687f /include | |
parent | 325a084c1ebccb265a3c8f1dd092ffbbfb448a00 (diff) |
xen: add a global indicator for grant copy being available
The Xen qdisk backend needs to test whether grant copy operations is
available in the kernel. Unfortunately this collides with using
xengnttab_set_max_grants() on some kernels as this operation has to
be the first one after opening the gnttab device.
In order to solve this problem test for the availability of grant copy
in xen_be_init() opening the gnttab device just for that purpose and
closing it again afterwards. Advertise the availability via a global
flag and use that flag in the qdisk backend.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/xen/xen_backend.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h index 8a6fbcbe20..3a27692407 100644 --- a/include/hw/xen/xen_backend.h +++ b/include/hw/xen/xen_backend.h @@ -16,6 +16,7 @@ /* variables */ extern struct xs_handle *xenstore; extern const char *xen_protocol; +extern bool xen_feature_grant_copy; extern DeviceState *xen_sysdev; extern BusState *xen_sysbus; |