diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 915b876edd1e..3373f84d1397 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -338,6 +338,9 @@ int x86_setup_perfctr(struct perf_event *event) | |||
338 | /* BTS is currently only allowed for user-mode. */ | 338 | /* BTS is currently only allowed for user-mode. */ |
339 | if (!attr->exclude_kernel) | 339 | if (!attr->exclude_kernel) |
340 | return -EOPNOTSUPP; | 340 | return -EOPNOTSUPP; |
341 | |||
342 | if (!attr->exclude_guest) | ||
343 | return -EOPNOTSUPP; | ||
341 | } | 344 | } |
342 | 345 | ||
343 | hwc->config |= config; | 346 | hwc->config |= config; |
@@ -380,6 +383,9 @@ int x86_pmu_hw_config(struct perf_event *event) | |||
380 | if (event->attr.precise_ip) { | 383 | if (event->attr.precise_ip) { |
381 | int precise = 0; | 384 | int precise = 0; |
382 | 385 | ||
386 | if (!event->attr.exclude_guest) | ||
387 | return -EOPNOTSUPP; | ||
388 | |||
383 | /* Support for constant skid */ | 389 | /* Support for constant skid */ |
384 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { | 390 | if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { |
385 | precise++; | 391 | precise++; |