[libvirt] [PATCH 7/7] cpu: Drop feature filtering from virCPUUpdate

Jiri Denemark posted 7 patches 181 weeks ago
Only 6 patches received!

[libvirt] [PATCH 7/7] cpu: Drop feature filtering from virCPUUpdate

Posted by Jiri Denemark 181 weeks ago
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: Jiri Denemark <jdenemar@redhat.com>
---
 src/cpu/cpu_x86.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index a771b251e..53359ff9b 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2549,8 +2549,7 @@ x86Baseline(virCPUDefPtr *cpus,
 
 static int
 x86UpdateHostModel(virCPUDefPtr guest,
-                   const virCPUDef *host,
-                   virCPUx86MapPtr map)
+                   const virCPUDef *host)
 {
     virCPUDefPtr updated = NULL;
     size_t i;
@@ -2559,11 +2558,9 @@ 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 (virCPUDefCopyModelFilter(updated, host, true,
-                                 x86FeatureIsMigratable, map) < 0)
+    if (virCPUDefCopyModel(updated, host, true) < 0)
         goto cleanup;
 
     if (guest->vendor_id) {
@@ -2627,7 +2624,7 @@ virCPUx86Update(virCPUDefPtr guest,
 
     if (guest->mode == VIR_CPU_MODE_HOST_MODEL ||
         guest->match == VIR_CPU_MATCH_MINIMUM)
-        ret = x86UpdateHostModel(guest, host, map);
+        ret = x86UpdateHostModel(guest, host);
     else
         ret = 0;
 
-- 
2.12.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 7/7] cpu: Drop feature filtering from virCPUUpdate

Posted by John Ferlan 180 weeks ago

On 03/31/2017 01:54 PM, Jiri Denemark wrote:
> 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: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/cpu/cpu_x86.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 

ACK

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list