All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qom-cpu v10 2/2] target-i386: X86CPU model subclasses
Date: Sun, 09 Mar 2014 16:49:52 +0100	[thread overview]
Message-ID: <531C8DA0.5040508@suse.de> (raw)
In-Reply-To: <20140304195301.GZ24353@otherpad.lan.raisama.net>

Am 04.03.2014 20:53, schrieb Eduardo Habkost:
> On Tue, Feb 25, 2014 at 08:36:27AM +0100, Andreas Färber wrote:
>> From: Eduardo Habkost <ehabkost@redhat.com>
>>
>> Register separate QOM types for each x86 CPU model.
>>
>> This will allow management code to more easily probe what each CPU model
>> provides, by simply creating objects using the appropriate class name,
>> without having to restart QEMU.
>>
>> This also allows us to eliminate the qdev_prop_set_globals_for_type()
>> hack to set CPU-model-specific global properties.
>>
>> Instead of creating separate class_init functions for each class, I just
>> used class_data to store a pointer to the X86CPUDefinition struct for
>> each CPU model. This should make the patch shorter and easier to review.
>> Later we can gradually convert each X86CPUDefinition field to lists of
>> per-class property defaults.
>>
>> The "host" CPU model is special, as the feature flags depend on KVM
>> being initialized. So it has its own class_init and instance_init
>> function, and feature flags are set on instance_init instead of
>> class_init.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
> 
> For the changes you introduced:
> 
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> Tested-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> After hacking the code to allow device_add on CPUs, I could use the
> classes to instantiate CPUs from different models using device_add
> (which would be useful to allow probing of CPU model information in a
> single QEMU instance).

Thanks a lot, I'm proceeding to staging this on qom-cpu-next:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-next

Features parsing needs minor merges. Goal is still 2.0.

Andreas

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

  reply	other threads:[~2014-03-09 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  7:36 [Qemu-devel] [PATCH qom-cpu v10 0/2] target-i386: X86CPU subclasses Andreas Färber
2014-02-25  7:36 ` [Qemu-devel] [PATCH qom-cpu v10 1/2] target-i386: Prepare CPUClass::class_by_name for X86CPU Andreas Färber
2014-03-04 19:48   ` Eduardo Habkost
2014-02-25  7:36 ` [Qemu-devel] [PATCH qom-cpu v10 2/2] target-i386: X86CPU model subclasses Andreas Färber
2014-03-04 19:53   ` Eduardo Habkost
2014-03-09 15:49     ` Andreas Färber [this message]
2014-03-03 16:50 ` [Qemu-devel] [PATCH qom-cpu v10 0/2] target-i386: X86CPU subclasses Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531C8DA0.5040508@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.