qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: libvir-list@redhat.com, Igor Mammedov <imammedo@redhat.com>,
	Jiri Denemark <jdenemar@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH qom-cpu 5/9] target-i386: Add ECX information to FeatureWordInfo
Date: Fri, 03 May 2013 17:16:46 +0200	[thread overview]
Message-ID: <5183D4DE.1030704@suse.de> (raw)
In-Reply-To: <1366657220-776-6-git-send-email-ehabkost@redhat.com>

Am 22.04.2013 21:00, schrieb Eduardo Habkost:
> 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 110ef98..314931e 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 */

Why do we need this needs_ field here? eax and reg just seem to be
reindented and the comment reworded for reg.

It just seems to be passed through to has_cpuid_input_ecx, which I
neither see defined nor checked - that data structure already existed
elsewhere as such?

Andreas

> +    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,
>      },
>  };
>  
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-05-03 15:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 19:00 [Qemu-devel] [PATCH qom-cpu 0/9] x86: feature words array (v11) + "feature-words" property Eduardo Habkost
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 1/9] target-i386: cleanup: Group together level, xlevel, xlevel2 fields Eduardo Habkost
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 2/9] target-i386/kvm.c: Code formatting changes Eduardo Habkost
2013-05-01 22:55   ` Andreas Färber
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 3/9] target-i386/cpu.c: Break lines so they don't get too long Eduardo Habkost
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 4/9] target-i386: Replace cpuid_*features fields with a feature word array Eduardo Habkost
2013-05-01 23:03   ` Andreas Färber
2013-05-02 15:06     ` Eduardo Habkost
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 5/9] target-i386: Add ECX information to FeatureWordInfo Eduardo Habkost
2013-05-03 15:16   ` Andreas Färber [this message]
2013-05-03 15:54     ` Eduardo Habkost
2013-05-06 16:27       ` Andreas Färber
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 6/9] target-i386: Add "feature-words" property Eduardo Habkost
2013-04-22 20:37   ` [Qemu-devel] [libvirt] " Eric Blake
2013-04-23 19:25     ` Eduardo Habkost
2013-05-03 11:34   ` [Qemu-devel] " Igor Mammedov
2013-05-03 13:17     ` Eduardo Habkost
2013-05-03 14:25       ` Eric Blake
2013-05-03 14:57   ` Eric Blake
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 7/9] target-i386: Use FeatureWord loop on filter_features_for_kvm() Eduardo Habkost
2013-05-03 15:01   ` Eric Blake
2013-05-06 16:28     ` Andreas Färber
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field Eduardo Habkost
2013-05-03 15:03   ` Eric Blake
2013-04-22 19:00 ` [Qemu-devel] [PATCH qom-cpu 9/9] target-i386: Add "filtered-features" property to X86CPU Eduardo Habkost
2013-05-03 15:10   ` Eric Blake
2013-05-01 22:53 ` [Qemu-devel] [PATCH qom-cpu 0/9] x86: feature words array (v11) + "feature-words" property Andreas Färber
2013-05-02 19:43   ` Eduardo Habkost
2013-05-02 19:48     ` Eric Blake
2013-05-03 14:58       ` Andreas Färber
2013-05-03 15:23         ` Igor Mammedov
2013-05-03 15:31         ` Eric Blake

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=5183D4DE.1030704@suse.de \
    --to=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --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).