Home
last modified time | relevance | path

Searched refs:nr_vcpus (Results 1 – 23 of 23) sorted by relevance

/Linux-v6.1/tools/testing/selftests/kvm/
Daccess_tracking_perf_test.c78 int nr_vcpus; member
259 static void run_iteration(struct kvm_vm *vm, int nr_vcpus, const char *description) in run_iteration() argument
271 for (i = 0; i < nr_vcpus; i++) in run_iteration()
279 static void access_memory(struct kvm_vm *vm, int nr_vcpus, in access_memory() argument
284 run_iteration(vm, nr_vcpus, description); in access_memory()
287 static void mark_memory_idle(struct kvm_vm *vm, int nr_vcpus) in mark_memory_idle() argument
297 run_iteration(vm, nr_vcpus, "Mark memory idle"); in mark_memory_idle()
304 int nr_vcpus = params->nr_vcpus; in run_test() local
306 vm = perf_test_create_vm(mode, nr_vcpus, params->vcpu_memory_bytes, 1, in run_test()
309 perf_test_start_vcpu_threads(nr_vcpus, vcpu_thread_main); in run_test()
[all …]
Dmax_guest_memory_test.c36 static int nr_vcpus; variable
99 threads = malloc(nr_vcpus * sizeof(*threads)); in spawn_workers()
102 info = malloc(nr_vcpus * sizeof(*info)); in spawn_workers()
105 nr_bytes = ((end_gpa - start_gpa) / nr_vcpus) & in spawn_workers()
107 TEST_ASSERT(nr_bytes, "C'mon, no way you have %d CPUs", nr_vcpus); in spawn_workers()
109 for (i = 0, gpa = start_gpa; i < nr_vcpus; i++, gpa += nr_bytes) { in spawn_workers()
138 atomic_set(&rendezvous, -nr_vcpus - 1); in rendezvous_with_vcpus()
140 atomic_set(&rendezvous, nr_vcpus + 1); in rendezvous_with_vcpus()
152 nr_vcpus = CPU_COUNT(&possible_mask) * 3/4; in calc_default_nr_vcpus()
153 TEST_ASSERT(nr_vcpus > 0, "Uh, no CPUs?"); in calc_default_nr_vcpus()
[all …]
Ddirty_log_perf_test.c30 static void arch_setup_vm(struct kvm_vm *vm, unsigned int nr_vcpus) in arch_setup_vm() argument
36 gic_fd = vgic_v3_setup(vm, nr_vcpus, 64, GICD_BASE_GPA, GICR_BASE_GPA); in arch_setup_vm()
47 static void arch_setup_vm(struct kvm_vm *vm, unsigned int nr_vcpus) in arch_setup_vm() argument
60 static int nr_vcpus = 1; variable
224 vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size, in run_test()
230 guest_num_pages = (nr_vcpus * guest_percpu_mem_size) >> vm->page_shift; in run_test()
241 arch_setup_vm(vm, nr_vcpus); in run_test()
248 for (i = 0; i < nr_vcpus; i++) in run_test()
251 perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker); in run_test()
255 for (i = 0; i < nr_vcpus; i++) { in run_test()
[all …]
Dmemslot_modification_stress_test.c34 static int nr_vcpus = 1; variable
100 vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size, 1, in run_test()
106 perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker); in run_test()
115 perf_test_join_vcpu_threads(nr_vcpus); in run_test()
169 nr_vcpus = atoi(optarg); in main()
170 TEST_ASSERT(nr_vcpus > 0 && nr_vcpus <= max_vcpus, in main()
Dkvm_page_table_test.c68 static uint32_t nr_vcpus = 1; variable
257 vm = __vm_create_with_vcpus(mode, nr_vcpus, guest_num_pages, in pre_init_before_test()
314 pr_info("Number of testing vCPUs: %d\n", nr_vcpus); in pre_init_before_test()
325 for (vcpus = 0; vcpus < nr_vcpus; vcpus++) { in vcpus_complete_new_stage()
332 for (vcpus = 0; vcpus < nr_vcpus; vcpus++) { in vcpus_complete_new_stage()
355 vcpu_threads = malloc(nr_vcpus * sizeof(*vcpu_threads)); in run_test()
361 for (i = 0; i < nr_vcpus; i++) in run_test()
405 for (i = 0; i < nr_vcpus; i++) { in run_test()
410 for (i = 0; i < nr_vcpus; i++) in run_test()
464 nr_vcpus = atoi(optarg); in main()
[all …]
Ddemand_paging_test.c40 static int nr_vcpus = 1; variable
288 vm = perf_test_create_vm(mode, nr_vcpus, guest_percpu_mem_size, 1, in run_test()
300 malloc(nr_vcpus * sizeof(*uffd_handler_threads)); in run_test()
303 uffd_args = malloc(nr_vcpus * sizeof(*uffd_args)); in run_test()
306 pipefds = malloc(sizeof(int) * nr_vcpus * 2); in run_test()
309 for (i = 0; i < nr_vcpus; i++) { in run_test()
339 perf_test_start_vcpu_threads(nr_vcpus, vcpu_worker); in run_test()
342 perf_test_join_vcpu_threads(nr_vcpus); in run_test()
350 for (i = 0; i < nr_vcpus; i++) { in run_test()
361 perf_test_args.vcpu_args[0].pages * nr_vcpus / in run_test()
[all …]
/Linux-v6.1/tools/testing/selftests/kvm/lib/
Dperf_test_util.c73 void perf_test_setup_vcpus(struct kvm_vm *vm, int nr_vcpus, in perf_test_setup_vcpus() argument
82 for (i = 0; i < nr_vcpus; i++) { in perf_test_setup_vcpus()
96 vcpu_args->pages = (nr_vcpus * vcpu_memory_bytes) / in perf_test_setup_vcpus()
109 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int nr_vcpus, in perf_test_create_vm() argument
133 (nr_vcpus * vcpu_memory_bytes) / pta->guest_page_size); in perf_test_create_vm()
148 slot0_pages += perf_test_nested_pages(nr_vcpus); in perf_test_create_vm()
155 vm = __vm_create_with_vcpus(mode, nr_vcpus, slot0_pages + guest_num_pages, in perf_test_create_vm()
179 guest_num_pages, region_end_gfn - 1, nr_vcpus, vcpu_memory_bytes); in perf_test_create_vm()
204 perf_test_setup_vcpus(vm, nr_vcpus, vcpus, vcpu_memory_bytes, in perf_test_create_vm()
209 perf_test_setup_nested(vm, nr_vcpus, vcpus); in perf_test_create_vm()
[all …]
Dkvm_util.c368 struct kvm_vm *__vm_create_with_vcpus(enum vm_guest_mode mode, uint32_t nr_vcpus, in __vm_create_with_vcpus() argument
375 TEST_ASSERT(!nr_vcpus || vcpus, "Must provide vCPU array"); in __vm_create_with_vcpus()
377 vm = __vm_create(mode, nr_vcpus, extra_mem_pages); in __vm_create_with_vcpus()
379 for (i = 0; i < nr_vcpus; ++i) in __vm_create_with_vcpus()
/Linux-v6.1/tools/testing/selftests/kvm/aarch64/
Darch_timer.c46 int nr_vcpus; member
53 .nr_vcpus = NR_VCPUS_DEF,
195 gic_init(GIC_V3, test_args.nr_vcpus, in guest_code()
296 for (n_done = 0, i = 0; i < test_args.nr_vcpus; i++) { in test_vcpu_migration()
308 } while (test_args.nr_vcpus != n_done); in test_vcpu_migration()
320 vcpu_done_map = bitmap_zalloc(test_args.nr_vcpus); in test_run()
323 for (i = 0; i < (unsigned long)test_args.nr_vcpus; i++) { in test_run()
339 for (i = 0; i < test_args.nr_vcpus; i++) in test_run()
368 int nr_vcpus = test_args.nr_vcpus; in test_vm_create() local
370 vm = vm_create_with_vcpus(nr_vcpus, guest_code, vcpus); in test_vm_create()
[all …]
Dvgic_init.c77 uint32_t nr_vcpus, in vm_gic_create_with_vcpus() argument
83 v.vm = vm_create_with_vcpus(nr_vcpus, guest_code, vcpus); in vm_gic_create_with_vcpus()
476 static struct vm_gic vm_gic_v3_create_with_vcpuids(int nr_vcpus, in vm_gic_v3_create_with_vcpuids() argument
482 v.vm = vm_create(nr_vcpus); in vm_gic_v3_create_with_vcpuids()
483 for (i = 0; i < nr_vcpus; i++) in vm_gic_v3_create_with_vcpuids()
/Linux-v6.1/tools/testing/selftests/kvm/lib/aarch64/
Dvgic.c33 int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs, in vgic_v3_setup() argument
41 TEST_ASSERT(nr_vcpus, "Number of vCPUs cannot be empty\n"); in vgic_v3_setup()
49 TEST_ASSERT(nr_vcpus == nr_vcpus_created, in vgic_v3_setup()
51 nr_vcpus, nr_vcpus_created); in vgic_v3_setup()
69 redist_attr = REDIST_REGION_ATTR_ADDR(nr_vcpus, gicr_base_gpa, 0, 0); in vgic_v3_setup()
73 KVM_VGIC_V3_REDIST_SIZE * nr_vcpus); in vgic_v3_setup()
/Linux-v6.1/tools/testing/selftests/kvm/lib/x86_64/
Dperf_test_util.c52 uint64_t perf_test_nested_pages(int nr_vcpus) in perf_test_nested_pages() argument
59 return 513 + 10 * nr_vcpus; in perf_test_nested_pages()
80 void perf_test_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vcpus[]) in perf_test_setup_nested() argument
89 for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++) { in perf_test_setup_nested()
/Linux-v6.1/tools/testing/selftests/kvm/include/
Dperf_test_util.h48 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int nr_vcpus,
60 uint64_t perf_test_nested_pages(int nr_vcpus);
61 void perf_test_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vcpus[]);
Dkvm_util_base.h663 struct kvm_vm *__vm_create_with_vcpus(enum vm_guest_mode mode, uint32_t nr_vcpus,
667 static inline struct kvm_vm *vm_create_with_vcpus(uint32_t nr_vcpus, in vm_create_with_vcpus() argument
671 return __vm_create_with_vcpus(VM_MODE_DEFAULT, nr_vcpus, 0, in vm_create_with_vcpus()
/Linux-v6.1/tools/testing/selftests/kvm/x86_64/
Dset_boot_cpu_id.c76 static struct kvm_vm *create_vm(uint32_t nr_vcpus, uint32_t bsp_vcpu_id, in create_vm() argument
82 vm = vm_create(nr_vcpus); in create_vm()
86 for (i = 0; i < nr_vcpus; i++) in create_vm()
/Linux-v6.1/drivers/virt/nitro_enclaves/
Dne_pci_dev.h247 u64 nr_vcpus; member
272 u64 nr_vcpus; member
Dne_misc_dev.h76 unsigned int nr_vcpus; member
Dne_misc_dev.c731 ne_enclave->nr_vcpus++; in ne_add_vcpu_ioctl()
1097 if (!ne_enclave->nr_vcpus) { in ne_start_enclave_ioctl()
/Linux-v6.1/arch/arm64/kvm/vgic/
Dvgic-v4.c238 int nr_vcpus, ret; in vgic_v4_init() local
247 nr_vcpus = atomic_read(&kvm->online_vcpus); in vgic_v4_init()
249 dist->its_vm.vpes = kcalloc(nr_vcpus, sizeof(*dist->its_vm.vpes), in vgic_v4_init()
254 dist->its_vm.nr_vpes = nr_vcpus; in vgic_v4_init()
Dvgic-mmio-v2.c124 int nr_vcpus = atomic_read(&source_vcpu->kvm->online_vcpus); in vgic_mmio_write_sgir() local
135 targets = (1U << nr_vcpus) - 1; /* all, ... */ in vgic_mmio_write_sgir()
Dvgic-mmio-v3.c869 int nr_vcpus = atomic_read(&kvm->online_vcpus); in vgic_v3_alloc_redist_region() local
871 : nr_vcpus * KVM_VGIC_V3_REDIST_SIZE; in vgic_v3_alloc_redist_region()
/Linux-v6.1/tools/testing/selftests/kvm/include/aarch64/
Dvgic.h19 int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs,
/Linux-v6.1/arch/s390/kvm/
Dvsie.c1324 int nr_vcpus; in get_vsie_page() local
1339 nr_vcpus = atomic_read(&kvm->online_vcpus); in get_vsie_page()
1342 if (kvm->arch.vsie.page_count < nr_vcpus) { in get_vsie_page()
1359 kvm->arch.vsie.next %= nr_vcpus; in get_vsie_page()