All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Peng <chao.p.peng@linux.intel.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: keir@xen.org, stefano.stabellini@eu.citrix.com,
	andrew.cooper3@citrix.com, dario.faggioli@citrix.com,
	Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org,
	will.auld@intel.com, JBeulich@suse.com, wei.liu2@citrix.com,
	dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v10 00/13] enable Cache Allocation Technology (CAT) for VMs
Date: Wed, 8 Jul 2015 17:40:47 +0800	[thread overview]
Message-ID: <20150708094047.GC3333@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <1436280381.25646.232.camel@citrix.com>

On Tue, Jul 07, 2015 at 03:46:21PM +0100, Ian Campbell wrote:
> On Fri, 2015-06-26 at 16:43 +0800, Chao Peng wrote:
> > Chao Peng (13):
> >   x86: add socket_cpumask
> >   x86: detect and initialize Intel CAT feature
> >   x86: maintain COS to CBM mapping for each socket
> >   x86: add COS information for each domain
> >   x86: expose CBM length and COS number information
> >   x86: dynamically get/set CBM for a domain
> >   x86: add scheduling support for Intel CAT
> >   xsm: add CAT related xsm policies
> 
> Jan applied to here.
> 
> So I was going to apply these 5:
> 
> >   tools/libxl: minor name changes for CMT commands
> >   tools/libxl: add command to show PSR hardware info
> >   tools/libxl: introduce some socket helpers
> >   tools: add tools support for Intel CAT
> >   docs: add xl-psr.markdown
> 
> But, on i686 I see:
> 
> xl_cmdimpl.c: In function ‘psr_cat_hwinfo’:
> xl_cmdimpl.c:8390:16: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]
>                 (1ul << info->cbm_len) - 1);
>                 ^
> xl_cmdimpl.c: In function ‘psr_cat_print_socket’:
> xl_cmdimpl.c:8450:5: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘long unsigned int’ [-Werror=format=]
>      printf("%-16s: %#"PRIx64"\n", "Default CBM", (1ul << info->cbm_len) - 1);
>      ^
> cc1: all warnings being treated as errors
> 
> It seems there is some mismatch between your types and the printf
> formats used.
> 
> The appropriate format specifier for an unsigned long (which you have
> from the "ul" in the constant) is %#lx and not "%#"PRIxXX which is
> associated with uintXX_t types.
> 
> If you need a 64 bit type then you might have meant instead to use "ull"
> in which case you want "%#llx" as the format specifier.

This is what I need. Thanks for suggestion.

Chao
> 
> If you really want/need an exactly 64 bit type then you'll have to do
> some nasty casting, something like "((uint64_t)1) << info->cbm_len) - 1"
> or something, that's pretty ugly though. If you have to go this route
> then please test both builds, in case I've gotten my ()'s wrong.
> 
> Ian.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-07-08  9:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  8:43 [PATCH v10 00/13] enable Cache Allocation Technology (CAT) for VMs Chao Peng
2015-06-26  8:43 ` [PATCH v10 01/13] x86: add socket_cpumask Chao Peng
2015-07-07 22:32   ` Boris Ostrovsky
2015-07-08  2:43     ` Chao Peng
2015-07-08  7:42       ` Jan Beulich
2015-06-26  8:43 ` [PATCH v10 02/13] x86: detect and initialize Intel CAT feature Chao Peng
2015-07-07 10:25   ` Jan Beulich
2015-07-08  2:24     ` Chao Peng
2015-06-26  8:43 ` [PATCH v10 03/13] x86: maintain COS to CBM mapping for each socket Chao Peng
2015-06-26  8:43 ` [PATCH v10 04/13] x86: add COS information for each domain Chao Peng
2015-06-26  8:43 ` [PATCH v10 05/13] x86: expose CBM length and COS number information Chao Peng
2015-06-26  8:43 ` [PATCH v10 06/13] x86: dynamically get/set CBM for a domain Chao Peng
2015-06-26  8:43 ` [PATCH v10 07/13] x86: add scheduling support for Intel CAT Chao Peng
2015-06-26  8:43 ` [PATCH v10 08/13] xsm: add CAT related xsm policies Chao Peng
2015-06-26  8:43 ` [PATCH v10 09/13] tools/libxl: minor name changes for CMT commands Chao Peng
2015-06-26  8:43 ` [PATCH v10 10/13] tools/libxl: add command to show PSR hardware info Chao Peng
2015-06-26  8:43 ` [PATCH v10 11/13] tools/libxl: introduce some socket helpers Chao Peng
2015-06-26  8:43 ` [PATCH v10 12/13] tools: add tools support for Intel CAT Chao Peng
2015-06-26  8:43 ` [PATCH v10 13/13] docs: add xl-psr.markdown Chao Peng
2015-07-07 14:46 ` [PATCH v10 00/13] enable Cache Allocation Technology (CAT) for VMs Ian Campbell
2015-07-08  9:40   ` Chao Peng [this message]
2015-07-08 10:02     ` Wei Liu
2015-07-09  1:29       ` Chao Peng

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=20150708094047.GC3333@pengc-linux.bj.intel.com \
    --to=chao.p.peng@linux.intel.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=will.auld@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.