perf/x86/kvm: Fix Host-Only/Guest-Only counting with SVM disabled
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 <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Avi Kivity <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: [email protected] # v3.2
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>