Re: [PATCH V2 4/4] cpu conf: Check ABI stability of CPU maxphysaddr config

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

 



On 7/29/22 21:34, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
>  src/conf/cpu_conf.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
> index e31c4ab467..8e75cdbb4f 100644
> --- a/src/conf/cpu_conf.c
> +++ b/src/conf/cpu_conf.c
> @@ -1127,6 +1127,15 @@ virCPUDefIsEqual(virCPUDef *src,
>          return false;
>      }
>  
> +    if ((src->addr && !dst->addr) ||
> +        (!src->addr && dst->addr) ||
> +        (src->addr && dst->addr &&
> +         (src->addr->mode != dst->addr->mode ||
> +          src->addr->bits != dst->addr->bits))) {
> +        MISMATCH("%s", _("Target CPU maxphysaddr does not match source"));
> +        return false;
> +    }
> +
>      if (src->nfeatures != dst->nfeatures) {
>          MISMATCH(_("Target CPU feature count %zu does not match source %zu"),
>                   dst->nfeatures, src->nfeatures);

This could be squashed into 1/4.

Michal




[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]

  Powered by Linux