Home
last modified time | relevance | path

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

/external/linux-kselftest/tools/testing/selftests/kvm/include/
Dkvm_util.h69 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid,
79 void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
83 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid, int pgd_memslot,
94 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid);
95 void vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
96 int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
97 void vcpu_set_mp_state(struct kvm_vm *vm, uint32_t vcpuid,
99 void vcpu_regs_get(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_regs *regs);
100 void vcpu_regs_set(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_regs *regs);
101 void vcpu_args_set(struct kvm_vm *vm, uint32_t vcpuid, unsigned int num, ...);
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/
Dkvm_util.c315 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid) in vcpu_find() argument
320 if (vcpup->id == vcpuid) in vcpu_find()
340 static void vm_vcpu_rm(struct kvm_vm *vm, uint32_t vcpuid) in vm_vcpu_rm() argument
342 struct vcpu *vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_rm()
733 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid, int pgd_memslot, in vm_vcpu_add() argument
739 vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_add()
745 vcpuid, vcpu->id, vcpu->state); in vm_vcpu_add()
750 vcpu->id = vcpuid; in vm_vcpu_add()
751 vcpu->fd = ioctl(vm->fd, KVM_CREATE_VCPU, vcpuid); in vm_vcpu_add()
761 "vcpu id: %u errno: %i", vcpuid, errno); in vm_vcpu_add()
[all …]
Dkvm_util_internal.h66 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid);
67 void vcpu_setup(struct kvm_vm *vm, int vcpuid, int pgd_memslot,
/external/linux-kselftest/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 vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
245 vm_vcpu_add(vm, vcpuid, 0, 0); in vm_vcpu_add_default()
247 set_reg(vm, vcpuid, ARM64_CORE_REG(sp_el1), stack_vaddr + stack_size); in vm_vcpu_add_default()
248 set_reg(vm, vcpuid, ARM64_CORE_REG(regs.pc), (uint64_t)guest_code); in vm_vcpu_add_default()
251 void vcpu_setup(struct kvm_vm *vm, int vcpuid, int pgd_memslot, int gdt_memslot) in vcpu_setup() argument
258 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_INIT, &init); in vcpu_setup()
264 set_reg(vm, vcpuid, ARM64_SYS_REG(CPACR_EL1), 3 << 20); in vcpu_setup()
266 get_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), &sctlr_el1); in vcpu_setup()
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c615 void vcpu_setup(struct kvm_vm *vm, int vcpuid, int pgd_memslot, int gdt_memslot) in vcpu_setup() argument
620 vcpu_sregs_get(vm, vcpuid, &sregs); in vcpu_setup()
644 vcpu_sregs_set(vm, vcpuid, &sregs); in vcpu_setup()
652 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
661 vm_vcpu_add(vm, vcpuid, 0, 0); in vm_vcpu_add_default()
664 vcpu_regs_get(vm, vcpuid, &regs); in vm_vcpu_add_default()
668 vcpu_regs_set(vm, vcpuid, &regs); in vm_vcpu_add_default()
672 vcpu_set_mp_state(vm, vcpuid, &mp_state); in vm_vcpu_add_default()
785 uint32_t vcpuid, struct kvm_cpuid2 *cpuid) in vcpu_set_cpuid() argument
787 struct vcpu *vcpu = vcpu_find(vm, vcpuid); in vcpu_set_cpuid()
[all …]
/external/linux-kselftest/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()
/external/linux-kselftest/tools/testing/selftests/kvm/include/x86_64/
Dprocessor.h307 struct kvm_x86_state *vcpu_save_state(struct kvm_vm *vm, uint32_t vcpuid);
308 void vcpu_load_state(struct kvm_vm *vm, uint32_t vcpuid,
312 void vcpu_set_cpuid(struct kvm_vm *vm, uint32_t vcpuid,
324 uint64_t vcpu_get_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index);
325 void vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
/external/linux-kselftest/tools/testing/selftests/kvm/
Ddirty_log_test.c211 static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid, in create_vm() argument
222 vm_vcpu_add_default(vm, vcpuid, guest_code); in create_vm()