selected mode.
* For a PVH dom0, the hardware must have VT-x/SVM extensions available.
-* The `shadow` boolean is only applicable when dom0 is constructed as a PVH
- guest, and controls whether dom0 uses hardware assisted paging, or shadow
- paging. The default is HAP when available, and shadow otherwise.
+* The `shadow` boolean allows dom0 to be explicitly constructed using shadow
+ paging. This option is unavailable when `CONFIG_SHADOW_PAGING` is
+ disabled.
- This option is unavailable when `CONFIG_SHADOW_PAGING` is disabled. Such
- builds of Xen require HAP-capable hardware to use a PVH dom0.
+ For PVH, dom0 defaults to using HAP on capable hardware, and falls back to
+ shadow paging otherwise. A PVH dom0 cannot be used if Xen is compiled
+ without shadow paging support, and the hardware lacks HAP support.
+
+ For PV, the use of dom0 shadow mode is only for development purposes. PV
+ guests do no require any paging support by default.
* The `verbose` boolean is intended for diagnostics, and prints out extra
information during the dom0 build. It defaults to false.
process_pending_softirqs();
-#ifdef CONFIG_SHADOW_PAGING
- if ( opt_dom0_shadow && !dom0_pvh )
- {
- opt_dom0_shadow = false;
- printk(XENLOG_WARNING "Shadow Dom0 requires PVH. Option ignored.\n");
- }
-#endif
-
if ( is_hvm_domain(d) )
rc = dom0_construct_pvh(d, image, image_headroom, initrd, cmdline);
else if ( is_pv_domain(d) )
if ( d->domain_id == hardware_domid )
iommu_hwdom_init(d);
+ /* Activate shadow mode, if requested. Reuse the pv_l1tf tasklet. */
+#ifdef CONFIG_SHADOW_PAGING
+ if ( opt_dom0_shadow )
+ {
+ printk("Switching dom0 to using shadow paging\n");
+ tasklet_schedule(&d->arch.paging.shadow.pv_l1tf_tasklet);
+ }
+#endif
+
v->is_initialised = 1;
clear_bit(_VPF_down, &v->pause_flags);