From: john cooper <john.cooper@redhat.com>
To: Andre Przywara <andre.przywara@amd.com>
Cc: john.cooper@redhat.com, qemu-devel@nongnu.org,
KVM list <kvm@vger.kernel.org>
Subject: [Qemu-devel] Re: [PATCH] Add cpu model configuration support.. (resend)
Date: Tue, 02 Feb 2010 14:34:54 -0500 [thread overview]
Message-ID: <4B687E5E.4060402@redhat.com> (raw)
In-Reply-To: <4B68075D.2030701@amd.com>
Andre Przywara wrote:
>> +[cpudef]
>> + name = "Conroe"
>> + level = "2"
>> + vendor = "GenuineIntel"
>> + family = "6"
>> + model = "2"
>> + stepping = "3"
>> + feature_edx = "sse2 sse fxsr mmx pat cmov pge sep apic cx8 mce pae
>> msr tsc pse de fpu mtrr clflush mca pse36"
>> + feature_ecx = "sse3 ssse3"
>> + extfeature_edx = "fxsr mmx pat cmov pge apic cx8 mce pae msr tsc
>> pse de fpu lm syscall nx"
>> + extfeature_ecx = "lahf_lm"
> Wouldn't it be much more user friendly to merge them all into one
> string? Just from the feature names it is quite obscure to guess which
> flag belongs into which string (especially since we lack the EXTn_
> prefix we had in helper.c). I haven't tried it, but the parsing code
> looks like this shouldn't be too hard.
> To avoid overlong lines one could think about a += operator.
That's true. Although I expect setup of a cpu model to
be a rather infrequent occurrence by the expert (+/-)
user so the above didn't strike me as a significant issue.
Also "-cpu ?cpuid" dumps out the entire motley crew of
flags relative to each grouping for reference.
That said the current config file syntax seems rather
rigid and I think your suggestion makes sense. I avoided
modifying the parser at this point just in the interest of
minimizing the sprawl of this patch.
> I would just drop all definitions here except qemu{32,64} and
> kvm{32,64}. The other models should be described in the config file.
That's the goal but I wanted to leave an interim firewall
of sorts. If the target-x86_64.conf isn't installed for
whatever reason, qemu still can fall back to the internal
definitions. Even here it isn't strictly necessary to
remove an internal def as it can be redefined in the
config file which will override the internal version.
In general -cpu "?model" will indicate internal vs.
externally defined models by enclosing internal model names
in brackets:
:
x86 Opteron_G3 AMD Opteron 23xx (Gen 3 Class Opteron)
:
x86 [athlon] QEMU Virtual CPU version 0.12.50
:
It also seems worth dropping a hint to the user in the case qemu
fails to find a target config file rather than leaving them to
puzzle out why an external model has gone missing.
Thanks for the feedback.
-john
--
john.cooper@redhat.com
next prev parent reply other threads:[~2010-02-02 19:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 19:02 [Qemu-devel] [PATCH] Add cpu model configuration support.. (resend) john cooper
2010-02-02 10:17 ` [Qemu-devel] " Andre Przywara
2010-02-02 11:07 ` Andre Przywara
2010-02-02 19:34 ` john cooper [this message]
2010-02-06 18:59 ` [Qemu-devel] [PATCH] Add assignment operation to config file parser john cooper
2010-02-07 16:24 ` Anthony Liguori
2010-02-08 13:21 ` Gerd Hoffmann
2010-02-08 16:00 ` john cooper
2010-06-09 8:05 ` [Qemu-devel] [PATCH] Add optional dump of default config file paths john cooper
2010-06-14 17:01 ` Anthony Liguori
2010-06-14 17:07 ` Daniel P. Berrange
2010-06-14 17:59 ` john cooper
2010-06-14 19:13 ` Anthony Liguori
2010-02-10 20:00 ` [Qemu-devel] [PATCH] Add cpu model configuration support.. (resend) Anthony Liguori
2010-02-14 6:52 ` john cooper
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=4B687E5E.4060402@redhat.com \
--to=john.cooper@redhat.com \
--cc=andre.przywara@amd.com \
--cc=kvm@vger.kernel.org \
--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).