On Wed, Oct 25, 2017 at 10:56 AM +0200, Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
wrote:
On Fri, Oct 13, 2017 at 08:14 PM +0200, Jiri Denemark
<jdenemar(a)redhat.com> wrote:
> When a hypervisor marks a CPU model as unusable on the current host, it
> may also give us a list of features which prevent the model from being
> usable. Storing this list in virDomainCapsCPUModel will help the CPU
> driver with creating a host-model CPU configuration.
>
> Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
> Reviewed-by: John Ferlan <jferlan(a)redhat.com>
> ---
[...snip...]
>
> diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
> index 82183c4524..8c71dec21e 100644
> --- a/src/conf/domain_capabilities.h
> +++ b/src/conf/domain_capabilities.h
> @@ -116,6 +116,7 @@ typedef virDomainCapsCPUModel *virDomainCapsCPUModelPtr;
> struct _virDomainCapsCPUModel {
> char *name;
> virDomainCapsCPUUsable usable;
> + char **blockers; /* NULL-terminated list of usability blockers */
> };
I know this is an "old" thread and already pushed. But I think you have
to free the blockers list in virDomainCapsCPUModelsDispose as well. No?
Sorry for the inconvenience. I'll send a patch for it :)
>
> typedef struct _virDomainCapsCPUModels virDomainCapsCPUModels;
> @@ -171,11 +172,13 @@ virDomainCapsCPUModelsPtr
virDomainCapsCPUModelsFilter(virDomainCapsCPUModelsPtr
> const char **blacklist);
> int virDomainCapsCPUModelsAddSteal(virDomainCapsCPUModelsPtr cpuModels,
> char **name,
> - virDomainCapsCPUUsable usable);
> + virDomainCapsCPUUsable usable,
> + char ***blockers);
> int virDomainCapsCPUModelsAdd(virDomainCapsCPUModelsPtr cpuModels,
> const char *name,
> ssize_t nameLen,
> - virDomainCapsCPUUsable usable);
[...snip]
--
Beste Grüße / Kind regards
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
--
Beste Grüße / Kind regards
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294