提交 232d87c7 编写于 作者: J Jiri Denemark

cpu: Drop feature filtering from virCPUUpdate

Because of the changes done in the previous commit, @host is already a
migratable CPU and there's no need to do any additional filtering.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 56bd7edc
...@@ -2549,8 +2549,7 @@ x86Baseline(virCPUDefPtr *cpus, ...@@ -2549,8 +2549,7 @@ x86Baseline(virCPUDefPtr *cpus,
static int static int
x86UpdateHostModel(virCPUDefPtr guest, x86UpdateHostModel(virCPUDefPtr guest,
const virCPUDef *host, const virCPUDef *host)
virCPUx86MapPtr map)
{ {
virCPUDefPtr updated = NULL; virCPUDefPtr updated = NULL;
size_t i; size_t i;
...@@ -2559,11 +2558,9 @@ x86UpdateHostModel(virCPUDefPtr guest, ...@@ -2559,11 +2558,9 @@ x86UpdateHostModel(virCPUDefPtr guest,
if (!(updated = virCPUDefCopyWithoutModel(host))) if (!(updated = virCPUDefCopyWithoutModel(host)))
goto cleanup; goto cleanup;
/* Remove non-migratable features by default */
updated->type = VIR_CPU_TYPE_GUEST; updated->type = VIR_CPU_TYPE_GUEST;
updated->mode = VIR_CPU_MODE_CUSTOM; updated->mode = VIR_CPU_MODE_CUSTOM;
if (virCPUDefCopyModelFilter(updated, host, true, if (virCPUDefCopyModel(updated, host, true) < 0)
x86FeatureIsMigratable, map) < 0)
goto cleanup; goto cleanup;
if (guest->vendor_id) { if (guest->vendor_id) {
...@@ -2627,7 +2624,7 @@ virCPUx86Update(virCPUDefPtr guest, ...@@ -2627,7 +2624,7 @@ virCPUx86Update(virCPUDefPtr guest,
if (guest->mode == VIR_CPU_MODE_HOST_MODEL || if (guest->mode == VIR_CPU_MODE_HOST_MODEL ||
guest->match == VIR_CPU_MATCH_MINIMUM) guest->match == VIR_CPU_MATCH_MINIMUM)
ret = x86UpdateHostModel(guest, host, map); ret = x86UpdateHostModel(guest, host);
else else
ret = 0; ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册