summaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2018-06-08 10:40:38 +0200
committerJuergen Gross <jgross@suse.com>2018-06-19 13:51:00 +0200
commit1fe83888a2b776c204cb06629700adfb8e9cc123 (patch)
tree3d7ad3e848fceb53b69bc727af09b03839520af0 /include/xen
parent7f47e1c52d0c850cbd24aab763ce6bab11bdb4b2 (diff)
downloadlinux-1fe83888a2b776c204cb06629700adfb8e9cc123.tar.gz
linux-1fe83888a2b776c204cb06629700adfb8e9cc123.tar.bz2
linux-1fe83888a2b776c204cb06629700adfb8e9cc123.zip
xen: share start flags between PV and PVH
Use a global variable to store the start flags for both PV and PVH. This allows the xen_initial_domain macro to work properly on PVH. Note that ARM is also switched to use the new variable. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/xen.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/xen/xen.h b/include/xen/xen.h
index 9d4340c907d1..1e1d9bd0bd37 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -25,12 +25,16 @@ extern bool xen_pvh;
#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
#define xen_pvh_domain() (xen_pvh)
+#include <linux/types.h>
+
+extern uint32_t xen_start_flags;
+
#ifdef CONFIG_XEN_DOM0
#include <xen/interface/xen.h>
#include <asm/xen/hypervisor.h>
#define xen_initial_domain() (xen_domain() && \
- xen_start_info && xen_start_info->flags & SIF_INITDOMAIN)
+ (xen_start_flags & SIF_INITDOMAIN))
#else /* !CONFIG_XEN_DOM0 */
#define xen_initial_domain() (0)
#endif /* CONFIG_XEN_DOM0 */