qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-cpu 1/4] target-i386: Inline -cpu host check


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-cpu 1/4] target-i386: Inline -cpu host check into cpu_x86_register()
Date: Tue, 11 Dec 2012 00:21:10 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Am 10.12.2012 19:55, schrieb Igor Mammedov:
> On Mon, 10 Dec 2012 10:46:13 -0200
> Eduardo Habkost <address@hidden> wrote:
> 
>> On Sun, Dec 09, 2012 at 08:45:50PM +0100, Andreas Färber wrote:
>>> Simplifies the upcoming cleanup of cpu_x86_find_by_name().
>>
>> ...by making cpu_x86_register() more complicated, and having CPU model
>> name lookup spread into different parts of the code.
>>
>> The CPU model lookup is a bit complex because of the "host" exception,
>> but at least the complexity was hidden inside cpu_x86_find_by_name()
>> (making it very easy to replace that logic by a CPU subclass lookup,
>> later).

(Somehow I didn't get this message ... yet)

> +1

Could you guys re-review this in light of the subclasses patch? The
issue I was facing is that I did not see a reliable way to register the
host class depending on kvm_enabled(). Therefore ..._find_by_name()
becomes the class lookup whereas the host check remains a special check
in cpu_x86_init() [a faulty one I now see, ignoring "host-x86_64-cpu"].
cpu_x86_register() is problematic in that it gets the X86CPU served on a
silver plate, so it's too late to choose subclasses in that function.

Andreas

> 
> [...]
>>
>> -- 
>> Eduardo
>>
> 
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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