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(a)redhat.com>
> ---
> 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.
Yes, there are more bugs here, seems i didn't notice that at that time.
Thanks a lot for your review