I'm looking into a bug where a libvirt-created xen HVM guest boots
*very* slowly on an EPT-enabled machine, particularly when the guest has
a dedicated PCI device.

xen-unstable c/s 16931 [1] introduced a per-guest HAP (hardware assisted
paging) setting.  Unfortunately, the sane default of hap=1 is done by xm
client tool instead of xend, so an HVM guest created with xm tool
(hap=1) boots as expected but takes much longer when created through
libvirt (hap=0).

Should libvirt expose this feature in domain XML?  Should it be possible
to enable/disable hardware assisted paging on a per-guest level with
libvirt?  If so, where does such a setting belong?  It seems analogous
to enabling/disabling PAE and as such belongs under hypervisor
features.  On IRC, Eric suggested it might fall under memoryBacking like
huge page support in KVM.

If folks feel this setting should not be exposed, it could be
unconditionally set in the xen driver for HVM guests, similar to the way
usb setting is currently handled (see attached patch).  Note that the
xen domain builder will ignore this setting on hardware without the feature.

Thanks for your comments.
Jim

[1] http://xenbits.xensource.com/xen-unstable.hg?rev/98c2665056ea
Index: libvirt-0.7.6/src/xen/xend_internal.c
===================================================================
--- libvirt-0.7.6.orig/src/xen/xend_internal.c
+++ libvirt-0.7.6/src/xen/xend_internal.c
@@ -6082,6 +6082,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
             if (def->features & (1 << VIR_DOMAIN_FEATURE_PAE))
                 virBufferAddLit(&buf, "(pae 1)");
 
+            virBufferAddLit(&buf, "(hap 1)");
             virBufferAddLit(&buf, "(usb 1)");
 
             for (i = 0 ; i < def->ninputs ; i++)
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to