Userspace can assign a PMU to a VCPU with the KVM_ARM_VCPU_PMU_V3_SET_PMU device ioctl. If the VCPU is scheduled on a physical CPU which has a different PMU, the perf events needed to emulate a guest PMU won't be scheduled in and the guest performance counters will stop counting. Treat it as an userspace error and refuse to run the VCPU in this situation.
Showing the changes to arch/arm64/include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -414,6 +414,9 @@ struct kvm_arm_copy_mte_tags { · 413 unmodified lines | ||
| 414 | 414 | #define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS |
| 415 | 415 | #define KVM_PSCI_RET_DENIED PSCI_RET_DENIED |
| 416 | 416 | |
| 417 | +/* run->fail_entry.hardware_entry_failure_reason codes. */ | |
| 418 | +#define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0) | |
| 419 | + | |
| 417 | 420 | #endif |
| 418 | 421 | |
| 419 | 422 | #endif /* __ARM_KVM_H__ */ |