From: Joerg Roedel Date: Wed, 29 Feb 2012 13:57:32 +0000 (+0100) Subject: perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled X-Git-Tag: v3.2.10~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9701e4af7147129671f1946794e52f6abcd6f17a;p=pandora-kernel.git perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled commit 1018faa6cf23b256bf25919ef203cd7c129f06f2 upstream. It turned out that a performance counter on AMD does not count at all when the GO or HO bit is set in the control register and SVM is disabled in EFER. This patch works around this issue by masking out the HO bit in the performance counter control register when SVM is not enabled. The GO bit is not touched because it is only set when the user wants to count in guest-mode only. So when SVM is disabled the counter should not run at all and the not-counting is the intended behaviour. Signed-off-by: Joerg Roedel Signed-off-by: Peter Zijlstra Cc: Avi Kivity Cc: Stephane Eranian Cc: David Ahern Cc: Gleb Natapov Cc: Robert Richter Link: http://lkml.kernel.org/r/1330523852-19566-1-git-send-email-joerg.roedel@amd.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed