[PATCH V2 4/4] cpu conf: Check ABI stability of CPU maxphysaddr config
Michal Prívozník
mprivozn at redhat.com
Wed Aug 3 15:28:55 UTC 2022
On 7/29/22 21:34, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
> 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
More information about the libvir-list
mailing list