From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Durrant Subject: Re: [PATCH v2 2/3] x86/viridian: Note that logging is under control of the guest Date: Mon, 4 Aug 2014 13:45:57 +0000 Message-ID: <9AAE0902D5BC7E449B7C8E4E778ABCD03FF9C1@AMSPEX01CL01.citrite.net> References: <1407157961-7239-1-git-send-email-paul.durrant@citrix.com> <1407157961-7239-3-git-send-email-paul.durrant@citrix.com> <53DF8CCA.1030702@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53DF8CCA.1030702@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , "xen-devel@lists.xen.org" Cc: "Keir (Xen.org)" , Jan Beulich List-Id: xen-devel@lists.xenproject.org > -----Original Message----- > From: Andrew Cooper > Sent: 04 August 2014 14:38 > To: Paul Durrant; xen-devel@lists.xen.org > Cc: Keir (Xen.org); Jan Beulich > Subject: Re: [Xen-devel] [PATCH v2 2/3] x86/viridian: Note that logging is > under control of the guest > > On 04/08/14 14:12, Paul Durrant wrote: > > All viridian logging is actually in response to an action (MSR read/write, > > etc.) in the guest. As such XENLOG_G_ log levels should be used. > > > > Signed-off-by: Paul Durrant > > Cc: Keir Fraser > > Cc: Jan Beulich > > gdprintk() already makes them guest log levels, so this change is a > functional noop. Ah, good point. Just me being overly paranoid. > > However, the __file__/__LINE__ references are quite useless in the > presented information, so can safely be dropped by switching to regular > printk(). It would also be nice to reduce the number of individual > lines requires. dump_guest_os_id could easily be one or two lines > instead of 7. > Yeah; it's a bit verbose. Paul > ~Andrew > > > --- > > xen/arch/x86/hvm/viridian.c | 26 +++++++++++++------------- > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c > > index 31c9656..2d79403 100644 > > --- a/xen/arch/x86/hvm/viridian.c > > +++ b/xen/arch/x86/hvm/viridian.c > > @@ -120,36 +120,36 @@ 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", > > + gdprintk(XENLOG_G_INFO, "GUEST_OS_ID:\n"); > > + gdprintk(XENLOG_G_INFO, "\tvendor: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.vendor); > > - gdprintk(XENLOG_INFO, "\tos: %x\n", > > + gdprintk(XENLOG_G_INFO, "\tos: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.os); > > - gdprintk(XENLOG_INFO, "\tmajor: %x\n", > > + gdprintk(XENLOG_G_INFO, "\tmajor: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.major); > > - gdprintk(XENLOG_INFO, "\tminor: %x\n", > > + gdprintk(XENLOG_G_INFO, "\tminor: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.minor); > > - gdprintk(XENLOG_INFO, "\tsp: %x\n", > > + gdprintk(XENLOG_G_INFO, "\tsp: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.service_pack); > > - gdprintk(XENLOG_INFO, "\tbuild: %x\n", > > + gdprintk(XENLOG_G_INFO, "\tbuild: %x\n", > > d->arch.hvm_domain.viridian.guest_os_id.fields.build_number); > > } > > > > static void dump_hypercall(const struct domain *d) > > { > > - gdprintk(XENLOG_INFO, "HYPERCALL:\n"); > > - gdprintk(XENLOG_INFO, "\tenabled: %x\n", > > + gdprintk(XENLOG_G_INFO, "HYPERCALL:\n"); > > + gdprintk(XENLOG_G_INFO, "\tenabled: %x\n", > > d->arch.hvm_domain.viridian.hypercall_gpa.fields.enabled); > > - gdprintk(XENLOG_INFO, "\tpfn: %lx\n", > > + gdprintk(XENLOG_G_INFO, "\tpfn: %lx\n", > > (unsigned long)d- > >arch.hvm_domain.viridian.hypercall_gpa.fields.pfn); > > } > > > > static void dump_apic_assist(const struct vcpu *v) > > { > > - gdprintk(XENLOG_INFO, "APIC_ASSIST[%d]:\n", v->vcpu_id); > > - gdprintk(XENLOG_INFO, "\tenabled: %x\n", > > + gdprintk(XENLOG_G_INFO, "APIC_ASSIST[%d]:\n", v->vcpu_id); > > + gdprintk(XENLOG_G_INFO, "\tenabled: %x\n", > > v->arch.hvm_vcpu.viridian.apic_assist.fields.enabled); > > - gdprintk(XENLOG_INFO, "\tpfn: %lx\n", > > + gdprintk(XENLOG_G_INFO, "\tpfn: %lx\n", > > (unsigned long)v->arch.hvm_vcpu.viridian.apic_assist.fields.pfn); > > } > >