Home
last modified time | relevance | path

Searched refs:vcpuid (Results 1 – 12 of 12) sorted by relevance

/tools/testing/selftests/kvm/include/
Dkvm_util.h102 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid,
112 void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
114 int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
120 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid);
146 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid);
147 void vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
148 int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
149 void vcpu_run_complete_io(struct kvm_vm *vm, uint32_t vcpuid);
150 void vcpu_set_guest_debug(struct kvm_vm *vm, uint32_t vcpuid,
152 void vcpu_set_mp_state(struct kvm_vm *vm, uint32_t vcpuid,
[all …]
/tools/testing/selftests/kvm/include/aarch64/
Dprocessor.h39 static inline void get_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint64_t *addr) in get_reg() argument
44 vcpu_ioctl(vm, vcpuid, KVM_GET_ONE_REG, &reg); in get_reg()
47 static inline void set_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id, uint64_t val) in set_reg() argument
52 vcpu_ioctl(vm, vcpuid, KVM_SET_ONE_REG, &reg); in set_reg()
55 void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init);
56 void aarch64_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid,
/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c222 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default() argument
232 vm_vcpu_add_default(vm, vcpuid, guest_code); in vm_create_default()
237 void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init) in aarch64_vcpu_setup() argument
251 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_INIT, init); in aarch64_vcpu_setup()
257 set_reg(vm, vcpuid, ARM64_SYS_REG(CPACR_EL1), 3 << 20); in aarch64_vcpu_setup()
259 get_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), &sctlr_el1); in aarch64_vcpu_setup()
260 get_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), &tcr_el1); in aarch64_vcpu_setup()
298 set_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), sctlr_el1); in aarch64_vcpu_setup()
299 set_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), tcr_el1); in aarch64_vcpu_setup()
300 set_reg(vm, vcpuid, ARM64_SYS_REG(MAIR_EL1), DEFAULT_MAIR_EL1); in aarch64_vcpu_setup()
[all …]
/tools/testing/selftests/kvm/lib/
Dkvm_util.c411 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid) in vcpu_find() argument
416 if (vcpu->id == vcpuid) in vcpu_find()
884 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid) in vm_vcpu_add() argument
889 vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_add()
895 vcpuid, vcpu->id, vcpu->state); in vm_vcpu_add()
900 vcpu->id = vcpuid; in vm_vcpu_add()
901 vcpu->fd = ioctl(vm->fd, KVM_CREATE_VCPU, vcpuid); in vm_vcpu_add()
911 "vcpu id: %u errno: %i", vcpuid, errno); in vm_vcpu_add()
1192 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid) in vcpu_state() argument
1194 struct vcpu *vcpu = vcpu_find(vm, vcpuid); in vcpu_state()
[all …]
Dkvm_util_internal.h57 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid);
/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c163 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default() argument
178 vm_vcpu_add_default(vm, vcpuid, guest_code); in vm_create_default()
183 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
197 vm_vcpu_add(vm, vcpuid); in vm_vcpu_add_default()
200 vcpu_regs_get(vm, vcpuid, &regs); in vm_vcpu_add_default()
202 vcpu_regs_set(vm, vcpuid, &regs); in vm_vcpu_add_default()
204 vcpu_sregs_get(vm, vcpuid, &sregs); in vm_vcpu_add_default()
207 vcpu_sregs_set(vm, vcpuid, &sregs); in vm_vcpu_add_default()
209 run = vcpu_state(vm, vcpuid); in vm_vcpu_add_default()
214 void vcpu_args_set(struct kvm_vm *vm, uint32_t vcpuid, unsigned int num, ...) in vcpu_args_set() argument
[all …]
/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c551 static void vcpu_setup(struct kvm_vm *vm, int vcpuid, int pgd_memslot, int gdt_memslot) in vcpu_setup() argument
556 vcpu_sregs_get(vm, vcpuid, &sregs); in vcpu_setup()
580 vcpu_sregs_set(vm, vcpuid, &sregs); in vcpu_setup()
583 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
592 vm_vcpu_add(vm, vcpuid); in vm_vcpu_add_default()
593 vcpu_setup(vm, vcpuid, 0, 0); in vm_vcpu_add_default()
596 vcpu_regs_get(vm, vcpuid, &regs); in vm_vcpu_add_default()
600 vcpu_regs_set(vm, vcpuid, &regs); in vm_vcpu_add_default()
604 vcpu_set_mp_state(vm, vcpuid, &mp_state); in vm_vcpu_add_default()
721 uint32_t vcpuid, struct kvm_cpuid2 *cpuid) in vcpu_set_cpuid() argument
[all …]
/tools/testing/selftests/kvm/
Dsteal_time.c89 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump() argument
91 struct kvm_steal_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]); in steal_time_dump()
94 pr_info("VCPU%d:\n", vcpuid); in steal_time_dump()
210 static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) in steal_time_dump() argument
212 struct st_time *st = addr_gva2hva(vm, (ulong)st_gva[vcpuid]); in steal_time_dump()
214 pr_info("VCPU%d:\n", vcpuid); in steal_time_dump()
252 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in run_vcpu() argument
256 vcpu_args_set(vm, vcpuid, 1, vcpuid); in run_vcpu()
258 vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu()
260 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu()
[all …]
Ddirty_log_test.c357 static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid, in create_vm() argument
371 vm_vcpu_add_default(vm, vcpuid, guest_code); in create_vm()
/tools/testing/selftests/kvm/x86_64/
Dtsc_msrs_test.c78 static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid, int stage) in run_vcpu() argument
82 vcpu_args_set(vm, vcpuid, 1, vcpuid); in run_vcpu()
84 vcpu_ioctl(vm, vcpuid, KVM_RUN, NULL); in run_vcpu()
86 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu()
100 exit_reason_str(vcpu_state(vm, vcpuid)->exit_reason)); in run_vcpu()
/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h319 struct kvm_x86_state *vcpu_save_state(struct kvm_vm *vm, uint32_t vcpuid);
320 void vcpu_load_state(struct kvm_vm *vm, uint32_t vcpuid,
326 void vcpu_set_cpuid(struct kvm_vm *vm, uint32_t vcpuid,
338 uint64_t vcpu_get_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index);
339 int _vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
341 void vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
361 void vcpu_init_descriptor_tables(struct kvm_vm *vm, uint32_t vcpuid);
/tools/testing/selftests/kvm/aarch64/
Dget-reg-list.c321 static void finalize_vcpu(struct kvm_vm *vm, uint32_t vcpuid) in finalize_vcpu() argument
327 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_FINALIZE, &feature); in finalize_vcpu()