Home
last modified time | relevance | path

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

/external/linux-kselftest/tools/testing/selftests/kvm/include/
Dkvm_util.h87 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid,
97 void vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
99 int _vcpu_ioctl(struct kvm_vm *vm, uint32_t vcpuid, unsigned long ioctl,
103 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid);
113 struct kvm_run *vcpu_state(struct kvm_vm *vm, uint32_t vcpuid);
114 void vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
115 int _vcpu_run(struct kvm_vm *vm, uint32_t vcpuid);
116 void vcpu_run_complete_io(struct kvm_vm *vm, uint32_t vcpuid);
117 void vcpu_set_mp_state(struct kvm_vm *vm, uint32_t vcpuid,
119 void vcpu_regs_get(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_regs *regs);
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/
Dkvm_util.c381 struct vcpu *vcpu_find(struct kvm_vm *vm, uint32_t vcpuid) in vcpu_find() argument
386 if (vcpup->id == vcpuid) in vcpu_find()
406 static void vm_vcpu_rm(struct kvm_vm *vm, uint32_t vcpuid) in vm_vcpu_rm() argument
408 struct vcpu *vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_rm()
804 void vm_vcpu_add(struct kvm_vm *vm, uint32_t vcpuid) in vm_vcpu_add() argument
809 vcpu = vcpu_find(vm, vcpuid); in vm_vcpu_add()
815 vcpuid, vcpu->id, vcpu->state); in vm_vcpu_add()
820 vcpu->id = vcpuid; in vm_vcpu_add()
821 vcpu->fd = ioctl(vm->fd, KVM_CREATE_VCPU, vcpuid); in vm_vcpu_add()
831 "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);
/external/linux-kselftest/tools/testing/selftests/kvm/lib/aarch64/
Dprocessor.c223 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default() argument
233 vm_vcpu_add_default(vm, vcpuid, guest_code); in vm_create_default()
238 void aarch64_vcpu_setup(struct kvm_vm *vm, int vcpuid, struct kvm_vcpu_init *init) in aarch64_vcpu_setup() argument
252 vcpu_ioctl(vm, vcpuid, KVM_ARM_VCPU_INIT, init); in aarch64_vcpu_setup()
258 set_reg(vm, vcpuid, ARM64_SYS_REG(CPACR_EL1), 3 << 20); in aarch64_vcpu_setup()
260 get_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), &sctlr_el1); in aarch64_vcpu_setup()
261 get_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), &tcr_el1); in aarch64_vcpu_setup()
299 set_reg(vm, vcpuid, ARM64_SYS_REG(SCTLR_EL1), sctlr_el1); in aarch64_vcpu_setup()
300 set_reg(vm, vcpuid, ARM64_SYS_REG(TCR_EL1), tcr_el1); in aarch64_vcpu_setup()
301 set_reg(vm, vcpuid, ARM64_SYS_REG(MAIR_EL1), DEFAULT_MAIR_EL1); in aarch64_vcpu_setup()
[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()
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,
/external/linux-kselftest/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c612 static void vcpu_setup(struct kvm_vm *vm, int vcpuid, int pgd_memslot, int gdt_memslot) in vcpu_setup() argument
617 vcpu_sregs_get(vm, vcpuid, &sregs); in vcpu_setup()
641 vcpu_sregs_set(vm, vcpuid, &sregs); in vcpu_setup()
649 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
658 vm_vcpu_add(vm, vcpuid); in vm_vcpu_add_default()
659 vcpu_setup(vm, vcpuid, 0, 0); in vm_vcpu_add_default()
662 vcpu_regs_get(vm, vcpuid, &regs); in vm_vcpu_add_default()
666 vcpu_regs_set(vm, vcpuid, &regs); in vm_vcpu_add_default()
670 vcpu_set_mp_state(vm, vcpuid, &mp_state); in vm_vcpu_add_default()
783 uint32_t vcpuid, struct kvm_cpuid2 *cpuid) in vcpu_set_cpuid() argument
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/s390x/
Dprocessor.c214 struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages, in vm_create_default() argument
229 vm_vcpu_add_default(vm, vcpuid, guest_code); in vm_create_default()
241 void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code) in vm_vcpu_add_default() argument
255 vm_vcpu_add(vm, vcpuid); in vm_vcpu_add_default()
258 vcpu_regs_get(vm, vcpuid, &regs); in vm_vcpu_add_default()
260 vcpu_regs_set(vm, vcpuid, &regs); in vm_vcpu_add_default()
262 vcpu_sregs_get(vm, vcpuid, &sregs); in vm_vcpu_add_default()
265 vcpu_sregs_set(vm, vcpuid, &sregs); in vm_vcpu_add_default()
267 run = vcpu_state(vm, vcpuid); in vm_vcpu_add_default()
272 void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent) in vcpu_dump() argument
/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,
314 void vcpu_set_cpuid(struct kvm_vm *vm, uint32_t vcpuid,
326 uint64_t vcpu_get_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index);
327 int _vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
329 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.c249 static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid, in create_vm() argument
260 vm_vcpu_add_default(vm, vcpuid, guest_code); in create_vm()