Re: [PATCH] KVM: selftests: x86: Skip unsupported test when Arch LBR is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> -	ret = _vcpu_set_msr(vm, 0, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_LBR_FMT);
> -	TEST_ASSERT(ret == 0, "Bad PERF_CAPABILITIES didn't fail.");
> +	/* Note, on Arch LBR capable platforms, LBR_FMT in perf capability msr is 0x3f,
> +	 * so skip below test if running on these platforms. */
> +	if (host_cap.lbr_format != PMU_CAP_LBR_FMT) {
> +		ret = _vcpu_set_msr(vm, 0, MSR_IA32_PERF_CAPABILITIES, PMU_CAP_LBR_FMT);
> +		TEST_ASSERT(ret == 0, "Bad PERF_CAPABILITIES didn't fail.");
> +	}

Why not try a different value?

Paolo





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux