| /linux/tools/testing/selftests/kvm/s390/ |
| H A D | user_operexec.c | 29 TEST_ASSERT_EQ(0, rc); in test_user_instr0() 33 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, ICPT_OPEREXC); in test_user_instr0() 34 TEST_ASSERT_EQ(vcpu->run->s390_sieic.ipa, 0); in test_user_instr0() 52 TEST_ASSERT_EQ(0, rc); in test_user_operexec() 56 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, ICPT_OPEREXC); in test_user_operexec() 57 TEST_ASSERT_EQ(vcpu->run->s390_sieic.ipa, 0x0807); in test_user_operexec() 67 TEST_ASSERT_EQ(0, rc); in test_user_operexec() 71 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, ICPT_OPEREXC); in test_user_operexec() 72 TEST_ASSERT_EQ(vcpu->run->s390_sieic.ipa, 0); in test_user_operexec() 86 TEST_ASSERT_EQ(0, rc); in test_user_operexec_combined() [all …]
|
| H A D | cmma_test.c | 235 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic() 236 TEST_ASSERT_EQ(errno_out, ENXIO); in test_get_cmma_basic() 245 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic() 246 TEST_ASSERT_EQ(errno_out, EINVAL); in test_get_cmma_basic() 250 TEST_ASSERT_EQ(rc, 0); in test_get_cmma_basic() 251 TEST_ASSERT_EQ(errno_out, 0); in test_get_cmma_basic() 258 TEST_ASSERT_EQ(rc, -1); in test_get_cmma_basic() 259 TEST_ASSERT_EQ(errno_out, EINVAL); in test_get_cmma_basic() 266 TEST_ASSERT_EQ(vcpu->run->exit_reason, 13); in assert_exit_was_hypercall() 267 TEST_ASSERT_EQ(vcp in assert_exit_was_hypercall() [all...] |
| H A D | debug_test.c | 50 TEST_ASSERT_EQ(vcpu->run->psw_mask, new_psw[0]); in test_step_int() 51 TEST_ASSERT_EQ(vcpu->run->psw_addr, new_psw[1]); in test_step_int() 88 TEST_ASSERT_EQ(vcpu->run->s390_sieic.icptcode, ICPT_INST); in test_step_pgm_diag() 89 TEST_ASSERT_EQ(vcpu->run->s390_sieic.ipa & 0xff00, IPA0_DIAG); in test_step_pgm_diag() 93 TEST_ASSERT_EQ(vcpu->run->psw_mask, new_psw[0]); in test_step_pgm_diag() 94 TEST_ASSERT_EQ(vcpu->run->psw_addr, new_psw[1]); in test_step_pgm_diag()
|
| H A D | ucontrol_test.c | 42 TEST_ASSERT_EQ(0, rc); in require_ucontrol_admin() 310 TEST_ASSERT_EQ(KVM_EXIT_S390_UCONTROL, run->exit_reason); in uc_handle_exit_ucontrol() 318 TEST_ASSERT_EQ(0, rc); in uc_handle_exit_ucontrol() 434 TEST_ASSERT_EQ(KVM_EXIT_S390_SIEIC, self->run->exit_reason); in uc_assert_diag44() 435 TEST_ASSERT_EQ(ICPT_INST, sie_block->icptcode); in uc_assert_diag44() 436 TEST_ASSERT_EQ(0x8300, sie_block->ipa); in uc_assert_diag44() 437 TEST_ASSERT_EQ(0x440000, sie_block->ipb); in uc_assert_diag44() 607 TEST_ASSERT_EQ(0, sie_block->cpuflags & CPUSTAT_KSS); in TEST_F() 608 TEST_ASSERT_EQ(0, sie_block->ictl & (ICTL_ISKE | ICTL_SSKE | ICTL_RRBE)); in TEST_F() 609 TEST_ASSERT_EQ(KVM_EXIT_S390_SIEIC, self->run->exit_reason); in TEST_F() [all …]
|
| H A D | tprot.c | 195 TEST_ASSERT_EQ(uc.cmd, UCALL_SYNC); \ 196 TEST_ASSERT_EQ(uc.args[1], __stage); \
|
| /linux/tools/testing/selftests/kvm/x86/ |
| H A D | tsc_msrs_test.c | 106 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 107 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 112 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 113 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 118 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), val); in main() 119 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 126 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in main() 127 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC_ADJUST), val); in main() 132 TEST_ASSERT_EQ(rounded_host_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in main() 133 TEST_ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_TSC_ADJUST), UNITY * 123456); in main() [all …]
|
| H A D | private_mem_kvm_exits_test.c | 37 TEST_ASSERT_EQ(vcpu->run->exit_reason, KVM_EXIT_MEMORY_FAULT); in run_vcpu_get_exit_reason() 77 TEST_ASSERT_EQ(exit_reason, KVM_EXIT_MEMORY_FAULT); in test_private_access_memslot_deleted() 78 TEST_ASSERT_EQ(vcpu->run->memory_fault.flags, KVM_MEMORY_EXIT_FLAG_PRIVATE); in test_private_access_memslot_deleted() 79 TEST_ASSERT_EQ(vcpu->run->memory_fault.gpa, EXITS_TEST_GPA); in test_private_access_memslot_deleted() 80 TEST_ASSERT_EQ(vcpu->run->memory_fault.size, EXITS_TEST_SIZE); in test_private_access_memslot_deleted() 106 TEST_ASSERT_EQ(exit_reason, KVM_EXIT_MEMORY_FAULT); in test_private_access_memslot_not_private() 107 TEST_ASSERT_EQ(vcpu->run->memory_fault.flags, KVM_MEMORY_EXIT_FLAG_PRIVATE); in test_private_access_memslot_not_private() 108 TEST_ASSERT_EQ(vcpu->run->memory_fault.gpa, EXITS_TEST_GPA); in test_private_access_memslot_not_private() 109 TEST_ASSERT_EQ(vcpu->run->memory_fault.size, EXITS_TEST_SIZE); in test_private_access_memslot_not_private()
|
| H A D | dirty_log_page_splitting_test.c | 76 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_SYNC); in vcpu_worker() 110 TEST_ASSERT_EQ(host_num_pages, pages_per_slot * SLOTS); in run_test() 171 TEST_ASSERT_EQ((stats_populated.pages_2m * 512 + in run_test() 183 TEST_ASSERT_EQ(stats_clear_pass[0].hugepages, 0); in run_test() 187 TEST_ASSERT_EQ(stats_dirty_logging_enabled.hugepages, stats_populated.hugepages); in run_test() 189 TEST_ASSERT_EQ(stats_dirty_logging_enabled.hugepages, 0); in run_test() 200 TEST_ASSERT_EQ(stats_populated.pages_2m, stats_repopulated.pages_2m); in run_test() 201 TEST_ASSERT_EQ(stats_populated.pages_1g, stats_repopulated.pages_1g); in run_test()
|
| H A D | sev_smoke_test.c | 144 TEST_ASSERT_EQ(vcpu->run->system_event.type, KVM_SYSTEM_EVENT_SEV_TERM); in test_sync_vmsa() 145 TEST_ASSERT_EQ(vcpu->run->system_event.ndata, 1); in test_sync_vmsa() 146 TEST_ASSERT_EQ(vcpu->run->system_event.data[0], GHCB_MSR_TERM_REQ); in test_sync_vmsa() 171 TEST_ASSERT_EQ(vcpu->run->system_event.type, KVM_SYSTEM_EVENT_SEV_TERM); in test_sev() 172 TEST_ASSERT_EQ(vcpu->run->system_event.ndata, 1); in test_sev() 173 TEST_ASSERT_EQ(vcpu->run->system_event.data[0], GHCB_MSR_TERM_REQ); in test_sev()
|
| H A D | svm_nested_vmcb12_gpa.c | 87 TEST_ASSERT_EQ(get_ucall(vcpu, &uc), UCALL_SYNC); in test_invalid_vmcb12() 88 TEST_ASSERT_EQ(uc.args[1], SYNC_GP); in test_invalid_vmcb12() 100 TEST_ASSERT_EQ(vcpu->run->emulation_failure.suberror, KVM_INTERNAL_ERROR_EMULATION); in test_unmappable_vmcb12() 118 TEST_ASSERT_EQ(get_ucall(vcpu, &uc), UCALL_SYNC); in test_unmappable_vmcb12_vmexit() 119 TEST_ASSERT_EQ(uc.args[1], SYNC_L2_STARTED); in test_unmappable_vmcb12_vmexit()
|
| H A D | nested_exceptions_test.c | 248 TEST_ASSERT_EQ(events.flags & KVM_VCPUEVENT_VALID_PAYLOAD, in main() 250 TEST_ASSERT_EQ(events.exception.pending, true); in main() 251 TEST_ASSERT_EQ(events.exception.nr, SS_VECTOR); in main() 252 TEST_ASSERT_EQ(events.exception.has_error_code, true); in main() 253 TEST_ASSERT_EQ(events.exception.error_code, SS_ERROR_CODE); in main()
|
| H A D | xapic_state_test.c | 77 TEST_ASSERT_EQ(get_ucall(vcpu, &uc), UCALL_SYNC); in ____test_icr() 78 TEST_ASSERT_EQ(uc.args[1], val); in ____test_icr() 91 TEST_ASSERT_EQ(icr & ~APIC_ICR_BUSY, val & ~APIC_ICR_BUSY); in ____test_icr() 93 TEST_ASSERT_EQ(icr, val & ~APIC_ICR_BUSY); in ____test_icr()
|
| H A D | nested_set_state_test.c | 244 TEST_ASSERT_EQ(state->hdr.vmx.vmxon_pa, -1ull); in test_vmx_nested_state() 245 TEST_ASSERT_EQ(state->hdr.vmx.vmcs12_pa, -1ull); in test_vmx_nested_state() 246 TEST_ASSERT_EQ(state->flags, 0); in test_vmx_nested_state() 343 TEST_ASSERT_EQ(state->hdr.svm.vmcb_pa, 0); in test_svm_nested_state() 344 TEST_ASSERT_EQ(state->flags, KVM_STATE_NESTED_GIF_SET); in test_svm_nested_state()
|
| H A D | nested_vmsave_vmload_test.c | 163 TEST_ASSERT_EQ(TEST_VMCB_L2_GPA, TEST_VMCB_L1_GPA(0)); in main() 183 TEST_ASSERT_EQ(test_vmcb[i]->save.kernel_gs_base, 0xaaaa); in main() 184 TEST_ASSERT_EQ(test_vmcb[1-i]->save.kernel_gs_base, 0); in main()
|
| H A D | vmx_pmu_caps_test.c | 104 TEST_ASSERT_EQ(vcpu_get_msr(vcpu, MSR_IA32_PERF_CAPABILITIES), in KVM_ONE_VCPU_TEST() 218 TEST_ASSERT_EQ(val, host_cap.capabilities); in KVM_ONE_VCPU_TEST() 223 TEST_ASSERT_EQ(val, 0); in KVM_ONE_VCPU_TEST()
|
| H A D | kvm_buslock_test.c | 126 TEST_ASSERT_EQ(atomic_read(val), bus_locks + host_cpu_is_intel); in main() 132 TEST_ASSERT_EQ(i, bus_locks); in main()
|
| H A D | state_test.c | 235 TEST_ASSERT_EQ(!!(vmcb->control.int_ctl & V_GIF_MASK), 1); in svm_check_nested_state() 237 TEST_ASSERT_EQ(!!(vmcb->control.int_ctl & V_GIF_MASK), 0); in svm_check_nested_state() 248 TEST_ASSERT_EQ(vmcb->control.next_rip, state->regs.rip); in svm_check_nested_state()
|
| /linux/tools/testing/selftests/kvm/lib/x86/ |
| H A D | sev.c | 51 TEST_ASSERT_EQ(vm->arch.sev_fd, -1); in sev_vm_init() 56 TEST_ASSERT_EQ(vm->type, KVM_X86_SEV_VM); in sev_vm_init() 64 TEST_ASSERT_EQ(vm->arch.sev_fd, -1); in sev_es_vm_init() 69 TEST_ASSERT_EQ(vm->type, KVM_X86_SEV_ES_VM); in sev_es_vm_init() 78 TEST_ASSERT_EQ(vm->type, KVM_X86_SNP_VM); in snp_vm_init() 94 TEST_ASSERT_EQ(status.policy, policy); in sev_vm_launch() 95 TEST_ASSERT_EQ(status.state, SEV_GUEST_STATE_LAUNCH_UPDATE); in sev_vm_launch() 116 TEST_ASSERT_EQ(guest_status.state, SEV_GUEST_STATE_LAUNCH_SECRET); in sev_vm_launch_measure() 131 TEST_ASSERT_EQ(status.state, SEV_GUEST_STATE_RUNNING); in sev_vm_launch_finish()
|
| /linux/tools/testing/selftests/kvm/ |
| H A D | guest_memfd_test.c | 61 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_mmap_supported() 68 TEST_ASSERT_EQ(READ_ONCE(mem[i]), 0x00); in test_mmap_supported() 70 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_mmap_supported() 74 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_mmap_supported() 219 TEST_ASSERT_EQ(madvise(mem, pmd_size, MADV_COLLAPSE), -1); in test_collapse() 220 TEST_ASSERT_EQ(errno, EINVAL); in test_collapse() 244 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_fault_sigbus() 264 TEST_ASSERT_EQ(mem, MAP_FAILED); in test_mmap_not_supported() 267 TEST_ASSERT_EQ(mem, MAP_FAILED); in test_mmap_not_supported() 277 TEST_ASSERT_EQ(sb.st_size, total_size); in test_file_size() [all …]
|
| H A D | mmu_stress_test.c | 106 TEST_ASSERT_EQ(get_ucall(vcpu, &uc), UCALL_SYNC); in assert_sync_stage() 107 TEST_ASSERT_EQ(uc.args[1], stage); in assert_sync_stage() 177 TEST_ASSERT_EQ(errno, EFAULT); in vcpu_worker() 198 TEST_ASSERT_EQ(r, 0); in vcpu_worker()
|
| H A D | coalesced_io_test.c | 172 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_SYNC); in test_coalesced_io() 173 TEST_ASSERT_EQ(ring->first, ring_start); in test_coalesced_io() 174 TEST_ASSERT_EQ(ring->last, ring_start); in test_coalesced_io()
|
| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | sea_to_user.c | 205 TEST_ASSERT_EQ(ESR_ELx_EC(esr), ESR_ELx_EC_DABT_LOW); in run_vm() 206 TEST_ASSERT_EQ(esr & ESR_ELx_FSC_TYPE, ESR_ELx_FSC_EXTABT); in run_vm() 207 TEST_ASSERT_EQ(ESR_ELx_ISS2(esr), 0); in run_vm() 208 TEST_ASSERT_EQ((esr & ESR_ELx_INST_SYNDROME), 0); in run_vm() 209 TEST_ASSERT_EQ(esr & ESR_ELx_VNCR, 0); in run_vm() 213 TEST_ASSERT_EQ(run->arm_sea.gva, EINJ_GVA); in run_vm() 218 TEST_ASSERT_EQ(run->arm_sea.gpa, einj_gpa & PAGE_ADDR_MASK); in run_vm()
|
| H A D | aarch32_id_regs.c | 101 TEST_ASSERT_EQ(val, 0); in test_user_raz_wi() 110 TEST_ASSERT_EQ(val, 0); in test_user_raz_wi() 130 TEST_ASSERT_EQ(val, 0); in test_user_raz_invariant() 137 TEST_ASSERT_EQ(val, 0); in test_user_raz_invariant()
|
| H A D | external_aborts.c | 131 TEST_ASSERT_EQ(run->mmio.phys_addr, MMIO_ADDR); in test_mmio_abort() 132 TEST_ASSERT_EQ(run->mmio.len, sizeof(unsigned long)); in test_mmio_abort() 164 TEST_ASSERT_EQ(errno, ENOSYS); in test_mmio_nisv() 184 TEST_ASSERT_EQ(run->arm_nisv.fault_ipa, MMIO_ADDR); in test_mmio_nisv_abort() 353 TEST_ASSERT_EQ(run->mmio.phys_addr, MMIO_ADDR); in test_mmio_ease() 354 TEST_ASSERT_EQ(run->mmio.len, sizeof(unsigned long)); in test_mmio_ease()
|
| /linux/tools/testing/selftests/kvm/riscv/ |
| H A D | ebreak_test.c | 64 TEST_ASSERT_EQ(pc, LABEL_ADDRESS(sw_bp_1)); in main() 78 TEST_ASSERT_EQ(get_ucall(vcpu, NULL), UCALL_DONE); in main()
|