[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 2/3] x86/viridian: Make logging less verbose



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 05 August 2014 08:07
> To: Paul Durrant
> Cc: xen-devel@xxxxxxxxxxxxx; Keir (Xen.org)
> Subject: Re: [PATCH v3 2/3] x86/viridian: Make logging less verbose
> 
> >>> On 04.08.14 at 19:37, <paul.durrant@xxxxxxxxxx> 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?
> 

Damn. I meant to put in an explicit %d: and print the domid, but forgot.

> Also for readability I think a local variable initialized to
> &d->arch.hvm_domain.viridian.guest_os_id.fields would be quite
> beneficial here.
> 

Yes, you're probably right.

  Paul
> Jan


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.