Home
last modified time | relevance | path

Searched refs:GUEST_ASSERT (Results 1 – 25 of 42) sorted by relevance

12

/linux-6.1.9/tools/testing/selftests/kvm/x86_64/
Dstate_test.c40 GUEST_ASSERT(svm->vmcb_gpa); in svm_l1_guest_code()
47 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in svm_l1_guest_code()
51 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in svm_l1_guest_code()
63 GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0ffee); in vmx_l2_guest_code()
65 GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0ffee); in vmx_l2_guest_code()
66 GUEST_ASSERT(!vmwrite(GUEST_RIP, 0xc0fffee)); in vmx_l2_guest_code()
68 GUEST_ASSERT(vmreadz(GUEST_RIP) == 0xc0fffee); in vmx_l2_guest_code()
69 GUEST_ASSERT(!vmwrite(GUEST_RIP, 0xc0ffffee)); in vmx_l2_guest_code()
80 GUEST_ASSERT(vmx_pages->vmcs_gpa); in vmx_l1_guest_code()
81 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in vmx_l1_guest_code()
[all …]
Devmcs_test.c83 GUEST_ASSERT(vmx_pages->vmcs_gpa); in guest_code()
84 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in guest_code()
86 GUEST_ASSERT(load_vmcs(vmx_pages)); in guest_code()
87 GUEST_ASSERT(vmptrstz() == vmx_pages->enlightened_vmcs_gpa); in guest_code()
90 GUEST_ASSERT(vmptrstz() == vmx_pages->enlightened_vmcs_gpa); in guest_code()
96 GUEST_ASSERT(vmptrstz() == vmx_pages->enlightened_vmcs_gpa); in guest_code()
98 GUEST_ASSERT(vmlaunch()); in guest_code()
105 GUEST_ASSERT(!vmlaunch()); in guest_code()
106 GUEST_ASSERT(vmptrstz() == vmx_pages->enlightened_vmcs_gpa); in guest_code()
113 GUEST_ASSERT(!vmresume()); in guest_code()
[all …]
Dhyperv_clock.c57 GUEST_ASSERT(tsc_freq > 0); in check_tsc_msr_rdtsc()
68 GUEST_ASSERT(r2 > r1 && t2 > t1); in check_tsc_msr_rdtsc()
76 GUEST_ASSERT(delta_ns * 100 < (t2 - t1) * 100); in check_tsc_msr_rdtsc()
93 GUEST_ASSERT(r1 >= t1 && r1 - t1 < 100000); in check_tsc_msr_tsc_page()
98 GUEST_ASSERT(r2 >= t1 && r2 - t2 < 100000); in check_tsc_msr_tsc_page()
116 GUEST_ASSERT(tsc_page->tsc_sequence == 0); in guest_main()
117 GUEST_ASSERT(tsc_page->tsc_scale == 0); in guest_main()
118 GUEST_ASSERT(tsc_page->tsc_offset == 0); in guest_main()
124 GUEST_ASSERT(tsc_page->tsc_sequence != 0); in guest_main()
137 GUEST_ASSERT(get_tscpage_ts(tsc_page) < 100000); in guest_main()
[all …]
Duserspace_msr_exit_test.c226 GUEST_ASSERT(data == 0); in guest_code_filter_allow()
227 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
230 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
233 GUEST_ASSERT(guest_exception_count == 1); in guest_code_filter_allow()
242 GUEST_ASSERT(guest_exception_count == 1); in guest_code_filter_allow()
245 GUEST_ASSERT(guest_exception_count == 1); in guest_code_filter_allow()
248 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
257 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
260 GUEST_ASSERT(data == 2); in guest_code_filter_allow()
261 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
[all …]
Dvmx_preemption_timer_test.c76 GUEST_ASSERT(vmx_pages->vmcs_gpa); in l1_guest_code()
77 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
78 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
79 GUEST_ASSERT(vmptrstz() == vmx_pages->vmcs_gpa); in l1_guest_code()
97 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
98 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
104 GUEST_ASSERT(!vmwrite(PIN_BASED_VM_EXEC_CONTROL, in l1_guest_code()
108 GUEST_ASSERT(!vmwrite(VMX_PREEMPTION_TIMER_VALUE, in l1_guest_code()
117 GUEST_ASSERT(!vmresume()); in l1_guest_code()
125 GUEST_ASSERT(l2_save_restore_done); in l1_guest_code()
[all …]
Dvmx_tsc_adjust_test.c66 GUEST_ASSERT(adjust <= max); in check_ia32_tsc_adjust()
87 GUEST_ASSERT(rdtsc() < TSC_ADJUST_VALUE); in l1_guest_code()
91 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
92 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
105 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
106 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == in l1_guest_code()
111 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
112 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
Damx_test.c123 GUEST_ASSERT(this_cpu_has(X86_FEATURE_XSAVE)); in check_cpuid_xsave()
124 GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSXSAVE)); in check_cpuid_xsave()
241 GUEST_ASSERT(check_xsave_supports_xtile()); in guest_code()
242 GUEST_ASSERT(check_xtile_info()); in guest_code()
245 GUEST_ASSERT(xtile.xsave_offset == 2816); in guest_code()
246 GUEST_ASSERT(xtile.xsave_size == 8192); in guest_code()
247 GUEST_ASSERT(xtile.max_names == 8); in guest_code()
248 GUEST_ASSERT(xtile.bytes_per_tile == 1024); in guest_code()
249 GUEST_ASSERT(xtile.bytes_per_row == 64); in guest_code()
250 GUEST_ASSERT(xtile.max_rows == 16); in guest_code()
[all …]
Dvmx_apic_access_test.c43 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
44 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
59 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
60 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
66 GUEST_ASSERT(!vmresume()); in l1_guest_code()
67 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
Dhyperv_svm_test.c74 GUEST_ASSERT(svm->vmcb_gpa); in guest_code()
81 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in guest_code()
89 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_MSR); in guest_code()
95 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_MSR); in guest_code()
104 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in guest_code()
110 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_MSR); in guest_code()
114 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in guest_code()
Dtriple_fault_event_test.c30 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code_vmx()
31 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code_vmx()
32 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code_vmx()
37 GUEST_ASSERT(!vmlaunch()); in l1_guest_code_vmx()
39 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_TRIPLE_FAULT); in l1_guest_code_vmx()
56 GUEST_ASSERT(0); in l1_guest_code_svm()
Dvmx_invalid_nested_guest_state.c31 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
32 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
43 GUEST_ASSERT(!(vmreadz(CPU_BASED_VM_EXEC_CONTROL) & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) || in l1_guest_code()
46 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
49 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_TRIPLE_FAULT); in l1_guest_code()
Dvmx_close_while_nested_test.c37 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
38 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
44 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
45 GUEST_ASSERT(0); in l1_guest_code()
Dfix_hypercall_test.c58 GUEST_ASSERT(0); in guest_main()
74 GUEST_ASSERT(ret == (uint64_t)-EFAULT); in guest_main()
75 GUEST_ASSERT(!memcmp(other_hypercall_insn, hypercall_insn, in guest_main()
78 GUEST_ASSERT(!ret); in guest_main()
79 GUEST_ASSERT(!memcmp(native_hypercall_insn, hypercall_insn, in guest_main()
Dvmx_dirty_log_test.c53 GUEST_ASSERT(vmx->vmcs_gpa); in l1_guest_code()
54 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in l1_guest_code()
55 GUEST_ASSERT(load_vmcs(vmx)); in l1_guest_code()
61 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
63 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
Dxen_shinfo_test.c171 GUEST_ASSERT(rs->time[RUNSTATE_runnable] != 0); in guest_code()
172 GUEST_ASSERT(rs->state == 0); in guest_code()
175 GUEST_ASSERT(rs->time[RUNSTATE_blocked] != 0); in guest_code()
176 GUEST_ASSERT(rs->state == 0); in guest_code()
179 GUEST_ASSERT(rs->time[RUNSTATE_offline] != 0); in guest_code()
180 GUEST_ASSERT(rs->state == 0); in guest_code()
184 GUEST_ASSERT(rs->time[RUNSTATE_blocked] == 0x5a); in guest_code()
185 GUEST_ASSERT(rs->time[RUNSTATE_offline] == 0x6b6b); in guest_code()
189 GUEST_ASSERT(rs->state_entry_time >= 0x8000); in guest_code()
190 GUEST_ASSERT(rs->time[RUNSTATE_runnable] == 0); in guest_code()
[all …]
Dsvm_int_ctl_test.c50 GUEST_ASSERT(vintr_irq_called); in l2_guest_code()
51 GUEST_ASSERT(intr_irq_called); in l2_guest_code()
81 GUEST_ASSERT(vmcb->control.exit_code == SVM_EXIT_VMMCALL); in l1_guest_code()
Dvmx_nested_tsc_scaling_test.c90 GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages)); in l1_guest_code()
91 GUEST_ASSERT(load_vmcs(vmx_pages)); in l1_guest_code()
110 GUEST_ASSERT(!vmlaunch()); in l1_guest_code()
111 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in l1_guest_code()
Dxen_vmcall_test.c44 GUEST_ASSERT(rax == RETVALUE); in guest_code()
66 GUEST_ASSERT(rax == RETVALUE); in guest_code()
76 GUEST_ASSERT(rax == HV_STATUS_INVALID_ALIGNMENT); in guest_code()
Dcr4_cpuid_sync_test.c39 GUEST_ASSERT(cr4_cpuid_is_sync()); in guest_code()
45 GUEST_ASSERT(cr4_cpuid_is_sync()); in guest_code()
/linux-6.1.9/tools/testing/selftests/kvm/lib/aarch64/
Dgic.c41 GUEST_ASSERT(gic_ops); in gic_dist_init()
57 GUEST_ASSERT(type < GIC_TYPE_MAX); in gic_init()
58 GUEST_ASSERT(dist_base); in gic_init()
59 GUEST_ASSERT(redist_base); in gic_init()
60 GUEST_ASSERT(nr_cpus); in gic_init()
68 GUEST_ASSERT(gic_common_ops); in gic_irq_enable()
74 GUEST_ASSERT(gic_common_ops); in gic_irq_disable()
83 GUEST_ASSERT(gic_common_ops); in gic_get_and_ack_irq()
93 GUEST_ASSERT(gic_common_ops); in gic_set_eoi()
99 GUEST_ASSERT(gic_common_ops); in gic_set_dir()
[all …]
Dgic_v3.c39 GUEST_ASSERT(count--); in gicv3_gicd_wait_for_rwp()
49 GUEST_ASSERT(count--); in gicv3_gicr_wait_for_rwp()
74 GUEST_ASSERT(0); in get_intid_range()
162 GUEST_ASSERT(bits_per_field <= reg_bits); in gicv3_access_reg()
163 GUEST_ASSERT(!write || *val < (1U << bits_per_field)); in gicv3_access_reg()
168 GUEST_ASSERT(reg_bits == 32); in gicv3_access_reg()
213 GUEST_ASSERT(get_intid_range(intid) == SPI_RANGE); in gicv3_irq_set_config()
276 GUEST_ASSERT(count--); in gicv3_enable_redist()
293 GUEST_ASSERT(cpu < gicv3_data.nr_cpus); in gicv3_cpu_init()
363 GUEST_ASSERT(nr_cpus <= GICV3_MAX_CPUS); in gicv3_init()
/linux-6.1.9/tools/testing/selftests/kvm/lib/x86_64/
Dperf_test_util.c38 GUEST_ASSERT(vmx->vmcs_gpa); in perf_test_l1_guest_code()
39 GUEST_ASSERT(prepare_for_vmx_operation(vmx)); in perf_test_l1_guest_code()
40 GUEST_ASSERT(load_vmcs(vmx)); in perf_test_l1_guest_code()
41 GUEST_ASSERT(ept_1g_pages_supported()); in perf_test_l1_guest_code()
47 GUEST_ASSERT(!vmlaunch()); in perf_test_l1_guest_code()
48 GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL); in perf_test_l1_guest_code()
/linux-6.1.9/tools/testing/selftests/kvm/
Dsteal_time.c33 GUEST_ASSERT(!(READ_ONCE(st->version) & 1)); in check_status()
34 GUEST_ASSERT(READ_ONCE(st->flags) == 0); in check_status()
35 GUEST_ASSERT(READ_ONCE(st->preempted) == 0); in check_status()
43 GUEST_ASSERT(rdmsr(MSR_KVM_STEAL_TIME) == ((uint64_t)st_gva[cpu] | KVM_MSR_ENABLED)); in guest_code()
55 GUEST_ASSERT(version < READ_ONCE(st->version)); in guest_code()
125 GUEST_ASSERT(READ_ONCE(st->rev) == 0); in check_status()
126 GUEST_ASSERT(READ_ONCE(st->attr) == 0); in check_status()
135 GUEST_ASSERT(status == 0); in guest_code()
137 GUEST_ASSERT(status == 0); in guest_code()
139 GUEST_ASSERT(status == 0); in guest_code()
[all …]
/linux-6.1.9/tools/testing/selftests/kvm/aarch64/
Dpsci_test.c121 GUEST_ASSERT(!psci_cpu_on(target_cpu, CPU_ON_ENTRY_ADDR, CPU_ON_CONTEXT_ID)); in guest_test_cpu_on()
126 GUEST_ASSERT((target_state == PSCI_0_2_AFFINITY_LEVEL_ON) || in guest_test_cpu_on()
163 GUEST_ASSERT(!psci_features(PSCI_1_0_FN_SYSTEM_SUSPEND)); in guest_test_system_suspend()
164 GUEST_ASSERT(!psci_features(PSCI_1_0_FN64_SYSTEM_SUSPEND)); in guest_test_system_suspend()
Dvgic_irq.c177 GUEST_ASSERT(gic_irq_get_active(intid)); in guest_irq_generic_handler()
180 GUEST_ASSERT(!gic_irq_get_pending(intid)); in guest_irq_generic_handler()
185 GUEST_ASSERT(intid < MAX_SPI); in guest_irq_generic_handler()
194 GUEST_ASSERT(!gic_irq_get_active(intid)); in guest_irq_generic_handler()
195 GUEST_ASSERT(!gic_irq_get_pending(intid)); in guest_irq_generic_handler()
215 GUEST_ASSERT(_intid == 0 || _intid == IAR_SPURIOUS); \
313 GUEST_ASSERT(prio >= 0); in guest_restore_active()
341 GUEST_ASSERT(!gic_irq_get_active(i + first_intid)); in guest_restore_active()
380 GUEST_ASSERT(prio >= 0); in test_inject_preemption()
409 GUEST_ASSERT(!gic_irq_get_active(i + first_intid)); in test_inject_preemption()

12