/tools/testing/selftests/kvm/include/ |
D | kvm_util.h | 123 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, 133 void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl, 135 int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl, 144 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid); 173 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid); 174 void vcpu_run(struct kvm_vm *vm, uint32_t vcpuid); 175 int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid); 176 int vcpu_get_fd(struct kvm_vm *vm, uint32_t vcpuid); 177 void vcpu_run_complete_io(struct kvm_vm *vm, uint32_t vcpuid); 178 void vcpu_set_guest_debug(struct kvm_vm *vm, uint32_t vcpuid, [all …]
|
/tools/testing/selftests/kvm/lib/aarch64/ |
D | processor.c | 215 void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init) in aarch64_vcpu_setup() argument 229 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_INIT, init); in aarch64_vcpu_setup() 235 set_reg(vm, vcpuid, ARM64_SYS_REG(CPACR_EL1), 3 << 20); in aarch64_vcpu_setup() 237 get_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), &sctlr_el1); in aarch64_vcpu_setup() 238 get_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), &tcr_el1); in aarch64_vcpu_setup() 276 set_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), sctlr_el1); in aarch64_vcpu_setup() 277 set_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), tcr_el1); in aarch64_vcpu_setup() 278 set_reg(vm, vcpuid, ARM64_SYS_REG(MAIR_EL1), DEFAULT_MAIR_EL1); in aarch64_vcpu_setup() 279 set_reg(vm, vcpuid, ARM64_SYS_REG(TTBR0_EL1), vm->pgd); in aarch64_vcpu_setup() 282 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent) in vcpu_dump() argument [all …]
|
/tools/testing/selftests/kvm/include/aarch64/ |
D | processor.h | 46 static inline void get_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint64_t *addr) in get_reg() argument 51 vcpu_ioctl(vm, vcpuid, KVM_GET_ONE_REG, ®); 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() argument 59 vcpu_ioctl(vm, vcpuid, KVM_SET_ONE_REG, ®); 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, 113 void vcpu_init_descriptor_tables(struct kvm_vm *vm, uint32_t vcpuid);
|
/tools/testing/selftests/kvm/lib/s390x/ |
D | processor.c | 158 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument 172 vm_vcpu_add(vm, vcpuid); in vm_vcpu_add_default() 175 vcpu_regs_get(vm, vcpuid, ®s); in vm_vcpu_add_default() 177 vcpu_regs_set(vm, vcpuid, ®s); in vm_vcpu_add_default() 179 vcpu_sregs_get(vm, vcpuid, &sregs); in vm_vcpu_add_default() 182 vcpu_sregs_set(vm, vcpuid, &sregs); in vm_vcpu_add_default() 184 run = vcpu_state(vm, vcpuid); in vm_vcpu_add_default() 189 void vcpu_args_set(struct kvm_vm *vm, uint32_t vcpuid, unsigned int num, ...) in vcpu_args_set() argument 200 vcpu_regs_get(vm, vcpuid, ®s); in vcpu_args_set() 205 vcpu_regs_set(vm, vcpuid, ®s); in vcpu_args_set() [all …]
|
/tools/testing/selftests/kvm/lib/ |
D | kvm_util.c | 380 uint32_t vcpuid = vcpuids ? vcpuids[i] : i; in vm_create_with_vcpus() local 382 vm_vcpu_add_default(vm, vcpuid, guest_code); in vm_create_with_vcpus() 396 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default() argument 400 (uint32_t []){ vcpuid }); in vm_create_default() 553 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid) in vcpu_find() argument 558 if (vcpu->id == vcpuid) in vcpu_find() 1115 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid) in vm_vcpu_add() argument 1120 vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_add() 1126 vcpuid, vcpu->id, vcpu->state); in vm_vcpu_add() 1131 vcpu->id = vcpuid; in vm_vcpu_add() [all …]
|
D | kvm_util_internal.h | 72 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid);
|
/tools/testing/selftests/kvm/x86_64/ |
D | set_boot_cpu_id.c | 50 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu() argument 57 vcpu_run(vm, vcpuid); in run_vcpu() 59 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu() 78 exit_reason_str(vcpu_state(vm, vcpuid)->exit_reason)); in run_vcpu() 99 static void add_x86_vcpu(struct kvm_vm *vm, uint32_t vcpuid, bool bsp_code) in add_x86_vcpu() argument 102 vm_vcpu_add_default(vm, vcpuid, guest_bsp_vcpu); in add_x86_vcpu() 104 vm_vcpu_add_default(vm, vcpuid, guest_not_bsp_vcpu); in add_x86_vcpu()
|
D | tsc_msrs_test.c | 69 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid, int stage) in run_vcpu() argument 73 vcpu_args_set(vm, vcpuid, 1, vcpuid); in run_vcpu() 75 vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu() 77 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu() 91 exit_reason_str(vcpu_state(vm, vcpuid)->exit_reason)); in run_vcpu()
|
D | get_cpuid_test.c | 121 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid, int stage) in run_vcpu() argument 125 _vcpu_run(vm, vcpuid); in run_vcpu() 127 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu() 141 exit_reason_str(vcpu_state(vm, vcpuid)->exit_reason)); in run_vcpu()
|
/tools/testing/selftests/kvm/lib/x86_64/ |
D | processor.c | 249 static uint64_t *_vm_get_page_table_entry(struct kvm_vm *vm, int vcpuid, in _vm_get_page_table_entry() argument 272 vcpu_sregs_get(vm, vcpuid, &sregs); 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() argument 326 uint64_t *pte = _vm_get_page_table_entry(vm, vcpuid, 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() argument 334 uint64_t *new_pte = _vm_get_page_table_entry(vm, vcpuid, vaddr); in vm_set_page_table_entry() 583 static void vcpu_setup(struct kvm_vm *vm, int vcpuid) in vcpu_setup() argument 588 vcpu_sregs_get(vm, vcpuid, &sregs); in vcpu_setup() 612 vcpu_sregs_set(vm, vcpuid, &sregs); in vcpu_setup() 615 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument [all …]
|
/tools/testing/selftests/kvm/ |
D | steal_time.c | 85 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump() argument 87 struct kvm_steal_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]); in steal_time_dump() 90 pr_info("VCPU%d:\n", vcpuid); in steal_time_dump() 206 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump() argument 208 struct st_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]); in steal_time_dump() 210 pr_info("VCPU%d:\n", vcpuid); in steal_time_dump() 234 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu() argument 238 vcpu_args_set(vm, vcpuid, 1, vcpuid); in run_vcpu() 240 vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu() 242 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu() [all …]
|
D | dirty_log_test.c | 674 static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid, in create_vm() argument 688 vm_vcpu_add_default(vm, vcpuid, guest_code); in create_vm()
|
/tools/testing/selftests/kvm/include/x86_64/ |
D | processor.h | 367 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, 411 void vcpu_init_descriptor_tables(struct kvm_vm *vm, uint32_t vcpuid); 415 uint64_t vm_get_page_table_entry(struct kvm_vm *vm, int vcpuid, uint64_t vaddr); 416 void vm_set_page_table_entry(struct kvm_vm *vm, int vcpuid, uint64_t vaddr, [all …]
|
/tools/testing/selftests/kvm/aarch64/ |
D | vgic_init.c | 52 static int run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu() argument 55 int ret = _vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu()
|
D | get-reg-list.c | 375 static void finalize_vcpu(struct kvm_vm *vm, uint32_t vcpuid, struct vcpu_config *c) in finalize_vcpu() argument 383 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_FINALIZE, &feature); in finalize_vcpu()
|