From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, suravee.suthikulpanit@amd.com, tim@xen.org,
dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org,
Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com,
dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v17 14/23] x86/VPMU: Initialize VPMUs with __initcall
Date: Tue, 03 Feb 2015 11:02:17 -0500 [thread overview]
Message-ID: <54D0F109.6010501@oracle.com> (raw)
In-Reply-To: <54CBA922020000780005B655@mail.emea.novell.com>
On 01/30/2015 09:54 AM, Jan Beulich wrote:
>>>> On 05.01.15 at 22:44, <boris.ostrovsky@oracle.com> wrote:
>> --- a/xen/arch/x86/hvm/vpmu.c
>> +++ b/xen/arch/x86/hvm/vpmu.c
>> @@ -497,3 +497,39 @@ long do_xenpmu_op(int op, XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg)
>>
>> return ret;
>> }
>> +
>> +static int __init vpmu_init(void)
>> +{
>> + int vendor = current_cpu_data.x86_vendor;
>> +
>> + if ( vpmu_mode == XENPMU_MODE_OFF )
>> + {
>> + printk(XENLOG_INFO "VPMU: disabled\n");
>> + return 0;
>> + }
>> +
>> + switch ( vendor )
>> + {
>> + case X86_VENDOR_AMD:
>> + if ( amd_vpmu_init() )
>> + vpmu_mode = XENPMU_MODE_OFF;
>> + break;
>> + case X86_VENDOR_INTEL:
>> + if ( core2_vpmu_init() )
>> + vpmu_mode = XENPMU_MODE_OFF;
>> + break;
>> + default:
>> + printk(XENLOG_WARNING "VPMU: Unknown CPU vendor: %d\n", vendor);
>> + vpmu_mode = XENPMU_MODE_OFF;
>> + break;
>
> return 0;
>
> (i.e. avoid printing another message below)
>
>> + }
>> +
>> + if ( vpmu_mode == XENPMU_MODE_OFF )
>> + printk(XENLOG_WARNING "VPMU: Disabling due to initialization error\n");
>
> We repeatedly find that not printing at least a vague indication of
> what went wrong makes problem analysis quite a bit more difficult.
> It won't cost much to include the actual error code here.
The actual error is printed by the architectural code (i.e.
amd_vpmu_init()/core2_vpmu_init()).
-boris
next prev parent reply other threads:[~2015-02-03 16:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 21:43 [PATCH v17 00/23] x86/PMU: Xen PMU PV(H) support Boris Ostrovsky
2015-01-05 21:43 ` [PATCH v17 01/23] common/symbols: Export hypervisor symbols to privileged guest Boris Ostrovsky
2015-01-05 21:43 ` [PATCH v17 02/23] x86/VPMU: Don't globally disable VPMU if initialization fails Boris Ostrovsky
2015-01-05 21:43 ` [PATCH v17 03/23] x86/VPMU: Manage VPMU_CONTEXT_SAVE flag in vpmu_save_force() Boris Ostrovsky
2015-01-05 21:43 ` [PATCH v17 04/23] x86/VPMU: Set MSR bitmaps only for HVM/PVH guests Boris Ostrovsky
2015-01-05 21:43 ` [PATCH v17 05/23] x86/VPMU: Make vpmu macros a bit more efficient Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 06/23] intel/VPMU: Clean up Intel VPMU code Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 07/23] vmx: Merge MSR management routines Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 08/23] x86/VPMU: Handle APIC_LVTPC accesses Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 09/23] intel/VPMU: MSR_CORE_PERF_GLOBAL_CTRL should be initialized to zero Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 10/23] x86/VPMU: Add public xenpmu.h Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 11/23] x86/VPMU: Make vpmu not HVM-specific Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 12/23] x86/VPMU: Replace vcpu with vpmu as argument to some routines Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 13/23] x86/VPMU: Interface for setting PMU mode and flags Boris Ostrovsky
2015-01-30 13:31 ` Jan Beulich
2015-01-30 15:17 ` Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 14/23] x86/VPMU: Initialize VPMUs with __initcall Boris Ostrovsky
2015-01-30 14:54 ` Jan Beulich
2015-02-03 16:02 ` Boris Ostrovsky [this message]
2015-02-03 16:18 ` Jan Beulich
2015-01-05 21:44 ` [PATCH v17 15/23] x86/VPMU: Initialize PMU for PV(H) guests Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 16/23] x86/VPMU: Save VPMU state for PV guests during context switch Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 17/23] x86/VPMU: When handling MSR accesses, leave fault injection to callers Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 18/23] x86/VPMU: Add support for PMU register handling on PV guests Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 19/23] x86/VPMU: Handle PMU interrupts for " Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 20/23] x86/VPMU: Merge vpmu_rdmsr and vpmu_wrmsr Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 21/23] x86/VPMU: Add privileged PMU mode Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 22/23] x86/VPMU: NMI-based VPMU support Boris Ostrovsky
2015-01-05 21:44 ` [PATCH v17 23/23] x86/VPMU: Move VPMU files up from hvm/ directory Boris Ostrovsky
2015-01-20 10:37 ` [PATCH v17 00/23] x86/PMU: Xen PMU PV(H) support Jan Beulich
2015-01-20 16:38 ` Boris Ostrovsky
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=54D0F109.6010501@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=JBeulich@suse.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=dietmar.hahn@ts.fujitsu.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@xen.org \
--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.