aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_hvm_build.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxc/xc_hvm_build.c')
-rw-r--r--tools/libxc/xc_hvm_build.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/libxc/xc_hvm_build.c b/tools/libxc/xc_hvm_build.c
index d4799abc87..173c6733ee 100644
--- a/tools/libxc/xc_hvm_build.c
+++ b/tools/libxc/xc_hvm_build.c
@@ -396,6 +396,19 @@ static int xc_hvm_build_internal(int xc_handle,
goto error_out;
}
+ /* HVM domains must be put into shadow2 mode at the start of day */
+ if ( xc_shadow_control(xc_handle, domid, DOM0_SHADOW2_CONTROL_OP_ENABLE,
+ NULL, 0, NULL,
+ DOM0_SHADOW2_CONTROL_FLAG_ENABLE
+ | DOM0_SHADOW2_CONTROL_FLAG_REFCOUNT
+ | DOM0_SHADOW2_CONTROL_FLAG_TRANSLATE
+ | DOM0_SHADOW2_CONTROL_FLAG_EXTERNAL,
+ NULL) )
+ {
+ PERROR("Could not enable shadow paging for domain.\n");
+ goto error_out;
+ }
+
memset(ctxt, 0, sizeof(*ctxt));
ctxt->flags = VGCF_HVM_GUEST;