Commit bae19fd
perf/x86/amd/core: Fix reloading events for SVM
Commit 1018faa ("perf/x86/kvm: Fix Host-Only/Guest-Only
counting with SVM disabled") addresses an issue in which the
Host-Only bit in the counter control registers needs to be
masked off when SVM is not enabled.
The events need to be reloaded whenever SVM is enabled or
disabled for a CPU and this requires the PERF_CTL registers
to be reprogrammed using {enable,disable}_all(). However,
PerfMonV2 variants of these functions do not reprogram the
PERF_CTL registers. Hence, the legacy enable_all() function
should also be called.
Fixes: 9622e67 ("perf/x86/amd/core: Add PerfMonV2 counter control")
Reported-by: Like Xu <likexu@tencent.com>
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220518084327.464005-1-sandipan.das@amd.com1 parent 841b51e commit bae19fd
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1475 | 1493 | | |
1476 | 1494 | | |
1477 | 1495 | | |
1478 | 1496 | | |
1479 | 1497 | | |
1480 | 1498 | | |
1481 | 1499 | | |
1482 | | - | |
1483 | | - | |
| 1500 | + | |
1484 | 1501 | | |
1485 | 1502 | | |
1486 | 1503 | | |
| |||
1497 | 1514 | | |
1498 | 1515 | | |
1499 | 1516 | | |
1500 | | - | |
1501 | | - | |
| 1517 | + | |
1502 | 1518 | | |
1503 | 1519 | | |
0 commit comments