summaryrefslogtreecommitdiff
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-15 17:17:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-15 17:17:15 -0700
commit069915b94642b05c9b45fee36862157026b36614 (patch)
treeb983c4968a7483f22bf64ea5c1c70e00daa9f455 /arch/x86/xen/enlighten.c
parent41c8c535237e9cea522024548c5bc37f7d34a81f (diff)
parentb9e0d95c041ca2d7ad297ee37c2e9cfab67a188f (diff)
Merge tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull five Xen bug-fixes from Konrad Rzeszutek Wilk: - When booting as PVHVM we would try to use PV console - but would not validate the parameters causing us to crash during restore b/c we re-use the wrong event channel. - When booting on machines with SR-IOV PCI bridge we didn't check for the bridge and tried to use it. - Under AMD machines would advertise the APERFMPERF resulting in needless amount of MSRs from the guest. - A global value (xen_released_pages) was not subtracted at bootup when pages were added back in. This resulted in the balloon worker having the wrong account of how many pages were truly released. - Fix dead-lock when xen-blkfront is run in the same domain as xen-blkback. * tag 'stable/for-linus-3.5-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: mark local pages as FOREIGN in the m2p_override xen/setup: filter APERFMPERF cpuid feature out xen/balloon: Subtract from xen_released_pages the count that is populated. xen/pci: Check for PCI bridge before using it. xen/events: Add WARN_ON when quick lookup found invalid type. xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness. xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN xen/hvc: Collapse error logic.
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index e74df9548a02..ff962d4b821e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -209,6 +209,9 @@ static void __init xen_banner(void)
xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
}
+#define CPUID_THERM_POWER_LEAF 6
+#define APERFMPERF_PRESENT 0
+
static __read_mostly unsigned int cpuid_leaf1_edx_mask = ~0;
static __read_mostly unsigned int cpuid_leaf1_ecx_mask = ~0;
@@ -242,6 +245,11 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
*dx = cpuid_leaf5_edx_val;
return;
+ case CPUID_THERM_POWER_LEAF:
+ /* Disabling APERFMPERF for kernel usage */
+ maskecx = ~(1 << APERFMPERF_PRESENT);
+ break;
+
case 0xb:
/* Suppress extended topology stuff */
maskebx = 0;