Home
last modified time | relevance | path

Searched refs:kvm_vm (Results 1 – 25 of 72) sorted by relevance

123

/tools/testing/selftests/kvm/include/
Dkvm_util.h26 struct kvm_vm;
85 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap);
86 int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id,
88 void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size);
91 struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm);
92 void kvm_vm_free(struct kvm_vm *vmp);
93 void kvm_vm_restart(struct kvm_vm *vmp, int perm);
94 void kvm_vm_release(struct kvm_vm *vmp);
95 void kvm_vm_get_dirty_log(struct kvm_vm *vm, int slot, void *log);
96 void kvm_vm_clear_dirty_log(struct kvm_vm *vm, int slot, void *log,
[all …]
Dperf_test_util.h29 struct kvm_vm *vm;
46 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
49 void perf_test_destroy_vm(struct kvm_vm *vm);
50 void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus,
/tools/testing/selftests/kvm/include/aarch64/
Dprocessor.h46 static inline void get_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint64_t *addr) in get_reg()
54 static inline void set_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint64_t val) in set_reg()
62 void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init);
63 void aarch64_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid,
112 void vm_init_descriptor_tables(struct kvm_vm *vm);
113 void vcpu_init_descriptor_tables(struct kvm_vm *vm, uint32_t vcpuid);
116 void vm_install_exception_handler(struct kvm_vm *vm,
118 void vm_install_sync_handler(struct kvm_vm *vm,
/tools/testing/selftests/kvm/lib/
Dkvm_util.c105 int vm_enable_cap(struct kvm_vm *vm, struct kvm_enable_cap *cap) in vm_enable_cap()
129 int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id, in vcpu_enable_cap()
144 void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size) in vm_enable_dirty_ring()
154 static void vm_open(struct kvm_vm *vm, int perm) in vm_open()
222 struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm) in vm_create()
224 struct kvm_vm *vm; in vm_create()
343 struct kvm_vm *vm_create_with_vcpus(enum vm_guest_mode mode, uint32_t nr_vcpus, in vm_create_with_vcpus()
349 struct kvm_vm *vm; in vm_create_with_vcpus()
388 struct kvm_vm *vm_create_default_with_vcpus(uint32_t nr_vcpus, uint64_t extra_mem_pages, in vm_create_default_with_vcpus()
396 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default()
[all …]
Dkvm_util_internal.h47 struct kvm_vm { struct
72 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid); argument
89 void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent);
126 memslot2region(struct kvm_vm *vm, uint32_t memslot);
Dperf_test_util.c52 struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus, in perf_test_create_vm()
56 struct kvm_vm *vm; in perf_test_create_vm()
121 void perf_test_destroy_vm(struct kvm_vm *vm) in perf_test_destroy_vm()
127 void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus, in perf_test_setup_vcpus()
/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c19 static uint64_t page_align(struct kvm_vm *vm, uint64_t v) in page_align()
24 static uint64_t pgd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pgd_index()
32 static uint64_t pud_index(struct kvm_vm *vm, vm_vaddr_t gva) in pud_index()
43 static uint64_t pmd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pmd_index()
54 static uint64_t pte_index(struct kvm_vm *vm, vm_vaddr_t gva) in pte_index()
60 static uint64_t pte_addr(struct kvm_vm *vm, uint64_t entry) in pte_addr()
66 static uint64_t ptrs_per_pgd(struct kvm_vm *vm) in ptrs_per_pgd()
72 static uint64_t __maybe_unused ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte()
77 void virt_pgd_alloc(struct kvm_vm *vm) in virt_pgd_alloc()
88 static void _virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr, in _virt_pg_map()
[all …]
Ducall.c12 static bool ucall_mmio_init(struct kvm_vm *vm, vm_paddr_t gpa) in ucall_mmio_init()
25 void ucall_init(struct kvm_vm *vm, void *arg) in ucall_init()
68 void ucall_uninit(struct kvm_vm *vm) in ucall_uninit()
91 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall()
/tools/testing/selftests/kvm/x86_64/
Dset_boot_cpu_id.c41 static void test_set_boot_busy(struct kvm_vm *vm) in test_set_boot_busy()
50 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu()
83 static struct kvm_vm *create_vm(void) in create_vm()
85 struct kvm_vm *vm; in create_vm()
99 static void add_x86_vcpu(struct kvm_vm *vm, uint32_t vcpuid, bool bsp_code) in add_x86_vcpu()
109 struct kvm_vm *vm; in run_vm_bsp()
128 struct kvm_vm *vm; in check_set_bsp_busy()
Dplatform_info_test.c38 static void set_msr_platform_info_enabled(struct kvm_vm *vm, bool enable) in set_msr_platform_info_enabled()
48 static void test_msr_platform_info_enabled(struct kvm_vm *vm) in test_msr_platform_info_enabled()
68 static void test_msr_platform_info_disabled(struct kvm_vm *vm) in test_msr_platform_info_disabled()
82 struct kvm_vm *vm; in main()
Demulator_error_test.c31 static void run_guest(struct kvm_vm *vm) in run_guest()
60 static void process_exit_on_emulation_error(struct kvm_vm *vm) in process_exit_on_emulation_error()
103 static void do_guest_assert(struct kvm_vm *vm, struct ucall *uc) in do_guest_assert()
109 static void check_for_guest_assert(struct kvm_vm *vm) in check_for_guest_assert()
120 static void process_ucall_done(struct kvm_vm *vm) in process_ucall_done()
137 static uint64_t process_ucall(struct kvm_vm *vm) in process_ucall()
171 struct kvm_vm *vm; in main()
Duserspace_msr_exit_test.c398 static void run_guest(struct kvm_vm *vm) in run_guest()
406 static void check_for_guest_assert(struct kvm_vm *vm) in check_for_guest_assert()
418 static void process_rdmsr(struct kvm_vm *vm, uint32_t msr_index) in process_rdmsr()
453 static void process_wrmsr(struct kvm_vm *vm, uint32_t msr_index) in process_wrmsr()
484 static void process_ucall_done(struct kvm_vm *vm) in process_ucall_done()
501 static uint64_t process_ucall(struct kvm_vm *vm) in process_ucall()
529 static void run_guest_then_process_rdmsr(struct kvm_vm *vm, uint32_t msr_index) in run_guest_then_process_rdmsr()
535 static void run_guest_then_process_wrmsr(struct kvm_vm *vm, uint32_t msr_index) in run_guest_then_process_wrmsr()
541 static uint64_t run_guest_then_process_ucall(struct kvm_vm *vm) in run_guest_then_process_ucall()
547 static void run_guest_then_process_ucall_done(struct kvm_vm *vm) in run_guest_then_process_ucall_done()
[all …]
Dvmx_set_nested_state_test.c30 void test_nested_state(struct kvm_vm *vm, struct kvm_nested_state *state) in test_nested_state()
35 void test_nested_state_expect_errno(struct kvm_vm *vm, in test_nested_state_expect_errno()
48 void test_nested_state_expect_einval(struct kvm_vm *vm, in test_nested_state_expect_einval()
54 void test_nested_state_expect_efault(struct kvm_vm *vm, in test_nested_state_expect_efault()
89 void test_vmx_nested_state(struct kvm_vm *vm) in test_vmx_nested_state()
247 void disable_vmx(struct kvm_vm *vm) in disable_vmx()
265 struct kvm_vm *vm; in main()
/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c14 void virt_pgd_alloc(struct kvm_vm *vm) in virt_pgd_alloc()
37 static uint64_t virt_alloc_region(struct kvm_vm *vm, int ri) in virt_alloc_region()
50 void virt_pg_map(struct kvm_vm *vm, uint64_t gva, uint64_t gpa) in virt_pg_map()
89 vm_paddr_t addr_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_gva2gpa()
114 static void virt_dump_ptes(FILE *stream, struct kvm_vm *vm, uint8_t indent, in virt_dump_ptes()
128 static void virt_dump_region(FILE *stream, struct kvm_vm *vm, uint8_t indent, in virt_dump_region()
150 void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) in virt_dump()
158 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default()
189 void vcpu_args_set(struct kvm_vm *vm, uint32_t vcpuid, unsigned int num, ...) in vcpu_args_set()
209 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent) in vcpu_dump()
[all …]
Ducall.c9 void ucall_init(struct kvm_vm *vm, void *arg) in ucall_init()
13 void ucall_uninit(struct kvm_vm *vm) in ucall_uninit()
36 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall()
/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h367 struct kvm_x86_state *vcpu_save_state(struct kvm_vm *vm, uint32_t vcpuid);
368 void vcpu_load_state(struct kvm_vm *vm, uint32_t vcpuid,
375 struct kvm_cpuid2 *vcpu_get_cpuid(struct kvm_vm *vm, uint32_t vcpuid);
376 void vcpu_set_cpuid(struct kvm_vm *vm, uint32_t vcpuid,
388 uint64_t vcpu_get_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index);
389 int _vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
391 void vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
410 void vm_init_descriptor_tables(struct kvm_vm *vm);
411 void vcpu_init_descriptor_tables(struct kvm_vm *vm, uint32_t vcpuid);
412 void vm_install_exception_handler(struct kvm_vm *vm, int vector,
[all …]
Dvmx.h602 struct vmx_pages *vcpu_alloc_vmx(struct kvm_vm *vm, vm_vaddr_t *p_vmx_gva);
610 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm,
612 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm,
614 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm,
616 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm,
618 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm);
/tools/testing/selftests/kvm/
Ddirty_log_test.c218 static void clear_log_create_vm_done(struct kvm_vm *vm) in clear_log_create_vm_done()
232 static void dirty_log_collect_dirty_pages(struct kvm_vm *vm, int slot, in dirty_log_collect_dirty_pages()
238 static void clear_log_collect_dirty_pages(struct kvm_vm *vm, int slot, in clear_log_collect_dirty_pages()
256 static void default_after_vcpu_run(struct kvm_vm *vm, int ret, int err) in default_after_vcpu_run()
275 static void dirty_ring_create_vm_done(struct kvm_vm *vm) in dirty_ring_create_vm_done()
334 static void dirty_ring_collect_dirty_pages(struct kvm_vm *vm, int slot, in dirty_ring_collect_dirty_pages()
372 static void dirty_ring_after_vcpu_run(struct kvm_vm *vm, int ret, int err) in dirty_ring_after_vcpu_run()
409 void (*create_vm_done)(struct kvm_vm *vm);
411 void (*collect_dirty_pages) (struct kvm_vm *vm, int slot,
414 void (*after_vcpu_run)(struct kvm_vm *vm, int ret, int err);
[all …]
Daccess_tracking_perf_test.c96 static uint64_t lookup_pfn(int pagemap_fd, struct kvm_vm *vm, uint64_t gva) in lookup_pfn()
130 static void mark_vcpu_memory_idle(struct kvm_vm *vm, int vcpu_id) in mark_vcpu_memory_idle()
192 static void assert_ucall(struct kvm_vm *vm, uint32_t vcpu_id, in assert_ucall()
221 struct kvm_vm *vm = perf_test_args.vm; in vcpu_thread_main()
256 static void run_iteration(struct kvm_vm *vm, int vcpus, const char *description) in run_iteration()
277 static void access_memory(struct kvm_vm *vm, int vcpus, enum access_type access, in access_memory()
286 static void mark_memory_idle(struct kvm_vm *vm, int vcpus) in mark_memory_idle()
330 struct kvm_vm *vm; in run_test()
Dset_memory_region_test.c57 struct kvm_vm *vm = data; in vcpu_worker()
116 static struct kvm_vm *spawn_vm(pthread_t *vcpu_thread, void *guest_code) in spawn_vm()
118 struct kvm_vm *vm; in spawn_vm()
183 struct kvm_vm *vm; in test_move_memory_region()
263 struct kvm_vm *vm; in test_delete_memory_region()
313 struct kvm_vm *vm; in test_zero_memory_regions()
332 static int test_memory_region_add(struct kvm_vm *vm, void *mem, uint32_t slot, in test_memory_region_add()
355 struct kvm_vm *vm; in test_add_max_memory_regions()
Dmemslot_modification_stress_test.c45 struct kvm_vm *vm = perf_test_args.vm; in vcpu_worker()
67 struct kvm_vm *vm;
72 static void add_remove_memslot(struct kvm_vm *vm, useconds_t delay, in add_remove_memslot()
104 struct kvm_vm *vm; in run_test()
Ddirty_log_perf_test.c37 struct kvm_vm *vm = perf_test_args.vm; in vcpu_worker()
99 static void toggle_dirty_logging(struct kvm_vm *vm, int slots, bool enable) in toggle_dirty_logging()
111 static inline void enable_dirty_logging(struct kvm_vm *vm, int slots) in enable_dirty_logging()
116 static inline void disable_dirty_logging(struct kvm_vm *vm, int slots) in disable_dirty_logging()
121 static void get_dirty_log(struct kvm_vm *vm, unsigned long *bitmaps[], int slots) in get_dirty_log()
132 static void clear_dirty_log(struct kvm_vm *vm, unsigned long *bitmaps[], in clear_dirty_log()
174 struct kvm_vm *vm; in run_test()
Dsteal_time.c61 static void steal_time_init(struct kvm_vm *vm) in steal_time_init()
85 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump()
168 static void steal_time_init(struct kvm_vm *vm) in steal_time_init()
206 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump()
234 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu()
257 struct kvm_vm *vm; in main()
/tools/testing/selftests/kvm/lib/x86_64/
Ducall.c11 void ucall_init(struct kvm_vm *vm, void *arg) in ucall_init()
15 void ucall_uninit(struct kvm_vm *vm) in ucall_uninit()
38 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall()
Dprocessor.c145 void virt_pgd_alloc(struct kvm_vm *vm) in virt_pgd_alloc()
157 static void *virt_get_pte(struct kvm_vm *vm, uint64_t pt_pfn, uint64_t vaddr, in virt_get_pte()
166 static uint64_t *virt_create_upper_pte(struct kvm_vm *vm, in virt_create_upper_pte()
197 void __virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr, in __virt_pg_map()
244 void virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr) in virt_pg_map()
249 static uint64_t *_vm_get_page_table_entry(struct kvm_vm *vm, int vcpuid, in _vm_get_page_table_entry()
324 uint64_t vm_get_page_table_entry(struct kvm_vm *vm, int vcpuid, uint64_t vaddr) in vm_get_page_table_entry()
331 void vm_set_page_table_entry(struct kvm_vm *vm, int vcpuid, uint64_t vaddr, in vm_set_page_table_entry()
339 void virt_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) in virt_dump()
434 static void kvm_seg_fill_gdt_64bit(struct kvm_vm *vm, struct kvm_segment *segp) in kvm_seg_fill_gdt_64bit()
[all …]

123