int main(int argc, char *argv[])
{
- struct kvm_cpuid2 *cpuid;
struct kvm_cpuid_entry2 *entry_a_0;
struct kvm_vm *vm;
struct kvm_vcpu *vcpu;
/* Create VM */
vm = vm_create_with_one_vcpu(&vcpu, guest_code);
- cpuid = kvm_get_supported_cpuid();
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_PDCM));
__TEST_REQUIRE(eax.split.version_id, "PMU is not supported by the vCPU");
/* testcase 1, set capabilities when we have PDCM bit */
- vcpu_set_cpuid(vcpu, cpuid);
vcpu_set_msr(vcpu, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_FW_WRITES);
/* check capabilities can be retrieved with KVM_GET_MSR */