Home
last modified time | relevance | path

Searched refs:uc (Results 1 – 25 of 83) sorted by relevance

1234

/tools/testing/selftests/kvm/x86_64/
Dvmx_preemption_timer_test.c163 struct ucall uc; in main() local
193 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
195 TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], in main()
196 __FILE__, uc.args[1]); in main()
203 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
207 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && in main()
208 uc.args[1] == stage, "Stage %d: Unexpected register values vmexit, got %lx", in main()
209 stage, (ulong)uc.args[1]); in main()
221 stage, uc.args[2], uc.args[3]); in main()
224 stage, uc.args[4], uc.args[5]); in main()
[all …]
Demulator_error_test.c103 static void do_guest_assert(struct kvm_vm *vm, struct ucall *uc) in do_guest_assert() argument
105 TEST_FAIL("%s at %s:%ld", (const char *)uc->args[0], __FILE__, in do_guest_assert()
106 uc->args[1]); in do_guest_assert()
112 struct ucall uc; in check_for_guest_assert() local
115 get_ucall(vm, VCPU_ID, &uc) == UCALL_ABORT) { in check_for_guest_assert()
116 do_guest_assert(vm, &uc); in check_for_guest_assert()
123 struct ucall uc; in process_ucall_done() local
132 TEST_ASSERT(get_ucall(vm, VCPU_ID, &uc) == UCALL_DONE, in process_ucall_done()
134 uc.cmd, UCALL_DONE); in process_ucall_done()
140 struct ucall uc; in process_ucall() local
[all …]
Dkvm_pv_test.c154 static void pr_msr(struct ucall *uc) in pr_msr() argument
156 struct msr_data *msr = (struct msr_data *)uc->args[0]; in pr_msr()
161 static void pr_hcall(struct ucall *uc) in pr_hcall() argument
163 struct hcall_data *hc = (struct hcall_data *)uc->args[0]; in pr_hcall()
168 static void handle_abort(struct ucall *uc) in handle_abort() argument
170 TEST_FAIL("%s at %s:%ld", (const char *)uc->args[0], in handle_abort()
171 __FILE__, uc->args[1]); in handle_abort()
179 struct ucall uc; in enter_guest() local
191 switch (get_ucall(vm, VCPU_ID, &uc)) { in enter_guest()
193 pr_msr(&uc); in enter_guest()
[all …]
Dset_boot_cpu_id.c52 struct ucall uc; in run_vcpu() local
59 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu()
61 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && in run_vcpu()
62 uc.args[1] == stage + 1, in run_vcpu()
64 stage + 1, (ulong)uc.args[1]); in run_vcpu()
74 (const char *)uc.args[0], __FILE__, in run_vcpu()
75 uc.args[1], uc.args[2], uc.args[3]); in run_vcpu()
Dtsc_msrs_test.c71 struct ucall uc; in run_vcpu() local
77 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu()
79 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && in run_vcpu()
80uc.args[1] == stage + 1, "Stage %d: Unexpected register values vmexit, got %lx", in run_vcpu()
81 stage + 1, (ulong)uc.args[1]); in run_vcpu()
87 "\tvalues: %#lx, %#lx", (const char *)uc.args[0], in run_vcpu()
88 __FILE__, uc.args[1], uc.args[2], uc.args[3]); in run_vcpu()
Dvmx_close_while_nested_test.c67 struct ucall uc; in main() local
78 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
80 TEST_FAIL("%s", (const char *)uc.args[0]); in main()
83 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
Dvmx_apic_access_test.c104 struct ucall uc; in main() local
124 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
126 TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], in main()
127 __FILE__, uc.args[1]); in main()
130 apic_access_addr = uc.args[1]; in main()
136 TEST_ASSERT(false, "Unknown ucall %lu", uc.cmd); in main()
Dvmx_dirty_log_test.c78 struct ucall uc; in main() local
125 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
127 TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], in main()
128 __FILE__, uc.args[1]); in main()
136 if (uc.args[1]) { in main()
153 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
Dget_cpuid_test.c123 struct ucall uc; in run_vcpu() local
127 switch (get_ucall(vm, vcpuid, &uc)) { in run_vcpu()
129 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && in run_vcpu()
130 uc.args[1] == stage + 1, in run_vcpu()
132 stage + 1, (ulong)uc.args[1]); in run_vcpu()
137 TEST_ASSERT(false, "%s at %s:%ld\n\tvalues: %#lx, %#lx", (const char *)uc.args[0], in run_vcpu()
138 __FILE__, uc.args[1], uc.args[2], uc.args[3]); in run_vcpu()
Dplatform_info_test.c51 struct ucall uc; in test_msr_platform_info_enabled() local
59 get_ucall(vm, VCPU_ID, &uc); in test_msr_platform_info_enabled()
60 TEST_ASSERT(uc.cmd == UCALL_SYNC, in test_msr_platform_info_enabled()
61 "Received ucall other than UCALL_SYNC: %lu\n", uc.cmd); in test_msr_platform_info_enabled()
62 TEST_ASSERT((uc.args[1] & MSR_PLATFORM_INFO_MAX_TURBO_RATIO) == in test_msr_platform_info_enabled()
Dsvm_vmcall_test.c53 struct ucall uc; in main() local
61 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
63 TEST_FAIL("%s", (const char *)uc.args[0]); in main()
70 TEST_FAIL("Unknown ucall 0x%lx.", uc.cmd); in main()
Dvmx_nested_tsc_scaling_test.c198 struct ucall uc; in main() local
206 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
208 TEST_FAIL("%s", (const char *) uc.args[0]); in main()
210 switch (uc.args[0]) { in main()
212 sleep(uc.args[1]); in main()
215 l1_tsc_freq = uc.args[1]; in main()
223 l2_tsc_freq = uc.args[1]; in main()
235 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
Devmcs_test.c147 struct ucall uc; in main() local
181 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
183 TEST_FAIL("%s at %s:%ld", (const char *)uc.args[0], in main()
184 __FILE__, uc.args[1]); in main()
191 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
195 TEST_ASSERT(!strcmp((const char *)uc.args[0], "hello") && in main()
196 uc.args[1] == stage, "Stage %d: Unexpected register values vmexit, got %lx", in main()
197 stage, (ulong)uc.args[1]); in main()
/tools/testing/selftests/kvm/lib/s390x/
Ducall.c19 struct ucall uc = { in ucall() local
29 uc.args[i] = va_arg(va, uint64_t); in ucall()
33 asm volatile ("diag 0,%0,0x501" : : "a"(&uc) : "memory"); in ucall()
36 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
41 if (uc) in get_ucall()
42 memset(uc, 0, sizeof(*uc)); in get_ucall()
54 if (uc) in get_ucall()
55 memcpy(uc, &ucall, sizeof(ucall)); in get_ucall()
/tools/testing/selftests/kvm/lib/x86_64/
Ducall.c21 struct ucall uc = { in ucall() local
31 uc.args[i] = va_arg(va, uint64_t); in ucall()
35 : : [port] "d" (UCALL_PIO_PORT), "D" (&uc) : "rax", "memory"); in ucall()
38 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
43 if (uc) in get_ucall()
44 memset(uc, 0, sizeof(*uc)); in get_ucall()
54 if (uc) in get_ucall()
55 memcpy(uc, &ucall, sizeof(ucall)); in get_ucall()
/tools/testing/selftests/arm64/signal/testcases/
Dtestcases.h27 (struct _aarch64_ctx *)(&(sf).uc.uc_mcontext.__reserved)
30 sizeof((sf).uc.uc_mcontext.__reserved)
35 #define ASSERT_BAD_CONTEXT(uc) do { \ argument
37 if (!validate_reserved((uc), GET_UCP_RESV_SIZE((uc)), &err)) { \
47 #define ASSERT_GOOD_CONTEXT(uc) do { \ argument
49 if (!validate_reserved((uc), GET_UCP_RESV_SIZE((uc)), &err)) { \
75 ucontext_t uc; member
79 bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err);
Dmangle_pstate_invalid_mode_template.h11 ucontext_t *uc) \
13 ASSERT_GOOD_CONTEXT(uc); \
15 uc->uc_mcontext.pstate &= ~PSR_MODE_MASK; \
16 uc->uc_mcontext.pstate |= PSR_MODE_EL ## _mode; \
Dmangle_pstate_invalid_compat_toggle.c14 ucontext_t *uc) in mangle_invalid_pstate_run() argument
16 ASSERT_GOOD_CONTEXT(uc); in mangle_invalid_pstate_run()
19 uc->uc_mcontext.pstate ^= PSR_MODE32_BIT; in mangle_invalid_pstate_run()
Dmangle_pstate_invalid_daif_bits.c15 ucontext_t *uc) in mangle_invalid_pstate_run() argument
17 ASSERT_GOOD_CONTEXT(uc); in mangle_invalid_pstate_run()
23 uc->uc_mcontext.pstate |= PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT; in mangle_invalid_pstate_run()
Dfake_sigreturn_bad_size.c21 siginfo_t *si, ucontext_t *uc) in fake_sigreturn_bad_size_run() argument
27 if (!get_current_context(td, &sf.uc)) in fake_sigreturn_bad_size_run()
49 ASSERT_GOOD_CONTEXT(&sf.uc); in fake_sigreturn_bad_size_run()
65 ASSERT_BAD_CONTEXT(&sf.uc); in fake_sigreturn_bad_size_run()
Dfake_sigreturn_bad_size_for_magic0.c19 siginfo_t *si, ucontext_t *uc) in fake_sigreturn_bad_size_for_magic0_run() argument
24 if (!get_current_context(td, &sf.uc)) in fake_sigreturn_bad_size_for_magic0_run()
34 ASSERT_BAD_CONTEXT(&sf.uc); in fake_sigreturn_bad_size_for_magic0_run()
/tools/testing/selftests/kvm/lib/aarch64/
Ducall.c76 struct ucall uc = {}; in ucall() local
80 WRITE_ONCE(uc.cmd, cmd); in ucall()
85 WRITE_ONCE(uc.args[i], va_arg(va, uint64_t)); in ucall()
88 WRITE_ONCE(*ucall_exit_mmio_addr, (vm_vaddr_t)&uc); in ucall()
91 uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc) in get_ucall() argument
96 if (uc) in get_ucall()
97 memset(uc, 0, sizeof(*uc)); in get_ucall()
109 if (uc) in get_ucall()
110 memcpy(uc, &ucall, sizeof(ucall)); in get_ucall()
/tools/testing/selftests/arm64/signal/
Dtest_signals_utils.c86 siginfo_t *si, void *uc) in handle_signal_unsupported() argument
92 ((ucontext_t *)uc)->uc_mcontext.pc += 4; in handle_signal_unsupported()
108 siginfo_t *si, void *uc) in handle_signal_trigger() argument
112 td->run(td, si, uc); in handle_signal_trigger()
118 siginfo_t *si, void *uc) in handle_signal_ok() argument
127 ((ucontext_t *)uc)->uc_mcontext.sp, in handle_signal_ok()
164 siginfo_t *si, void *uc) in handle_signal_copyctx() argument
167 ((ucontext_t *)uc)->uc_mcontext.pc += 4; in handle_signal_copyctx()
168 memcpy(td->live_uc, uc, td->live_sz); in handle_signal_copyctx()
177 static void default_handler(int signum, siginfo_t *si, void *uc) in default_handler() argument
[all …]
/tools/testing/selftests/kvm/aarch64/
Ddebug-exceptions.c200 struct ucall uc; in main() local
229 switch (get_ucall(vm, VCPU_ID, &uc)) { in main()
231 TEST_ASSERT(uc.args[1] == stage, in main()
233 stage, (ulong)uc.args[1]); in main()
237 (const char *)uc.args[0], in main()
238 __FILE__, uc.args[1], uc.args[2], uc.args[3]); in main()
243 TEST_FAIL("Unknown ucall %lu", uc.cmd); in main()
/tools/testing/selftests/sigaltstack/
Dsas.c35 static ucontext_t uc, sc; variable
72 swapcontext(&sc, &uc); in my_usr1()
175 getcontext(&uc); in main()
176 uc.uc_link = NULL; in main()
177 uc.uc_stack.ss_sp = ustack; in main()
178 uc.uc_stack.ss_size = stack_size; in main()
179 makecontext(&uc, switch_fn, 0); in main()

1234