From: Ján Tomko Date: Thu, 5 Feb 2015 14:26:03 +0000 (+0100) Subject: Add VIR_CONNECT_BASELINE_CPU_MIGRATABLE flag X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=02c8b66d6a0cab527a6158c2ebad663897cb0d84;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git Add VIR_CONNECT_BASELINE_CPU_MIGRATABLE flag This flag for virConnectBaselineCPU will allow filtering out CPU features that block migration from the result. https://bugzilla.redhat.com/show_bug.cgi?id=1171484 --- diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index f760a5529..77058af69 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -862,6 +862,7 @@ int virConnectGetCPUModelNames(virConnectPtr conn, */ typedef enum { VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES = (1 << 0), /* show all features */ + VIR_CONNECT_BASELINE_CPU_MIGRATABLE = (1 << 1), /* filter out non-migratable features */ } virConnectBaselineCPUFlags; char *virConnectBaselineCPU(virConnectPtr conn, diff --git a/src/libvirt-host.c b/src/libvirt-host.c index 78ee77093..b4dc13e90 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c @@ -1052,6 +1052,9 @@ virConnectGetCPUModelNames(virConnectPtr conn, const char *arch, char ***models, * without this flag features that are part of the CPU model will not be * listed. * + * If @flags includes VIR_CONNECT_BASELINE_CPU_MIGRATABLE, the resulting + * CPU will not include features that block migration. + * * Returns XML description of the computed CPU (caller frees) or NULL on error. */ char *