/linux-6.12.1/tools/testing/selftests/kvm/x86_64/ |
D | tsc_msrs_test.c | 23 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC), val); in guest_code() 24 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC_ADJUST), val); in guest_code() 29 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC), val); in guest_code() 30 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC_ADJUST), val); in guest_code() 36 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC), val); in guest_code() 37 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC_ADJUST), val); in guest_code() 41 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in guest_code() 42 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC_ADJUST), val); in guest_code() 51 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC), HOST_ADJUST + val); in guest_code() 52 GUEST_ASSERT_EQ(rounded_rdmsr(MSR_IA32_TSC_ADJUST), val); in guest_code() [all …]
|
D | nested_exceptions_test.c | 86 GUEST_ASSERT_EQ(ctrl->exit_code, (SVM_EXIT_EXCP_BASE + vector)); in svm_run_l2() 87 GUEST_ASSERT_EQ(ctrl->exit_info_1, error_code); in svm_run_l2() 108 GUEST_ASSERT_EQ(ctrl->exit_code, SVM_EXIT_SHUTDOWN); in l1_svm_code() 117 GUEST_ASSERT_EQ(vector == SS_VECTOR ? vmlaunch() : vmresume(), 0); in vmx_run_l2() 122 GUEST_ASSERT_EQ(vmreadz(VM_EXIT_REASON), EXIT_REASON_EXCEPTION_NMI); in vmx_run_l2() 123 GUEST_ASSERT_EQ((vmreadz(VM_EXIT_INTR_INFO) & 0xff), vector); in vmx_run_l2() 124 GUEST_ASSERT_EQ(vmreadz(VM_EXIT_INTR_ERROR_CODE), error_code); in vmx_run_l2() 131 GUEST_ASSERT_EQ(prepare_for_vmx_operation(vmx), true); in l1_vmx_code() 133 GUEST_ASSERT_EQ(load_vmcs(vmx), true); in l1_vmx_code() 136 GUEST_ASSERT_EQ(vmwrite(GUEST_IDTR_LIMIT, 0), 0); in l1_vmx_code() [all …]
|
D | svm_nested_soft_inject_test.c | 36 GUEST_ASSERT_EQ(regs->rip, (unsigned long)l2_guest_code_int); in guest_int_handler() 41 GUEST_ASSERT_EQ(int_fired, 1); in l2_guest_code_int() 54 GUEST_ASSERT_EQ(bp_fired, 1); in l2_guest_code_int() 69 GUEST_ASSERT_EQ(nmi_stage_get(), 3); in guest_nmi_handler() 114 GUEST_ASSERT_EQ(nmi_stage_get(), 1); in l1_guest_code()
|
D | cpuid_test.c | 38 GUEST_ASSERT_EQ(eax, guest_cpuid->entries[i].eax); in test_guest_cpuids() 39 GUEST_ASSERT_EQ(ebx, guest_cpuid->entries[i].ebx); in test_guest_cpuids() 40 GUEST_ASSERT_EQ(ecx, guest_cpuid->entries[i].ecx); in test_guest_cpuids() 41 GUEST_ASSERT_EQ(edx, guest_cpuid->entries[i].edx); in test_guest_cpuids() 54 GUEST_ASSERT_EQ(this_cpu_property(X86_PROPERTY_MAX_KVM_LEAF), 0x40000001); in guest_main()
|
D | platform_info_test.c | 31 GUEST_ASSERT_EQ(msr_platform_info & MSR_PLATFORM_INFO_MAX_TURBO_RATIO, in guest_code() 36 GUEST_ASSERT_EQ(vector, GP_VECTOR); in guest_code()
|
D | kvm_pv_test.c | 49 GUEST_ASSERT_EQ(vector, GP_VECTOR); in test_msr() 52 GUEST_ASSERT_EQ(vector, GP_VECTOR); in test_msr() 80 GUEST_ASSERT_EQ(r, -KVM_ENOSYS); in test_hcall()
|
D | pmu_counters_test.c | 113 GUEST_ASSERT_EQ(count, NUM_INSNS_RETIRED); in guest_assert_event_count() 116 GUEST_ASSERT_EQ(count, NUM_BRANCH_INSNS_RETIRED); in guest_assert_event_count() 137 GUEST_ASSERT_EQ(_rdpmc(pmc), count); in guest_assert_event_count() 140 GUEST_ASSERT_EQ(_rdpmc(pmc), 0xdead); in guest_assert_event_count() 252 GUEST_ASSERT_EQ(idx, gp_event.f.bit); in guest_test_arch_event() 445 GUEST_ASSERT_EQ(global_ctrl, GENMASK_ULL(nr_gp_counters - 1, 0)); in guest_test_gp_counters() 447 GUEST_ASSERT_EQ(global_ctrl, 0); in guest_test_gp_counters()
|
D | userspace_io_test.c | 23 GUEST_ASSERT_EQ(count, 0); in guest_ins_port80() 24 GUEST_ASSERT_EQ((unsigned long)buffer, end); in guest_ins_port80()
|
D | state_test.c | 206 GUEST_ASSERT_EQ(bounds[0], output[0]); in guest_code() 207 GUEST_ASSERT_EQ(bounds[1], output[1]); in guest_code()
|
D | hyperv_evmcs.c | 125 GUEST_ASSERT_EQ(vmreadz(VM_EXIT_REASON), EXIT_REASON_EXCEPTION_NMI); in guest_code() 126 GUEST_ASSERT_EQ((vmreadz(VM_EXIT_INTR_INFO) & 0xff), NMI_VECTOR); in guest_code()
|
D | smaller_maxphyaddr_emulation_test.c | 38 GUEST_ASSERT_EQ(vector, PF_VECTOR); in guest_code()
|
D | hyperv_extended_hypercalls.c | 31 GUEST_ASSERT_EQ(*output_gva, EXT_CAPABILITIES); in guest_code()
|
D | set_boot_cpu_id.c | 31 GUEST_ASSERT_EQ(get_bsp_flag(), 0); in guest_not_bsp_vcpu()
|
/linux-6.12.1/tools/testing/selftests/kvm/aarch64/ |
D | debug-exceptions.c | 244 GUEST_ASSERT_EQ(sw_bp_addr, PC(sw_bp)); in guest_code() 250 GUEST_ASSERT_EQ(hw_bp_addr, PC(hw_bp)); in guest_code() 256 GUEST_ASSERT_EQ(hw_bp_addr, PC(bp_svc)); in guest_code() 257 GUEST_ASSERT_EQ(svc_addr, PC(bp_svc) + 4); in guest_code() 263 GUEST_ASSERT_EQ(sw_bp_addr, PC(bp_brk)); in guest_code() 264 GUEST_ASSERT_EQ(hw_bp_addr, PC(bp_brk)); in guest_code() 270 GUEST_ASSERT_EQ(write_data, 'x'); in guest_code() 271 GUEST_ASSERT_EQ(wp_data_addr, PC(write_data)); in guest_code() 282 GUEST_ASSERT_EQ(ss_addr[0], PC(ss_start)); in guest_code() 283 GUEST_ASSERT_EQ(ss_addr[1], PC(ss_start) + 4); in guest_code() [all …]
|
D | page_fault_test.c | 89 GUEST_ASSERT_EQ(val, TEST_DATA); in guest_write64() 120 GUEST_ASSERT_EQ(val, TEST_DATA); in guest_cas() 128 GUEST_ASSERT_EQ(val, 0); in guest_read64() 141 GUEST_ASSERT_EQ(par & 1, 0); in guest_at() 156 GUEST_ASSERT_EQ(val, 0); in guest_dc_zva() 176 GUEST_ASSERT_EQ(val, 0); in guest_ld_preidx() 177 GUEST_ASSERT_EQ(addr, TEST_GVA); in guest_ld_preidx() 188 GUEST_ASSERT_EQ(addr, TEST_GVA); in guest_st_preidx() 220 GUEST_ASSERT_EQ(*((uint64_t *)TEST_PTE_GVA) & PTE_AF, PTE_AF); in guest_check_pte_af() 249 GUEST_ASSERT_EQ(ret, 0x77); in guest_exec()
|
D | vgic_irq.c | 183 GUEST_ASSERT_EQ(gic_read_ap1r0(), 0); in guest_irq_generic_handler() 252 GUEST_ASSERT_EQ(irq_handled, 0); in test_inject_fail() 279 GUEST_ASSERT_EQ(irq_handled, num); in guest_inject() 281 GUEST_ASSERT_EQ(irqnr_received[i], 1); in guest_inject() 334 GUEST_ASSERT_EQ(gic_read_ap1r0(), 0); in guest_restore_active() 385 GUEST_ASSERT_EQ(tmp, intid); in test_inject_preemption() 402 GUEST_ASSERT_EQ(gic_read_ap1r0(), 0); in test_inject_preemption()
|
D | aarch32_id_regs.c | 20 #define GUEST_ASSERT_REG_RAZ(reg) GUEST_ASSERT_EQ(read_sysreg_s(reg), 0)
|
D | arch_timer.c | 94 GUEST_ASSERT_EQ(intid, timer_irq); in guest_validate_irq()
|
/linux-6.12.1/tools/testing/selftests/kvm/ |
D | steal_time.c | 38 GUEST_ASSERT_EQ(READ_ONCE(st->flags), 0); in check_status() 39 GUEST_ASSERT_EQ(READ_ONCE(st->preempted), 0); in check_status() 47 GUEST_ASSERT_EQ(rdmsr(MSR_KVM_STEAL_TIME), ((uint64_t)st_gva[cpu] | KVM_MSR_ENABLED)); in guest_code() 127 GUEST_ASSERT_EQ(READ_ONCE(st->rev), 0); in check_status() 128 GUEST_ASSERT_EQ(READ_ONCE(st->attr), 0); in check_status() 137 GUEST_ASSERT_EQ(status, 0); in guest_code() 139 GUEST_ASSERT_EQ(status, 0); in guest_code() 141 GUEST_ASSERT_EQ(status, 0); in guest_code() 145 GUEST_ASSERT_EQ(status, (ulong)st_gva[cpu]); in guest_code()
|
D | set_memory_region_test.c | 173 GUEST_ASSERT_EQ(val, 1); in guest_code_move_memory_region() 244 GUEST_ASSERT_EQ(val, MMIO_VAL); in guest_code_delete_memory_region() 248 GUEST_ASSERT_EQ(val, 0); in guest_code_delete_memory_region() 252 GUEST_ASSERT_EQ(val, MMIO_VAL); in guest_code_delete_memory_region()
|
/linux-6.12.1/tools/testing/selftests/kvm/riscv/ |
D | sbi_pmu_test.c | 143 GUEST_ASSERT_EQ(irq_num, IRQ_PMU_OVF); in guest_irq_handler() 392 GUEST_ASSERT_EQ(ret.error, SBI_ERR_NOT_SUPPORTED); in test_invalid_event() 468 GUEST_ASSERT_EQ(READ_ONCE(snapshot_data->ctr_overflow_mask), 0); in test_pmu_events_snaphost() 471 GUEST_ASSERT_EQ(READ_ONCE(snapshot_data->ctr_values[i]), 0); in test_pmu_events_snaphost() 500 GUEST_ASSERT_EQ(vcpu_shared_irq_count, 1); in test_pmu_events_overflow() 503 GUEST_ASSERT_EQ(vcpu_shared_irq_count, 2); in test_pmu_events_overflow()
|
D | ebreak_test.c | 25 GUEST_ASSERT_EQ(READ_ONCE(sw_bp_addr), LABEL_ADDRESS(sw_bp_2)); in guest_code()
|
D | arch_timer.c | 32 GUEST_ASSERT_EQ(intid, timer_irq); in guest_irq_handler()
|
/linux-6.12.1/tools/testing/selftests/kvm/s390x/ |
D | tprot.c | 171 GUEST_ASSERT_EQ(set_storage_key(page_store_prot, 0x10), 0); in guest_code() 172 GUEST_ASSERT_EQ(set_storage_key(page_fetch_prot, 0x98), 0); in guest_code()
|
/linux-6.12.1/tools/testing/selftests/kvm/include/ |
D | ucall_common.h | 95 #define GUEST_ASSERT_EQ(a, b) \ macro
|