From b5e397a79ec874d9739e096f5e27a912d857a0ec Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Fri, 22 Sep 2017 14:07:24 +0200 Subject: 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 Acked-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- include/hw/xen/xen_backend.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h index 8a6fbcb..3a27692 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; -- cgit v1.1