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

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 <paul.durrant@xxxxxxxxxx>
> Cc: Keir Fraser <keir@xxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>

gdprintk() already makes them guest log levels, so this change is a
functional noop.

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.

~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);
>  }
>  


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