All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Cc: "Keir (Xen.org)" <keir@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3 2/3] x86/viridian: Make logging less verbose
Date: Tue, 5 Aug 2014 10:32:19 +0000	[thread overview]
Message-ID: <9AAE0902D5BC7E449B7C8E4E778ABCD041CA9F@AMSPEX01CL01.citrite.net> (raw)
In-Reply-To: <53E0A8DA.6030505@citrix.com>

> -----Original Message-----
> From: Andrew Cooper [mailto:amc96@hermes.cam.ac.uk] On Behalf Of
> Andrew Cooper
> Sent: 05 August 2014 10:50
> To: Jan Beulich; Paul Durrant
> Cc: Keir (Xen.org); xen-devel@lists.xen.org
> Subject: Re: [Xen-devel] [PATCH v3 2/3] x86/viridian: Make logging less
> verbose
> 
> On 05/08/2014 08:06, Jan Beulich wrote:
> >>>> On 04.08.14 at 19:37, <paul.durrant@citrix.com> wrote:
> >> --- a/xen/arch/x86/hvm/viridian.c
> >> +++ b/xen/arch/x86/hvm/viridian.c
> >> @@ -120,37 +120,27 @@ int cpuid_viridian_leaves(unsigned int leaf,
> unsigned int *eax,
> >>
> >>  static void dump_guest_os_id(const struct domain *d)
> >>  {
> >> -    gdprintk(XENLOG_INFO, "GUEST_OS_ID:\n");
> >> -    gdprintk(XENLOG_INFO, "\tvendor: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.vendor);
> >> -    gdprintk(XENLOG_INFO, "\tos: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.os);
> >> -    gdprintk(XENLOG_INFO, "\tmajor: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.major);
> >> -    gdprintk(XENLOG_INFO, "\tminor: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.minor);
> >> -    gdprintk(XENLOG_INFO, "\tsp: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.service_pack);
> >> -    gdprintk(XENLOG_INFO, "\tbuild: %x\n",
> >> -            d->arch.hvm_domain.viridian.guest_os_id.fields.build_number);
> >> +    printk(XENLOG_G_INFO "GUEST_OS_ID: vendor: %x os: %x major: %x
> minor: %x sp: %x build: %x\n",
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.vendor,
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.os,
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.major,
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.minor,
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.service_pack,
> >> +           d->arch.hvm_domain.viridian.guest_os_id.fields.build_number);
> > So how will one now know which of the potentially many guests this
> > is about?
> >
> > Also for readability I think a local variable initialized to
> > &d->arch.hvm_domain.viridian.guest_os_id.fields would be quite
> > beneficial here.
> >
> > Jan
> 
> Furthermore, now that viridian.c has been removed from the prefix, this
> message is otherwise unqualified.  It should probably regain a viridian
> prefix.
> 

Yeah, I guess.

> All the %x should probably be %#x, otherwise it will look confusing if
> any of them have an absolute value greater than 9.
> 

They've always been unprefixed hex values, so I don't think we really need to introduce a prefix now.

> In the APIC_ASSIST, v->vcpu_id is unsigned, and should use %u rather
> than %d (the old code was buggy as well)
> 

Ok.

  Paul

> ~Andrew

  reply	other threads:[~2014-08-05 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 17:37 [PATCH v3 0/3] x86/viridian improvements Paul Durrant
2014-08-04 17:37 ` [PATCH v3 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask Paul Durrant
2014-08-04 17:37 ` [PATCH v3 2/3] x86/viridian: Make logging less verbose Paul Durrant
2014-08-05  7:06   ` Jan Beulich
2014-08-05  8:52     ` Paul Durrant
2014-08-05  9:50     ` Andrew Cooper
2014-08-05 10:32       ` Paul Durrant [this message]
2014-08-04 17:37 ` [PATCH v3 3/3] x86/viridian: Add partition time reference counter MSR support Paul Durrant

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=9AAE0902D5BC7E449B7C8E4E778ABCD041CA9F@AMSPEX01CL01.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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.