[Top][All Lists]

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

Re: [RFC v1 09/10] i386: split cpu.c and defer x86 models registration

From: Daniel P . Berrangé
Subject: Re: [RFC v1 09/10] i386: split cpu.c and defer x86 models registration
Date: Mon, 9 Nov 2020 18:03:02 +0000
User-agent: Mutt/1.14.6 (2020-07-11)

On Mon, Nov 09, 2020 at 06:27:54PM +0100, Claudio Fontana wrote:
> split cpu.c into:
> cpu.c            cpuid and common x86 cpu functionality
> host-cpu.c       host x86 cpu functions and "host" cpu type
> kvm-cpu-type.c   KVM x86 cpu type
> hvf-cpu-type.c   HVF x86 cpu type
> tcg-cpu-type.c   TCG x86 cpu type
> Defer the x86 models registration to MODULE_INIT_ACCEL_CPU,
> so that accel-specific types can be used as parent types for all
> cpu models. Use the generic TYPE_X86_CPU only if no
> accel-specific specialization is enabled.

Can you give more info on why this is needed and/or desirable ?

Dynamically changing the class hierarchy of CPUs at runtime feels
like a rather suspicious approach to me.

It is contrary to work we've been doing recently to try to make all
classes be fully statically defined by getting rid of dynamic properties,
such that introspection of classes does not depend on other CLI flags
you might have passed.

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]