From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v4 2/3] x86/viridian: Make logging less verbose
Date: Tue, 05 Aug 2014 10:53:32 +0100 [thread overview]
Message-ID: <53E0A99C.5020401@citrix.com> (raw)
In-Reply-To: <1407231886-5031-3-git-send-email-paul.durrant@citrix.com>
On 05/08/2014 10:44, Paul Durrant wrote:
> The use of gdprintk() adds uninteresting prefixes to the log lines, and
> there's really too many lines. This patch reduces the verbosity.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> ---
> xen/arch/x86/hvm/viridian.c | 53 ++++++++++++++++++++++++-------------------
> 1 file changed, 30 insertions(+), 23 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/viridian.c b/xen/arch/x86/hvm/viridian.c
> index 31c9656..9000375 100644
> --- a/xen/arch/x86/hvm/viridian.c
> +++ b/xen/arch/x86/hvm/viridian.c
> @@ -120,37 +120,44 @@ 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);
> + const union viridian_guest_os_id *goi;
> +
> + goi = &d->arch.hvm_domain.viridian.guest_os_id;
> +
> + printk(XENLOG_G_INFO "d%d: GUEST_OS_ID: vendor: %x os: %x major: %x minor: %x sp: %x build: %x\n",
> + d->domain_id,
> + goi->fields.vendor,
> + goi->fields.os,
> + goi->fields.major,
> + goi->fields.minor,
> + goi->fields.service_pack,
> + goi->fields.build_number);
> }
>
> static void dump_hypercall(const struct domain *d)
> {
> - gdprintk(XENLOG_INFO, "HYPERCALL:\n");
> - gdprintk(XENLOG_INFO, "\tenabled: %x\n",
> - d->arch.hvm_domain.viridian.hypercall_gpa.fields.enabled);
> - gdprintk(XENLOG_INFO, "\tpfn: %lx\n",
> - (unsigned long)d->arch.hvm_domain.viridian.hypercall_gpa.fields.pfn);
> + const union viridian_hypercall_gpa *hg;
> +
> + hg = &d->arch.hvm_domain.viridian.hypercall_gpa;
> +
> + printk(XENLOG_G_INFO "d%d: HYPERCALL: enabled: %x pfn: %lx\n",
> + d->domain_id,
> + hg->fields.enabled,
> + (unsigned long)hg->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",
> - v->arch.hvm_vcpu.viridian.apic_assist.fields.enabled);
> - gdprintk(XENLOG_INFO, "\tpfn: %lx\n",
> - (unsigned long)v->arch.hvm_vcpu.viridian.apic_assist.fields.pfn);
> + struct domain *d = v->domain;
> + const union viridian_apic_assist *aa;
> +
> + aa = &v->arch.hvm_vcpu.viridian.apic_assist;
> +
> + printk(XENLOG_G_INFO "d%dv%d: APIC_ASSIST: enabled: %x pfn: %lx\n",
> + d->domain_id,
> + v->vcpu_id,
%pv and just pass the vcpu.
~Andrew
> + aa->fields.enabled,
> + (unsigned long)aa->fields.pfn);
> }
>
> static void enable_hypercall_page(struct domain *d)
next prev parent reply other threads:[~2014-08-05 9:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 9:44 [PATCH v4 0/3] x86/viridian improvements Paul Durrant
2014-08-05 9:44 ` [PATCH v4 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask Paul Durrant
2014-08-05 10:16 ` David Vrabel
2014-08-05 10:33 ` Paul Durrant
2014-08-05 9:44 ` [PATCH v4 2/3] x86/viridian: Make logging less verbose Paul Durrant
2014-08-05 9:53 ` Andrew Cooper [this message]
2014-08-05 10:30 ` Paul Durrant
2014-08-05 9:44 ` [PATCH v4 3/3] x86/viridian: Add partition time reference counter MSR support Paul Durrant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53E0A99C.5020401@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.