Re: [PATCHv1.5 1/2] cpu:x86: fix specified features will disappear after migrate/restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 17, 2015 at 22:22:44 +0800, Luyao Huang wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1207095
> 
> We allow set the feature with the host-passthrough cpu,
> but won't save them in the migration xml, the features we
> specified will disappear after migrate/restore. This is because
> we skip the virCPUDefUpdateFeature if cpu mode is host-passthrough.
> 
> Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
> ---
>  v1.5: just update the description.
> 
>  src/cpu/cpu_x86.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> index 2a14705..26601b6 100644
> --- a/src/cpu/cpu_x86.c
> +++ b/src/cpu/cpu_x86.c
> @@ -2087,8 +2087,7 @@ x86UpdateCustom(virCPUDefPtr guest,
>  
>  static int
>  x86UpdateHostModel(virCPUDefPtr guest,
> -                   const virCPUDef *host,
> -                   bool passthrough)
> +                   const virCPUDef *host)
>  {
>      virCPUDefPtr oldguest = NULL;
>      const struct x86_map *map;
> @@ -2124,7 +2123,7 @@ x86UpdateHostModel(virCPUDefPtr guest,
>              }
>          }
>      }
> -    for (i = 0; !passthrough && i < oldguest->nfeatures; i++) {
> +    for (i = 0; i < oldguest->nfeatures; i++) {
>          if (virCPUDefUpdateFeature(guest,
>                                     oldguest->features[i].name,
>                                     oldguest->features[i].policy) < 0)

While this looks correct, save/restore (and likely migration too) with
-cpu host has even more bugs (e.g., -cpu host turns into -cpu host,+...
after save/restore) and I'd like to fix all that at once.

Jirka

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]