Commit Graph

5 Commits

Author SHA1 Message Date
Joao Martins
17322e5518 libxl: describe host cpu features based on hwcaps
Parse libxl_hwcap accounting for versions since Xen 4.4 - Xen 4.7.
libxl_hwcaps is a set of cpuid leaves output that is described in [0] or
[1] in Xen 4.7. This is a collection of CPUID leaves that we version
in libvirt whenever feature words are reordered or added. Thus we keep the
common ones in one struct and others for each version. Since
libxl_hwcaps doesn't appear to have a stable format across all supported
versions thus we need to keep track of changes as a compromise until it's
exported in xen libxl API. We don't fail in initializing the driver in case
parsing of hwcaps failed for that reason. In addition, change the notation
on PAE feature such that is easier to read which bit it corresponds.

[0] xen/include/asm-x86/cpufeature.h
[1] xen/include/public/arch-x86/cpufeatureset.h

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
2016-09-12 12:49:03 +02:00
Joao Martins
3d54305e1c libxl: describe host topology in capabilities
Add support for describing cpu topology in host cpu element.  In doing
so, refactor hwcaps part to its own helper namely libxlCapsInitCPU to
handle all host cpu related operations, including topology.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
2016-09-12 12:49:03 +02:00
Jim Fehlig
8bab1e7c05 libxl: add USB to hostdev domcapabilities
Commit 2a58ed0b added support for creating guests with USB
hostdevs. Commit fc21d10 later added support for hotplut of
USB hostdevs. Advertise support for USB hostdevs in the
domcapabilities.

In addition add the appropriate caps for USB support on
domaincapstest when libvirt is built on a Xen with
LIBXL_HAVE_PVUSB. Otherwise domaincapstest would fail i.e.
testing the wrong domain capabilities.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
2016-06-17 14:25:02 -06:00
Jim Fehlig
11567cf66f libxl: implement connectGetDomainCapabilities
Add domain capabilities for PV and HVM domains.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2016-06-13 14:13:17 -06:00
Jim Fehlig
cb110a67e3 libxl: introduce libxl_capabilities.{ch}
Move capabilities code out of libxl_conf.{ch} and into new
libxl_capabilities.{ch} files.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2016-06-13 14:13:16 -06:00