On 24 February 2017 at 17:11, Eduardo Habkost <ehabk...@redhat.com> wrote:
> On Fri, Feb 24, 2017 at 01:48:46PM +0000, Peter Maydell wrote:
>> I had a look at implementing this for ARM, and ran into problems
>> because of how we've done '-cpu host'. For us the "host" CPU
>> type is registered dynamically when kvm_init() is called,
>> because (a) it only exists if -enable-kvm and (b) it probes
>> the kernel to find out what's available. So I could easily
>> add 'max' in the same place; but then where should I add the
>> type definition of 'max' for the non-KVM case?
>
> I recommend registering the type unconditionally, moving
> KVM-specific initialization to ->instance_init() and/or
> ->realize() (being careful to make instance_init() not crash if
> KVM is disabled), and make ->realize() fail if KVM is disabled.
> IIRC, we did exactly that on x86 a while ago.

Thanks, sounds reasonable. Also sounds like more rework than
I want to try to write, test and cram into QEMU before freeze
deadline on Tuesday, so I guess we'll have to wait til after
2.9; a pity, but can't be helped.

thanks
-- PMM

Reply via email to