From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: blauwirbel@gmail.com, imammedo@redhat.com, qemu-devel@nongnu.org,
Anthony Liguori <anthony@codemonkey.ws>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC qom-cpu v2 2/2] target-i386: Turn Haswell into subclass of SandyBridge
Date: Wed, 12 Dec 2012 15:47:49 +0100 [thread overview]
Message-ID: <50C89915.7060600@suse.de> (raw)
In-Reply-To: <20121212124529.GB3236@otherpad.lan.raisama.net>
Am 12.12.2012 13:45, schrieb Eduardo Habkost:
> On Mon, Dec 10, 2012 at 11:59:32PM +0100, Andreas Färber wrote:
>> ehabkost: "When adding the Haswell CPU model, I intended to make it
>> a superset of the features present on the SandyBridge model"
>>
>> Inherit from SandyBridge to keep only the delta for Haswell.
>
> Most CPUs have a superset of the features of their predecessors. Are you
> simply using SandyBridge->Haswell as an example, or you think their
> relationship is special somehow?
>
> I believe we don't want to make externally-visible class inheritance,
> but probably just reuse constans or init functions internally. A Haswell
> CPU is not a type of SandyBridge CPU, it just happens to contain a
> superset of the features present in SandyBridge.
>
> I mean: Haswell also has a superset of features of 486, but we don't
> want to make the hierarchy look like the following, do we?
I don't see why we would want to use a #define-based inheritence as
suggested for the PPRO when we have QOM. QOM inheritence reduces lines
of code significantly compared to just taking the values from elsewhere.
For the Haswell you said what I quoted, for the other models I said I
need your or someone's help to verify whether a hierarchy such as below
is semantically right or just a coincidence. I was at least considering
an abstract intel-/amd-*-cpu to avoid repeating the three value
assignments over and over.
At this time I believe the parents of a type are not (yet) exposed via
QMP, just the "type" string property.
Andreas
> - X86CPU
> -> X86IntelCPU
> -> 486
> -> pentium
> -> pentium2
> -> pentium3
> -> Conroe
> -> Penryn
> -> Nehalem
> -> Westmere
> -> SandyBridge
> -> Haswell
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-12-12 14:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 22:59 [Qemu-devel] [RFC qom-cpu v2 0/2] target-i386: X86CPU subclasses Andreas Färber
2012-12-10 22:59 ` [Qemu-devel] [RFC qom-cpu v2 1/2] target-i386: Convert CPU definitions into " Andreas Färber
2013-01-15 8:41 ` Igor Mammedov
2013-01-15 10:07 ` Eduardo Habkost
2012-12-10 22:59 ` [Qemu-devel] [RFC qom-cpu v2 2/2] target-i386: Turn Haswell into subclass of SandyBridge Andreas Färber
2012-12-12 12:45 ` Eduardo Habkost
2012-12-12 14:47 ` Andreas Färber [this message]
2012-12-12 15:05 ` Eduardo Habkost
2012-12-12 17:29 ` Andreas Färber
2012-12-12 18:21 ` Alexander Graf
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=50C89915.7060600@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--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 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).