/linux-6.12.1/tools/testing/selftests/kvm/include/ |
D | kvm_util.h | 53 struct kvm_vm *vm; 77 struct kvm_vm { struct 144 memslot2region(struct kvm_vm *vm, uint32_t memslot); 146 static inline struct userspace_mem_region *vm_get_mem_region(struct kvm_vm *vm, in vm_get_mem_region() 293 static __always_inline void static_assert_is_vm(struct kvm_vm *vm) { } in static_assert_is_vm() 356 static inline int vm_check_cap(struct kvm_vm *vm, long cap) in vm_check_cap() 364 static inline int __vm_enable_cap(struct kvm_vm *vm, uint32_t cap, uint64_t arg0) in __vm_enable_cap() 370 static inline void vm_enable_cap(struct kvm_vm *vm, uint32_t cap, uint64_t arg0) in vm_enable_cap() 377 static inline void vm_set_memory_attributes(struct kvm_vm *vm, uint64_t gpa, in vm_set_memory_attributes() 398 static inline void vm_mem_set_private(struct kvm_vm *vm, uint64_t gpa, in vm_mem_set_private() [all …]
|
D | memstress.h | 33 struct kvm_vm *vm; 58 struct kvm_vm *memstress_create_vm(enum vm_guest_mode mode, int nr_vcpus, 62 void memstress_destroy_vm(struct kvm_vm *vm); 64 void memstress_set_write_percent(struct kvm_vm *vm, uint32_t write_percent); 65 void memstress_set_random_access(struct kvm_vm *vm, bool random_access); 72 void memstress_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu *vcpus[]); 74 void memstress_enable_dirty_logging(struct kvm_vm *vm, int slots); 75 void memstress_disable_dirty_logging(struct kvm_vm *vm, int slots); 76 void memstress_get_dirty_log(struct kvm_vm *vm, unsigned long *bitmaps[], int slots); 77 void memstress_clear_dirty_log(struct kvm_vm *vm, unsigned long *bitmaps[],
|
/linux-6.12.1/tools/testing/selftests/kvm/x86_64/ |
D | sev_migrate_tests.c | 23 static struct kvm_vm *sev_vm_create(bool es) in sev_vm_create() 25 struct kvm_vm *vm; in sev_vm_create() 44 static struct kvm_vm *aux_vm_create(bool with_vcpus) in aux_vm_create() 46 struct kvm_vm *vm; in aux_vm_create() 59 static int __sev_migrate_from(struct kvm_vm *dst, struct kvm_vm *src) in __sev_migrate_from() 65 static void sev_migrate_from(struct kvm_vm *dst, struct kvm_vm *src) in sev_migrate_from() 75 struct kvm_vm *src_vm; in test_sev_migrate_from() 76 struct kvm_vm *dst_vms[NR_MIGRATE_TEST_VMS]; in test_sev_migrate_from() 101 struct kvm_vm *vm; 102 struct kvm_vm *source_vms[NR_LOCK_TESTING_THREADS]; [all …]
|
D | set_boot_cpu_id.c | 36 static void test_set_invalid_bsp(struct kvm_vm *vm) in test_set_invalid_bsp() 89 static struct kvm_vm *create_vm(uint32_t nr_vcpus, uint32_t bsp_vcpu_id, in create_vm() 92 struct kvm_vm *vm; in create_vm() 110 struct kvm_vm *vm; in run_vm_bsp() 123 struct kvm_vm *vm; in check_set_bsp_busy()
|
/linux-6.12.1/tools/testing/selftests/kvm/include/x86_64/ |
D | sev.h | 30 void sev_vm_launch(struct kvm_vm *vm, uint32_t policy); 31 void sev_vm_launch_measure(struct kvm_vm *vm, uint8_t *measurement); 32 void sev_vm_launch_finish(struct kvm_vm *vm); 34 struct kvm_vm *vm_sev_create_with_one_vcpu(uint32_t type, void *guest_code, 36 void vm_sev_launch(struct kvm_vm *vm, uint32_t policy, uint8_t *measurement); 71 void sev_vm_init(struct kvm_vm *vm); 72 void sev_es_vm_init(struct kvm_vm *vm); 74 static inline void sev_register_encrypted_memory(struct kvm_vm *vm, in sev_register_encrypted_memory() 85 static inline void sev_launch_update_data(struct kvm_vm *vm, vm_paddr_t gpa, in sev_launch_update_data()
|
D | vmx.h | 557 struct vmx_pages *vcpu_alloc_vmx(struct kvm_vm *vm, vm_vaddr_t *p_vmx_gva); 564 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, 566 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm, 568 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm, 570 void nested_identity_map_1g(struct vmx_pages *vmx, struct kvm_vm *vm, 573 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm, 575 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm);
|
/linux-6.12.1/tools/testing/selftests/kvm/aarch64/ |
D | smccc_filter.c | 40 static int __set_smccc_filter(struct kvm_vm *vm, uint32_t start, uint32_t nr_functions, in __set_smccc_filter() 53 static void set_smccc_filter(struct kvm_vm *vm, uint32_t start, uint32_t nr_functions, in set_smccc_filter() 61 static struct kvm_vm *setup_vm(struct kvm_vcpu **vcpu) in setup_vm() 64 struct kvm_vm *vm; in setup_vm() 82 struct kvm_vm *vm = setup_vm(&vcpu); in test_pad_must_be_zero() 101 struct kvm_vm *vm = setup_vm(&vcpu); in test_filter_reserved_range() 123 struct kvm_vm *vm = setup_vm(&vcpu); in test_invalid_nr_functions() 136 struct kvm_vm *vm = setup_vm(&vcpu); in test_overflow_nr_functions() 149 struct kvm_vm *vm = setup_vm(&vcpu); in test_reserved_action() 164 struct kvm_vm *vm = setup_vm(&vcpu); in test_filter_overlap() [all …]
|
D | psci_test.c | 75 static struct kvm_vm *setup_vm(void *guest_code, struct kvm_vcpu **source, in setup_vm() 79 struct kvm_vm *vm; in setup_vm() 136 struct kvm_vm *vm; in host_test_cpu_on() 173 struct kvm_vm *vm; in host_test_system_suspend()
|
D | vcpu_width_config.c | 25 struct kvm_vm *vm; in add_init_2vcpus() 51 struct kvm_vm *vm; in add_2vcpus_init_2vcpus() 82 struct kvm_vm *vm; in main()
|
/linux-6.12.1/tools/testing/selftests/kvm/s390x/ |
D | cmma_test.c | 97 static void create_main_memslot(struct kvm_vm *vm) in create_main_memslot() 107 static void create_test_memslot(struct kvm_vm *vm) in create_test_memslot() 119 static void create_memslots(struct kvm_vm *vm) in create_memslots() 139 static void finish_vm_setup(struct kvm_vm *vm) in finish_vm_setup() 151 static struct kvm_vm *create_vm_two_memslots(void) in create_vm_two_memslots() 153 struct kvm_vm *vm; in create_vm_two_memslots() 164 static void enable_cmma(struct kvm_vm *vm) in enable_cmma() 172 static void enable_dirty_tracking(struct kvm_vm *vm) in enable_dirty_tracking() 178 static int __enable_migration_mode(struct kvm_vm *vm) in __enable_migration_mode() 187 static void enable_migration_mode(struct kvm_vm *vm) in enable_migration_mode() [all …]
|
D | memop.c | 116 struct kvm_vm *vm; 237 struct kvm_vm *kvm_vm; member 250 t.kvm_vm = vm_create_with_one_vcpu(&vcpu, guest_code); in test_default_init() 251 t.vm = (struct test_info) { t.kvm_vm, NULL }; in test_default_init() 252 t.vcpu = (struct test_info) { t.kvm_vm, vcpu }; in test_default_init() 374 kvm_vm_free(t.kvm_vm); in test_copy() 400 kvm_vm_free(t.kvm_vm); in test_copy_access_register() 466 kvm_vm_free(t.kvm_vm); in test_copy_key() 479 kvm_vm_free(t.kvm_vm); in test_cmpxchg_key() 710 kvm_vm_free(t.kvm_vm); in test_cmpxchg_key_concurrent() [all …]
|
D | debug_test.c | 19 static struct kvm_vm *test_step_int_1(struct kvm_vcpu **vcpu, void *guest_code, in test_step_int_1() 24 struct kvm_vm *vm; in test_step_int_1() 46 struct kvm_vm *vm; in test_step_int() 83 struct kvm_vm *vm; in test_step_pgm_diag()
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/x86_64/ |
D | sev.c | 17 static void encrypt_region(struct kvm_vm *vm, struct userspace_mem_region *region) in encrypt_region() 37 void sev_vm_init(struct kvm_vm *vm) in sev_vm_init() 50 void sev_es_vm_init(struct kvm_vm *vm) in sev_es_vm_init() 63 void sev_vm_launch(struct kvm_vm *vm, uint32_t policy) in sev_vm_launch() 87 void sev_vm_launch_measure(struct kvm_vm *vm, uint8_t *measurement) in sev_vm_launch_measure() 100 void sev_vm_launch_finish(struct kvm_vm *vm) in sev_vm_launch_finish() 115 struct kvm_vm *vm_sev_create_with_one_vcpu(uint32_t type, void *guest_code, in vm_sev_create_with_one_vcpu() 122 struct kvm_vm *vm; in vm_sev_create_with_one_vcpu() 131 void vm_sev_launch(struct kvm_vm *vm, uint32_t policy, uint8_t *measurement) in vm_sev_launch()
|
D | processor.c | 127 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() 139 static void *virt_get_pte(struct kvm_vm *vm, uint64_t *parent_pte, in virt_get_pte() 153 static uint64_t *virt_create_upper_pte(struct kvm_vm *vm, in virt_create_upper_pte() 186 void __virt_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr, int level) in __virt_pg_map() 242 void virt_arch_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr) in virt_arch_pg_map() 247 void virt_map_level(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr, in virt_map_level() 278 uint64_t *__vm_get_page_table_entry(struct kvm_vm *vm, uint64_t vaddr, in __vm_get_page_table_entry() 317 uint64_t *vm_get_page_table_entry(struct kvm_vm *vm, uint64_t vaddr) in vm_get_page_table_entry() 324 void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) in virt_arch_dump() 419 static void kvm_seg_fill_gdt_64bit(struct kvm_vm *vm, struct kvm_segment *segp) in kvm_seg_fill_gdt_64bit() [all …]
|
D | vmx.c | 75 vcpu_alloc_vmx(struct kvm_vm *vm, vm_vaddr_t *p_vmx_gva) in vcpu_alloc_vmx() 367 static void nested_create_pte(struct kvm_vm *vm, in nested_create_pte() 399 void __nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, in __nested_pg_map() 450 void nested_pg_map(struct vmx_pages *vmx, struct kvm_vm *vm, in nested_pg_map() 473 void __nested_map(struct vmx_pages *vmx, struct kvm_vm *vm, in __nested_map() 490 void nested_map(struct vmx_pages *vmx, struct kvm_vm *vm, in nested_map() 499 void nested_map_memslot(struct vmx_pages *vmx, struct kvm_vm *vm, in nested_map_memslot() 521 void nested_identity_map_1g(struct vmx_pages *vmx, struct kvm_vm *vm, in nested_identity_map_1g() 539 void prepare_eptp(struct vmx_pages *vmx, struct kvm_vm *vm, in prepare_eptp() 549 void prepare_virtualize_apic_accesses(struct vmx_pages *vmx, struct kvm_vm *vm) in prepare_virtualize_apic_accesses()
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 182 void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size) in vm_enable_dirty_ring() 191 static void vm_open(struct kvm_vm *vm) in vm_open() 259 __weak void vm_vaddr_populate_bitmap(struct kvm_vm *vm) in vm_vaddr_populate_bitmap() 268 struct kvm_vm *____vm_create(struct vm_shape shape) in ____vm_create() 270 struct kvm_vm *vm; in ____vm_create() 409 struct kvm_vm *__vm_create(struct vm_shape shape, uint32_t nr_runnable_vcpus, in __vm_create() 415 struct kvm_vm *vm; in __vm_create() 469 struct kvm_vm *__vm_create_with_vcpus(struct vm_shape shape, uint32_t nr_vcpus, in __vm_create_with_vcpus() 473 struct kvm_vm *vm; in __vm_create_with_vcpus() 486 struct kvm_vm *__vm_create_shape_with_one_vcpu(struct vm_shape shape, in __vm_create_shape_with_one_vcpu() [all …]
|
D | memstress.c | 88 void memstress_setup_vcpus(struct kvm_vm *vm, int nr_vcpus, in memstress_setup_vcpus() 124 struct kvm_vm *memstress_create_vm(enum vm_guest_mode mode, int nr_vcpus, in memstress_create_vm() 130 struct kvm_vm *vm; in memstress_create_vm() 234 void memstress_destroy_vm(struct kvm_vm *vm) in memstress_destroy_vm() 239 void memstress_set_write_percent(struct kvm_vm *vm, uint32_t write_percent) in memstress_set_write_percent() 245 void memstress_set_random_access(struct kvm_vm *vm, bool random_access) in memstress_set_random_access() 256 void __weak memstress_setup_nested(struct kvm_vm *vm, int nr_vcpus, struct kvm_vcpu **vcpus) in memstress_setup_nested() 322 static void toggle_dirty_logging(struct kvm_vm *vm, int slots, bool enable) in toggle_dirty_logging() 334 void memstress_enable_dirty_logging(struct kvm_vm *vm, int slots) in memstress_enable_dirty_logging() 339 void memstress_disable_dirty_logging(struct kvm_vm *vm, int slots) in memstress_disable_dirty_logging() [all …]
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/aarch64/ |
D | processor.c | 23 static uint64_t page_align(struct kvm_vm *vm, uint64_t v) in page_align() 28 static uint64_t pgd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pgd_index() 36 static uint64_t pud_index(struct kvm_vm *vm, vm_vaddr_t gva) in pud_index() 47 static uint64_t pmd_index(struct kvm_vm *vm, vm_vaddr_t gva) in pmd_index() 58 static uint64_t pte_index(struct kvm_vm *vm, vm_vaddr_t gva) in pte_index() 64 static inline bool use_lpa2_pte_format(struct kvm_vm *vm) in use_lpa2_pte_format() 70 static uint64_t addr_pte(struct kvm_vm *vm, uint64_t pa, uint64_t attrs) in addr_pte() 88 static uint64_t pte_addr(struct kvm_vm *vm, uint64_t pte) in pte_addr() 104 static uint64_t ptrs_per_pgd(struct kvm_vm *vm) in ptrs_per_pgd() 110 static uint64_t __maybe_unused ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte() [all …]
|
D | vgic.c | 33 int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs) in vgic_v3_setup() 108 int _kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level) in _kvm_arm_irq_line() 123 void kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level) in kvm_arm_irq_line() 172 int vgic_its_setup(struct kvm_vm *vm) in vgic_its_setup()
|
/linux-6.12.1/tools/testing/selftests/kvm/include/aarch64/ |
D | vgic.h | 19 int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs); 26 void kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level); 27 int _kvm_arm_irq_line(struct kvm_vm *vm, uint32_t intid, int level); 35 int vgic_its_setup(struct kvm_vm *vm);
|
D | processor.h | 64 struct kvm_vcpu *aarch64_vcpu_add(struct kvm_vm *vm, uint32_t vcpu_id, 125 void vm_init_descriptor_tables(struct kvm_vm *vm); 129 void vm_install_exception_handler(struct kvm_vm *vm, 131 void vm_install_sync_handler(struct kvm_vm *vm, 134 uint64_t *virt_get_pte_hva(struct kvm_vm *vm, vm_vaddr_t gva);
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 13 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() 37 static uint64_t virt_alloc_region(struct kvm_vm *vm, int ri) in virt_alloc_region() 50 void virt_arch_pg_map(struct kvm_vm *vm, uint64_t gva, uint64_t gpa) in virt_arch_pg_map() 89 vm_paddr_t addr_arch_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_arch_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_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) in virt_arch_dump() 163 struct kvm_vcpu *vm_arch_vcpu_add(struct kvm_vm *vm, uint32_t vcpu_id) in vm_arch_vcpu_add()
|
/linux-6.12.1/tools/testing/selftests/kvm/lib/riscv/ |
D | processor.c | 29 static uint64_t page_align(struct kvm_vm *vm, uint64_t v) in page_align() 34 static uint64_t pte_addr(struct kvm_vm *vm, uint64_t entry) in pte_addr() 40 static uint64_t ptrs_per_pte(struct kvm_vm *vm) in ptrs_per_pte() 59 static uint64_t pte_index(struct kvm_vm *vm, vm_vaddr_t gva, int level) in pte_index() 69 void virt_arch_pgd_alloc(struct kvm_vm *vm) in virt_arch_pgd_alloc() 82 void virt_arch_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr) in virt_arch_pg_map() 126 vm_paddr_t addr_arch_gva2gpa(struct kvm_vm *vm, vm_vaddr_t gva) in addr_arch_gva2gpa() 155 static void pte_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent, in pte_dump() 177 void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent) in virt_arch_dump() 198 struct kvm_vm *vm = vcpu->vm; in riscv_vcpu_mmu_setup() [all …]
|
/linux-6.12.1/tools/testing/selftests/kvm/ |
D | access_tracking_perf_test.c | 95 static uint64_t lookup_pfn(int pagemap_fd, struct kvm_vm *vm, uint64_t gva) in lookup_pfn() 126 static void mark_vcpu_memory_idle(struct kvm_vm *vm, in mark_vcpu_memory_idle() 229 struct kvm_vm *vm = memstress_args.vm; in vcpu_thread_main() 262 static void run_iteration(struct kvm_vm *vm, int nr_vcpus, const char *description) in run_iteration() 282 static void access_memory(struct kvm_vm *vm, int nr_vcpus, in access_memory() 290 static void mark_memory_idle(struct kvm_vm *vm, int nr_vcpus) in mark_memory_idle() 306 struct kvm_vm *vm; in run_test()
|
D | set_memory_region_test.c | 110 static struct kvm_vm *spawn_vm(struct kvm_vcpu **vcpu, pthread_t *vcpu_thread, in spawn_vm() 113 struct kvm_vm *vm; in spawn_vm() 182 struct kvm_vm *vm; in test_move_memory_region() 278 struct kvm_vm *vm; in test_delete_memory_region() 331 struct kvm_vm *vm; in test_zero_memory_regions() 350 struct kvm_vm *vm; in test_invalid_memory_region_flags() 412 struct kvm_vm *vm; in test_add_max_memory_regions() 466 static void test_invalid_guest_memfd(struct kvm_vm *vm, int memfd, in test_invalid_guest_memfd() 477 struct kvm_vm *vm, *vm2; in test_add_private_memory_region() 513 struct kvm_vm *vm; in test_add_overlapping_private_memory_regions()
|