[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/amd: Fix xen_apic_write warnings in Dom0
On 10/15/2012 02:09 PM, Keir Fraser wrote: On 15/10/2012 12:12, "Jan Beulich"<JBeulich@xxxxxxxx> wrote:On 09.10.12 at 10:06, Wei Wang<wei.wang2@xxxxxxx> wrote:--- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -485,6 +485,17 @@ static void __devinit init_amd(struct cpuinfo_x86 *c) if (c->x86> 0x11) set_bit(X86_FEATURE_ARAT, c->x86_capability); + /* + * Prior to Family 0x14, perf counters are not reset during warm reboot. + * We have to reset them manually. + */ + if (c->x86< 0x14) { + wrmsrl(MSR_K7_PERFCTR0, 0); + wrmsrl(MSR_K7_PERFCTR1, 0); + wrmsrl(MSR_K7_PERFCTR2, 0); + wrmsrl(MSR_K7_PERFCTR3, 0); + }This collides with the NMI watchdog setup: smp_callin() calls setup_local_APIC() _before_ calling smp_store_cpu_info(), and hence you write zero again to an MSR possibly already in use. Since setup_k7_watchdog() itself does the clearing of the MSRs in question already, I would think that the most simple adjustment to your patch would be to make the condition if (nmi_watchdog != NMI_LOCAL_APIC&& c->x86< 0x14) { If you agree (and Keir doesn't object), I would commit it that way.Sounds good. Acked-by: Keir Fraser<keir@xxxxxxx> Sounds good to me too. Acked Thanks, Wei Jan+ if (cpuid_edx(0x80000007)& (1<< 10)) { rdmsr(MSR_K7_HWCR, l, h); l |= (1<< 27); /* Enable read-only APERF/MPERF bit */ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |