mirror of https://gitee.com/openkylin/libvirt.git
Revert "cpu: Drop feature filtering from virCPUUpdate"
This reverts commit 5f96b3feb6
which was
pushed accidentally.
This commit is contained in:
parent
dfe8aa37ad
commit
8a1c7ed6d5
|
@ -2549,7 +2549,8 @@ x86Baseline(virCPUDefPtr *cpus,
|
|||
|
||||
static int
|
||||
x86UpdateHostModel(virCPUDefPtr guest,
|
||||
const virCPUDef *host)
|
||||
const virCPUDef *host,
|
||||
virCPUx86MapPtr map)
|
||||
{
|
||||
virCPUDefPtr updated = NULL;
|
||||
size_t i;
|
||||
|
@ -2558,9 +2559,11 @@ x86UpdateHostModel(virCPUDefPtr guest,
|
|||
if (!(updated = virCPUDefCopyWithoutModel(host)))
|
||||
goto cleanup;
|
||||
|
||||
/* Remove non-migratable features by default */
|
||||
updated->type = VIR_CPU_TYPE_GUEST;
|
||||
updated->mode = VIR_CPU_MODE_CUSTOM;
|
||||
if (virCPUDefCopyModel(updated, host, true) < 0)
|
||||
if (virCPUDefCopyModelFilter(updated, host, true,
|
||||
x86FeatureIsMigratable, map) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (guest->vendor_id) {
|
||||
|
@ -2624,7 +2627,7 @@ virCPUx86Update(virCPUDefPtr guest,
|
|||
|
||||
if (guest->mode == VIR_CPU_MODE_HOST_MODEL ||
|
||||
guest->match == VIR_CPU_MATCH_MINIMUM)
|
||||
ret = x86UpdateHostModel(guest, host);
|
||||
ret = x86UpdateHostModel(guest, host, map);
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue