[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



On 05/08/2014 08:06, Jan Beulich wrote:
>>>> 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?
>
> 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.

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

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

~Andrew

_______________________________________________
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®.