mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
325a084c1e
commit
b5e397a79e
3 changed files with 18 additions and 12 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue