Home
last modified time | relevance | path

Searched refs:cap (Results 1 – 18 of 18) sorted by relevance

/tools/testing/selftests/kvm/x86_64/
Dplatform_info_test.c40 struct kvm_enable_cap cap = {}; in set_msr_platform_info_enabled() local
42 cap.cap = KVM_CAP_MSR_PLATFORM_INFO; in set_msr_platform_info_enabled()
43 cap.flags = 0; in set_msr_platform_info_enabled()
44 cap.args[0] = (int)enable; in set_msr_platform_info_enabled()
45 vm_enable_cap(vm, &cap); in set_msr_platform_info_enabled()
Dsync_regs_test.c87 int rv, cap; in main() local
92 cap = kvm_check_cap(KVM_CAP_SYNC_REGS); in main()
93 if ((cap & TEST_SYNC_FIELDS) != TEST_SYNC_FIELDS) { in main()
97 if ((cap & INVALID_SYNC_FIELD) != 0) { in main()
/tools/power/x86/x86_energy_perf_policy/
Dx86_energy_perf_policy.c671 void print_hwp_cap(int cpu, struct msr_hwp_cap *cap, char *str) in print_hwp_cap() argument
677 cap->lowest, cap->efficient, cap->guaranteed, cap->highest); in print_hwp_cap()
679 void read_hwp_cap(int cpu, struct msr_hwp_cap *cap, unsigned int msr_offset) in read_hwp_cap() argument
685 cap->highest = msr_perf_2_ratio(HWP_HIGHEST_PERF(msr)); in read_hwp_cap()
686 cap->guaranteed = msr_perf_2_ratio(HWP_GUARANTEED_PERF(msr)); in read_hwp_cap()
687 cap->efficient = msr_perf_2_ratio(HWP_MOSTEFFICIENT_PERF(msr)); in read_hwp_cap()
688 cap->lowest = msr_perf_2_ratio(HWP_LOWEST_PERF(msr)); in read_hwp_cap()
752 struct msr_hwp_cap cap; in print_cpu_msrs() local
766 read_hwp_cap(cpu, &cap, MSR_HWP_CAPABILITIES); in print_cpu_msrs()
767 print_hwp_cap(cpu, &cap, ""); in print_cpu_msrs()
[all …]
/tools/perf/util/
Dcap.h13 bool perf_cap__capable(cap_value_t cap);
20 static inline bool perf_cap__capable(int cap __maybe_unused) in perf_cap__capable()
Dcap.c12 bool perf_cap__capable(cap_value_t cap) in perf_cap__capable() argument
20 if (cap_get_flag(caps, cap, CAP_EFFECTIVE, &val) != 0) in perf_cap__capable()
Dpython-ext-sources10 util/cap.c
DBuild157 perf-$(CONFIG_LIBCAP) += cap.o
/tools/lib/bpf/
Dhashmap.c40 map->cap = 0; in hashmap__init()
67 map->cap = map->cap_bits = map->sz = 0; in hashmap__clear()
86 return map->cap; in hashmap__capacity()
92 return (map->cap == 0) || ((map->sz + 1) * 4 / 3 > map->cap); in hashmap_needs_to_grow()
117 map->cap = new_cap; in hashmap_grow()
Dhashmap.h41 size_t cap; member
51 .cap = 0, \
139 for (bkt = 0; bkt < map->cap; bkt++) \
151 for (bkt = 0; bkt < map->cap; bkt++) \
Dbtf.c1306 __u32 cap; member
1613 .cap = 0, in btf_dedup_strings()
1622 if (strs.cnt + 1 > strs.cap) { in btf_dedup_strings()
1625 strs.cap += max(strs.cnt / 2, 16); in btf_dedup_strings()
1627 sizeof(strs.ptrs[0]) * strs.cap); in btf_dedup_strings()
/tools/testing/selftests/kvm/
Ddirty_log_test.c320 struct kvm_enable_cap cap = {}; in run_test() local
322 cap.cap = KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2; in run_test()
323 cap.args[0] = 1; in run_test()
324 vm_enable_cap(vm, &cap); in run_test()
/tools/testing/selftests/kvm/s390x/
Dsync_regs_test.c72 int rv, cap; in main() local
77 cap = kvm_check_cap(KVM_CAP_SYNC_REGS); in main()
78 if (!cap) { in main()
/tools/testing/selftests/vm/
Dmlock-random-test.c28 cap_t cap = cap_init(); in set_cap_limits() local
38 if (cap_set_proc(cap)) { in set_cap_limits()
/tools/testing/selftests/tpm2/
Dtpm2.py667 def __get_cap_cnt(self, cap, pt, cnt): argument
675 cap, pt, cnt)
678 more_data, cap, cnt = struct.unpack('>BII', rsp[:9])
688 def get_cap(self, cap, pt): argument
693 next_handles, more_data = self.__get_cap_cnt(cap, pt, 1)
/tools/testing/selftests/kvm/include/
Dkvm_util.h68 int kvm_check_cap(long cap);
69 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap);
/tools/testing/selftests/kvm/lib/
Dkvm_util.c47 int kvm_check_cap(long cap) in kvm_check_cap() argument
56 ret = ioctl(kvm_fd, KVM_CHECK_EXTENSION, cap); in kvm_check_cap()
77 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap) in vm_enable_cap() argument
81 ret = ioctl(vm->fd, KVM_ENABLE_CAP, cap); in vm_enable_cap()
/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c51 .cap = KVM_CAP_HYPERV_ENLIGHTENED_VMCS, in vcpu_enable_evmcs()
/tools/include/uapi/linux/
Dkvm.h710 __u32 cap; member