From 6b47c2aa780c98cea7a39cbe36c30d3923e5163e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 15 Sep 2017 17:51:52 +0100 Subject: xen: destroy_hvm_domain: Try xendevicemodel_shutdown xc_interface_open etc. is not going to work if we have dropped privilege, but xendevicemodel_shutdown will if everything is new enough. xendevicemodel_shutdown is only availabe in Xen 4.10 and later, so provide a stub for earlier versions. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- include/hw/xen/xen_common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h index 60c4ebb..4bd30a3 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -108,6 +108,13 @@ static inline int xentoolcore_restrict_all(domid_t domid) return -1; } +static inline int xendevicemodel_shutdown(xendevicemodel_handle *dmod, + domid_t domid, unsigned int reason) +{ + errno = ENOTTY; + return -1; +} + #else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 41000 */ #include -- cgit v1.1