Lines Matching refs:kvm_caps

90 struct kvm_caps kvm_caps __read_mostly = {
93 EXPORT_SYMBOL_GPL(kvm_caps);
2385 kvm_vcpu_write_tsc_multiplier(vcpu, kvm_caps.default_tsc_scaling_ratio);
2390 if (!kvm_caps.has_tsc_control) {
2402 ratio = mul_u64_u32_div(1ULL << kvm_caps.tsc_scaling_ratio_frac_bits,
2405 if (ratio == 0 || ratio >= kvm_caps.max_tsc_scaling_ratio) {
2423 kvm_vcpu_write_tsc_multiplier(vcpu, kvm_caps.default_tsc_scaling_ratio);
2500 * N equals to kvm_caps.tsc_scaling_ratio_frac_bits.
2504 return mul_u64_u64_shr(tsc, ratio, kvm_caps.tsc_scaling_ratio_frac_bits);
2511 if (ratio != kvm_caps.default_tsc_scaling_ratio)
2538 if (l2_multiplier == kvm_caps.default_tsc_scaling_ratio)
2542 kvm_caps.tsc_scaling_ratio_frac_bits);
2551 if (l2_multiplier != kvm_caps.default_tsc_scaling_ratio)
2553 kvm_caps.tsc_scaling_ratio_frac_bits);
2595 if (kvm_caps.has_tsc_control)
2731 if (vcpu->arch.l1_tsc_scaling_ratio != kvm_caps.default_tsc_scaling_ratio)
3144 if (kvm_caps.has_tsc_control)
3679 if (data & ~kvm_caps.supported_xss)
4474 r = kvm_caps.has_tsc_control;
4496 if (kvm_caps.has_bus_lock_exit)
4505 r = xstate_required_size(kvm_caps.supported_xcr0 & guest_perm, false);
4517 r = kvm_caps.has_notify_vmexit;
4546 if (put_user(kvm_caps.supported_xcr0, uaddr))
4623 if (copy_to_user(argp, &kvm_caps.supported_mce_cap,
4624 sizeof(kvm_caps.supported_mce_cap)))
4925 if (mcg_cap & ~(kvm_caps.supported_mce_cap | 0xff | 0xff0000))
5302 kvm_caps.supported_xcr0,
5808 if (kvm_caps.has_tsc_control &&
5809 user_tsc_khz >= kvm_caps.max_guest_tsc_khz)
6258 if (kvm_caps.has_bus_lock_exit &&
6339 if (!kvm_caps.has_notify_vmexit)
6907 if (kvm_caps.has_tsc_control &&
6908 user_tsc_khz >= kvm_caps.max_guest_tsc_khz)
9133 kvm_caps.max_guest_tsc_khz = tsc_khz;
9403 kvm_caps.supported_xcr0 = host_xcr0 & KVM_SUPPORTED_XCR0;
12290 kvm_caps.supported_xss = 0;
12296 if (kvm_caps.has_tsc_control) {
12304 __scale_tsc(kvm_caps.max_tsc_scaling_ratio, tsc_khz));
12305 kvm_caps.max_guest_tsc_khz = max;
12307 kvm_caps.default_tsc_scaling_ratio = 1ULL << kvm_caps.tsc_scaling_ratio_frac_bits;