From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: mimu@linux.vnet.ibm.com, borntraeger@de.ibm.com,
"Igor Mammedov" <imammedo@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Jiri Denemark" <jdenemar@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
rth@twiddle.net
Subject: [Qemu-devel] [PATCH 1/2] target-i386: Introduce "-cpu custom"
Date: Mon, 8 Jun 2015 16:07:39 -0300 [thread overview]
Message-ID: <1433790460-30679-2-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1433790460-30679-1-git-send-email-ehabkost@redhat.com>
Now that we can configure everything in a CPU using QOM properties, add
a new CPU model name that won't load anything from the CPU model table.
That means no CPUID field will be initialized with any data that depends
on CPU model name, machine-type, or accelerator.
This will allow management software to control CPUID data completely
using the "-cpu" command-line option, or using global properties.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/cpu.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 4e7cdaa..4677784 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3052,7 +3052,9 @@ static void x86_cpu_initfn(Object *obj)
}
}
- x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort);
+ if (xcc->cpu_def) {
+ x86_cpu_load_def(cpu, xcc->cpu_def, &error_abort);
+ }
/* init various static tables used in TCG mode */
if (tcg_enabled() && !inited) {
@@ -3182,6 +3184,11 @@ static const TypeInfo x86_cpu_type_info = {
.class_init = x86_cpu_common_class_init,
};
+static const TypeInfo custom_x86_cpu_type_info = {
+ .name = X86_CPU_TYPE_NAME("custom"),
+ .parent = TYPE_X86_CPU,
+};
+
static void x86_cpu_register_types(void)
{
int i;
@@ -3190,6 +3197,7 @@ static void x86_cpu_register_types(void)
for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); i++) {
x86_register_cpudef_type(&builtin_x86_defs[i]);
}
+ type_register_static(&custom_x86_cpu_type_info);
#ifdef CONFIG_KVM
type_register_static(&host_x86_cpu_type_info);
#endif
--
2.1.0
next prev parent reply other threads:[~2015-06-08 19:07 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 19:07 [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Eduardo Habkost
2015-06-08 19:07 ` Eduardo Habkost [this message]
2015-06-08 19:07 ` [Qemu-devel] [PATCH 2/2] scripts: x86-cpu-model-dump script Eduardo Habkost
2015-06-08 20:18 ` [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Jiri Denemark
2015-06-09 8:56 ` Daniel P. Berrange
2015-06-09 13:16 ` Eduardo Habkost
2015-06-23 12:32 ` Andreas Färber
2015-06-23 15:08 ` Eduardo Habkost
2015-06-23 15:32 ` Michael S. Tsirkin
2015-06-23 15:58 ` Eduardo Habkost
2015-06-23 16:15 ` Andreas Färber
2015-06-23 16:25 ` Daniel P. Berrange
2015-06-23 16:33 ` Michael S. Tsirkin
2015-06-23 16:38 ` Eduardo Habkost
2015-06-23 16:44 ` Andreas Färber
2015-06-23 17:08 ` Eduardo Habkost
2015-06-23 17:18 ` Andreas Färber
2015-06-23 17:27 ` Daniel P. Berrange
2015-06-23 17:41 ` Andreas Färber
2015-06-23 17:45 ` Eduardo Habkost
2015-06-23 17:58 ` Andreas Färber
2015-06-23 18:05 ` Daniel P. Berrange
2015-06-23 18:11 ` Eduardo Habkost
2015-06-23 17:55 ` Daniel P. Berrange
2015-06-23 17:39 ` Eduardo Habkost
2015-06-23 18:35 ` Andreas Färber
2015-06-23 19:25 ` Eduardo Habkost
2015-06-23 19:41 ` Andreas Färber
2015-06-23 19:53 ` Eduardo Habkost
2015-06-23 20:26 ` Eduardo Habkost
2015-06-23 21:38 ` Michael S. Tsirkin
2015-06-23 16:42 ` Daniel P. Berrange
2015-06-23 16:47 ` Andreas Färber
2015-06-23 17:11 ` Eduardo Habkost
2015-06-23 21:34 ` Michael S. Tsirkin
2015-06-24 14:24 ` Eduardo Habkost
2015-06-24 14:37 ` Michael S. Tsirkin
2015-06-24 15:44 ` [Qemu-devel] Not introducing new host-side requirements on new machine-type versions (was Re: [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models) Eduardo Habkost
2015-06-24 15:58 ` Andreas Färber
2015-06-24 16:08 ` Eduardo Habkost
2015-06-24 16:15 ` Andreas Färber
2015-06-24 15:59 ` Paolo Bonzini
2015-06-23 17:13 ` [Qemu-devel] [PATCH 0/2] target-i386: "custom" CPU model + script to dump existing CPU models Daniel P. Berrange
2015-06-23 17:29 ` Andreas Färber
2015-06-23 17:42 ` Eduardo Habkost
2015-06-23 17:55 ` Andreas Färber
2015-06-23 17:58 ` Daniel P. Berrange
2015-06-23 21:28 ` Michael S. Tsirkin
2015-06-24 14:18 ` Eduardo Habkost
2015-06-24 14:24 ` Michael S. Tsirkin
2015-06-23 21:26 ` Michael S. Tsirkin
2015-06-23 21:23 ` Michael S. Tsirkin
2015-06-24 8:52 ` Daniel P. Berrange
2015-06-24 10:31 ` Michael S. Tsirkin
2015-06-24 14:16 ` Eduardo Habkost
2015-06-24 14:19 ` Michael S. Tsirkin
2015-06-24 14:35 ` Andreas Färber
2015-06-24 14:57 ` Michael S. Tsirkin
2015-06-24 15:43 ` Andreas Färber
2015-06-24 14:38 ` Paolo Bonzini
2015-06-24 14:54 ` Peter Maydell
2015-06-24 14:56 ` Paolo Bonzini
2015-06-24 15:58 ` Eduardo Habkost
2015-06-24 16:00 ` Paolo Bonzini
2015-06-23 16:40 ` Andreas Färber
2015-06-23 16:53 ` Daniel P. Berrange
2015-06-23 17:10 ` Andreas Färber
2015-06-23 17:24 ` Eduardo Habkost
2015-06-23 17:31 ` Daniel P. Berrange
2015-06-23 16:32 ` Eduardo Habkost
2015-06-23 17:01 ` Andreas Färber
2015-06-23 15:51 ` Daniel P. Berrange
2015-06-23 15:56 ` Michael S. Tsirkin
2015-06-23 16:00 ` Daniel P. Berrange
2015-06-23 16:30 ` Michael S. Tsirkin
2015-06-24 9:20 ` Jiri Denemark
2015-06-24 10:21 ` Michael S. Tsirkin
2015-06-24 10:31 ` Daniel P. Berrange
2015-06-24 10:40 ` Michael S. Tsirkin
2015-06-24 10:32 ` Paolo Bonzini
2015-06-16 17:40 ` Eduardo Habkost
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=1433790460-30679-2-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=afaerber@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=imammedo@redhat.com \
--cc=jdenemar@redhat.com \
--cc=mimu@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).