mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
Introduce VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag
With this new flag virConnectHypervisorBaselineCPU can be used on any host (rather than being limited to hosts described by individual CPUs passed to the API). Using the flag makes the API behave similarly to the old virConnectBaselineCPU. The main difference is the CPU definition accepted by both APIs: the old one only accepts host CPU definition, i.e., without 'policy' attributes as seen in the host capabilities XML. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
1 parent
905d6395b7
commit
bef64f9653
2 files changed
+10
-1
No files matched your search
@@ -974,6 +974,9 @@ typedef enum {
|
||||
VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES = (1 << 0),
|
||||
/* filter out non-migratable features (Since: 1.2.14) */
|
||||
VIR_CONNECT_BASELINE_CPU_MIGRATABLE = (1 << 1),
|
||||
/* when computing a baseline from several CPUs, do not make the result
|
||||
* dependent on the current host (Since: 11.5.0) */
|
||||
VIR_CONNECT_BASELINE_CPU_IGNORE_HOST = (1 << 2),
|
||||
} virConnectBaselineCPUFlags;
|
||||
|
||||
char *virConnectBaselineCPU(virConnectPtr conn,
|
||||
|
||||
+7
-1
@@ -1305,7 +1305,8 @@ virConnectBaselineCPU(virConnectPtr conn,
|
||||
* it on another host results in an undefined behavior as the computed CPU
|
||||
* model is influenced by the hypervisor (the result may use an unexpected CPU
|
||||
* model or some features may disabled even though they are supported on all
|
||||
* input CPUs).
|
||||
* input CPUs). The undefined behavior can be avoided using
|
||||
* VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag (see below).
|
||||
*
|
||||
* This is different from virConnectBaselineCPU() which doesn't consider any
|
||||
* hypervisor abilities when computing the best CPU.
|
||||
@@ -1333,6 +1334,11 @@ virConnectBaselineCPU(virConnectPtr conn,
|
||||
* If @flags includes VIR_CONNECT_BASELINE_CPU_MIGRATABLE, the resulting
|
||||
* CPU will not include features that block migration.
|
||||
*
|
||||
* If @flags contains VIR_CONNECT_BASELINE_CPU_IGNORE_HOST and @ncpus > 1, the
|
||||
* API will not consider hypervisor abilities when computing the baseline. With
|
||||
* this flag baseline can be safely computed on any host (even those not
|
||||
* described in @xmlCPUs).
|
||||
*
|
||||
* Returns XML description of the computed CPU (caller frees) or NULL on error.
|
||||
*
|
||||
* Since: 4.4.0
|
||||
|
||||
Reference in new issue
Block a user