All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Feng Wu <feng.wu@intel.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
	eddie.dong@intel.com, xen-devel@lists.xen.org, JBeulich@suse.com,
	jun.nakajima@intel.com
Subject: Re: [PATCH v3 1/9] x86: define CPUINFO_features used as the base offset for cpu features
Date: Mon, 28 Apr 2014 09:55:36 +0100	[thread overview]
Message-ID: <535E1788.5080901@citrix.com> (raw)
In-Reply-To: <1398654829-5887-1-git-send-email-feng.wu@intel.com>

On 28/04/14 04:13, Feng Wu wrote:
> This patch defines CPUINFO_features which can be used as the base of
> the offset for cpu features.
>
> Signed-off-by: Feng Wu <feng.wu@intel.com>
> ---
>  xen/arch/x86/boot/head.S          | 2 +-
>  xen/arch/x86/x86_64/asm-offsets.c | 2 +-
>  xen/include/asm-x86/asm_defns.h   | 2 ++
>  3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
> index 1777c17..2b5b26a 100644
> --- a/xen/arch/x86/boot/head.S
> +++ b/xen/arch/x86/boot/head.S
> @@ -131,7 +131,7 @@ __start:
>          mov     $0x80000001,%eax
>          cpuid
>  1:      mov     %edx,sym_phys(cpuid_ext_features)
> -        mov     %edx,sym_phys(boot_cpu_data)+CPUINFO86_ext_features
> +        mov     %edx,sym_phys(boot_cpu_data)+CPUINFO_ext_features

Personally I feel this would be better as CPUINFO_features + 4, rather
than having another #define in asm_defn.h solely for this purpose.

However, functionally it looks fine.

~Andrew

>  
>          /* Check for availability of long mode. */
>          bt      $29,%edx
> diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c
> index b0098b3..76fafb9 100644
> --- a/xen/arch/x86/x86_64/asm-offsets.c
> +++ b/xen/arch/x86/x86_64/asm-offsets.c
> @@ -159,7 +159,7 @@ void __dummy__(void)
>      OFFSET(IRQSTAT_softirq_pending, irq_cpustat_t, __softirq_pending);
>      BLANK();
>  
> -    OFFSET(CPUINFO86_ext_features, struct cpuinfo_x86, x86_capability[1]);
> +    OFFSET(CPUINFO_features, struct cpuinfo_x86, x86_capability[0]);
>      BLANK();
>  
>      OFFSET(MB_flags, multiboot_info_t, flags);
> diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h
> index a4601ba..e8fa989 100644
> --- a/xen/include/asm-x86/asm_defns.h
> +++ b/xen/include/asm-x86/asm_defns.h
> @@ -29,6 +29,8 @@ void ret_from_intr(void);
>      " .previous\n"
>  #endif
>  
> +#define CPUINFO_ext_features (CPUINFO_features+4)
> +
>  #define _ASM_EXTABLE(from, to)     _ASM__EXTABLE(, from, to)
>  #define _ASM_PRE_EXTABLE(from, to) _ASM__EXTABLE(.pre, from, to)
>  

  reply	other threads:[~2014-04-28  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  3:13 [PATCH v3 1/9] x86: define CPUINFO_features used as the base offset for cpu features Feng Wu
2014-04-28  8:55 ` Andrew Cooper [this message]
2014-04-28  9:13   ` Jan Beulich

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=535E1788.5080901@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=eddie.dong@intel.com \
    --cc=feng.wu@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.