From: "Andreas Färber" <afaerber@suse.de>
To: Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
Eduardo Habkost <ehabkost@redhat.com>,
stefano.stabellini@eu.citrix.com, sw@weilnetz.de,
mtosatti@redhat.com, qemu-devel@nongnu.org, agraf@suse.de,
blauwirbel@gmail.com, jcmvbkbc@gmail.com, avi@redhat.com,
jan.kiszka@siemens.com, anthony.perard@citrix.com,
pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH qom-next 08/12] target-i386: introduce cpu-model property for x86_cpu
Date: Mon, 04 Jun 2012 19:29:46 +0200 [thread overview]
Message-ID: <4FCCF08A.4050404@suse.de> (raw)
In-Reply-To: <4FCCCCB2.9090103@redhat.com>
Am 04.06.2012 16:56, schrieb Igor Mammedov:
> On 05/30/2012 05:22 PM, Andreas Färber wrote:
>> Am 30.05.2012 00:10, schrieb Igor Mammedov:
>>> it's probably intermidiate step till cpu modeled as
>>> sub-classes. After then we probably could drop it.
>>>
>>> However it still could be used for overiding default
>>> cpu subclasses definition, and probably renamed to
>>> something like 'features'.
>>
>> * As you rightly point out, we are heading towards sub-classes and that
>> contradicts this two-step initialization. I don't see how this is an
>> intermediate step?
> It's not clear to me how sub-classes contradict with two-step
> initialization,
> , could you elaborate more on this?
CPU subclasses mean to me that for -cpu qemu64 we would have a QOM type
"qemu64" (or so). initfn would then take care of initializing all
default values, and from cpu_x86_init() we would parse the remaining
cpu_model parameters and set QOM properties on the CPU instance.
Original attempt:
https://github.com/afaerber/qemu-cpu/commit/a27feda42712606ca2303faeb6c7e8478660a1c1
Now, the contradiction is that once we have done object_new("qemu64") we
cannot change its type "qemu64" to anything else. Therefore I dislike
sticking cpu_model into a "cpu-model" property.
What I was talking about wrt features was doing in pseudocode:
object_new("qemu64")
object_property_set_int("family", 42)
object_property_set_string("vendor", "Me, myself and I")
object_property_set_bool("x2apic", true)
...
I.e. decoupling the back part of the cpu_model string from the model. My
patches in master that you and others have reviewed did this for the
mostly numeric CPUID parts (-cpu foo,x=42), with a view to code sharing.
What's missing is properties to set CPU features (-cpu foo,+x,-y). There
the question is how granular do we want to go and which types do we want
to use. The example above shows using a bool property for a specific
feature (without having checked that for correctness). Other
possibilities would be to have a feature string with all those
space-separated acronyms or an int that is a bitfield. One doesn't rule
out the other. Jan's requirement, I think, was to be able to set them
from global properties for pc-1.x backwards compatibility.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2012-06-04 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1338329426-28118-1-git-send-email-imammedo@redhat.com>
[not found] ` <1338329426-28118-9-git-send-email-imammedo@redhat.com>
[not found] ` <4FC63B30.5040206@suse.de>
2012-06-04 14:56 ` [Qemu-devel] [PATCH qom-next 08/12] target-i386: introduce cpu-model property for x86_cpu Igor Mammedov
2012-06-04 17:29 ` Andreas Färber [this message]
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=4FCCF08A.4050404@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=anthony.perard@citrix.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=jcmvbkbc@gmail.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefano.stabellini@eu.citrix.com \
--cc=sw@weilnetz.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).