From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 2/3] x86/viridian: Make logging less verbose Date: Tue, 05 Aug 2014 10:50:18 +0100 Message-ID: <53E0A8DA.6030505@citrix.com> References: <1407173867-10516-1-git-send-email-paul.durrant@citrix.com> <1407173867-10516-3-git-send-email-paul.durrant@citrix.com> <53E09E9602000078000294E0@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53E09E9602000078000294E0@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Paul Durrant Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 05/08/2014 08:06, Jan Beulich wrote: >>>> On 04.08.14 at 19:37, 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