[Top][All Lists]
[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: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH qom-cpu 1/4] target-i386: Inline -cpu host check into cpu_x86_register() |
Date: |
Mon, 10 Dec 2012 21:33:35 -0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Dec 11, 2012 at 12:21:10AM +0100, Andreas Färber wrote:
> 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.
I have a patch[1] to change that in my APIC-ID-topology work in progress
branch[2]. I can submit this (and maybe a few other code movements) as
PATCH tomorrow.
I have a branch for CPU subclasses using an approach similar to the one
you used, but that includes "host" as well[3]. But I was waiting until
the properties series is resubmitted, so I could use it as base and make
the subclass code simpler. I will take a deeper look at your RFC
tomorrow, and probably send additional comments.
[1]
https://github.com/ehabkost/qemu-hacks/commit/850c5531c84839919d650b2dac6e98fa4c2529c4
[2] https://github.com/ehabkost/qemu-hacks/commits/work/apicid
[3] https://github.com/ehabkost/qemu-hacks/commits/work/cpu-model-classes
--
Eduardo
[Qemu-devel] [PATCH qom-cpu 0/4] target-i386: Finish killing cpudef support, Andreas Färber, 2012/12/09
[Qemu-devel] [PATCH qom-cpu 2/4] target-i386: Drop redundant list of CPU definitions, Andreas Färber, 2012/12/09
[Qemu-devel] [PATCH qom-cpu 3/4] Really finally kill cpudef config section support, Andreas Färber, 2012/12/09
[Qemu-devel] [PATCH qom-cpu 4/4] MAINTAINERS: Include X86CPU in CPU maintenance area, Andreas Färber, 2012/12/09