From 02c8b66d6a0cab527a6158c2ebad663897cb0d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 5 Feb 2015 15:26:03 +0100 Subject: [PATCH] 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 --- include/libvirt/libvirt-host.h | 1 + src/libvirt-host.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index f760a5529e..77058af694 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 78ee770938..b4dc13e90c 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 *