From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, "Igor Mammedov" <imammedo@redhat.com>,
"Jiri Denemark" <jdenemar@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [RFC 1/5] target-i386: Add ECX information to FeatureWordInfo
Date: Thu, 4 Apr 2013 15:11:09 -0300 [thread overview]
Message-ID: <1365099073-21491-2-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1365099073-21491-1-git-send-email-ehabkost@redhat.com>
FEAT_7_0_EBX uses ECX as input, so we have to take that into account
when reporting feature word values.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target-i386/cpu.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index df6d6f0..6bb228b 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -151,8 +151,10 @@ static const char *cpuid_7_0_ebx_feature_name[] = {
typedef struct FeatureWordInfo {
const char **feat_names;
- uint32_t cpuid_eax; /* Input EAX for CPUID */
- int cpuid_reg; /* R_* register constant */
+ uint32_t cpuid_eax; /* Input EAX for CPUID */
+ bool cpuid_needs_ecx; /* CPUID instruction uses ECX as input */
+ uint32_t cpuid_ecx; /* Input ECX value for CPUID */
+ int cpuid_reg; /* output register (R_* constant) */
} FeatureWordInfo;
static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
@@ -186,7 +188,9 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
},
[FEAT_7_0_EBX] = {
.feat_names = cpuid_7_0_ebx_feature_name,
- .cpuid_eax = 7, .cpuid_reg = R_EBX,
+ .cpuid_eax = 7,
+ .cpuid_needs_ecx = true, .cpuid_ecx = 0,
+ .cpuid_reg = R_EBX,
},
};
--
1.8.1.4
next prev parent reply other threads:[~2013-04-04 18:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 18:11 [Qemu-devel] [RFC 0/5] X86CPU "feature-words" & "filtered-features" properties (v2) Eduardo Habkost
2013-04-04 18:11 ` Eduardo Habkost [this message]
2013-04-04 18:11 ` [Qemu-devel] [RFC 2/5] target-i386: Add "feature-words" property Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 3/5] target-i386: Use FeatureWord loop on filter_features_for_kvm() Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 4/5] target-i386: Introduce X86CPU.filtered_features field Eduardo Habkost
2013-04-04 18:11 ` [Qemu-devel] [RFC 5/5] target-i386: Add "filtered-features" property to X86CPU 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=1365099073-21491-2-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=afaerber@suse.de \
--cc=imammedo@redhat.com \
--cc=jdenemar@redhat.com \
--cc=libvir-list@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).