
On Wed, Mar 08, 2017 at 03:07:12PM +0100, Wim Ten Have wrote:
From: Wim ten Have <wim.ten.have@oracle.com>
This patch enhances host-passthrough capability to advertise the required vendor CPU virtualization feature which will be used to enable 'nestedhvm' in the libxl driver.
For Intel virtualization (VT-x) .. <cpu mode='host-passthrough'> <feature policy='require' name='vmx'/> </cpu>
For AMD virtualization (AMD-V) .. <cpu mode='host-passthrough'> <feature policy='require' name='svm'/> </cpu>
If using host-passthrough or host-model, and the host's CPU includes vmx or svm, then I would expecte nested-HVM to be enabled, without needing any extra <feature> flag in the XML. That would match the semantics used with the QEMU driver. The only time we would need to use <feature> is if using mode=custom along with a named CPU model which lacks vmx/svm flags. BTW, I wonder how hard it would be to wire up the libxl driver to use the CPU model infrastructure in src/cpu ? It feels a little odd to use XML <cpu mode='host-passthrough'/> if we're not then making sure it actually uses host-passthrough when configuring the guest. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|