Lines Matching refs:vcpu

46 static void run_test(struct kvm_vcpu *vcpu, const char *expected_printf,
52 static void fn(struct kvm_vcpu *vcpu, T a, T b) \
60 sync_global_to_guest(vcpu->vm, vals); \
61 run_test(vcpu, expected_printf, expected_assert); \
114 static void do_vcpu_run(struct kvm_vcpu *vcpu) in do_vcpu_run() argument
119 r = __vcpu_run(vcpu); in do_vcpu_run()
125 static void run_test(struct kvm_vcpu *vcpu, const char *expected_printf, in run_test() argument
128 struct kvm_run *run = vcpu->run; in run_test()
132 do_vcpu_run(vcpu); in run_test()
138 switch (get_ucall(vcpu, &uc)) { in run_test()
170 struct kvm_vcpu *vcpu; in test_limits() local
175 vm = vm_create_with_one_vcpu(&vcpu, guest_code_limits); in test_limits()
176 run = vcpu->run; in test_limits()
177 do_vcpu_run(vcpu); in test_limits()
183 TEST_ASSERT(get_ucall(vcpu, &uc) == UCALL_ABORT, in test_limits()
192 struct kvm_vcpu *vcpu; in main() local
195 vm = vm_create_with_one_vcpu(&vcpu, guest_code); in main()
197 test_type_i64(vcpu, -1, -1); in main()
198 test_type_i64(vcpu, -1, 1); in main()
199 test_type_i64(vcpu, 0x1234567890abcdef, 0x1234567890abcdef); in main()
200 test_type_i64(vcpu, 0x1234567890abcdef, 0x1234567890abcdee); in main()
202 test_type_u64(vcpu, 0x1234567890abcdef, 0x1234567890abcdef); in main()
203 test_type_u64(vcpu, 0x1234567890abcdef, 0x1234567890abcdee); in main()
204 test_type_x64(vcpu, 0x1234567890abcdef, 0x1234567890abcdef); in main()
205 test_type_x64(vcpu, 0x1234567890abcdef, 0x1234567890abcdee); in main()
206 test_type_X64(vcpu, 0x1234567890abcdef, 0x1234567890abcdef); in main()
207 test_type_X64(vcpu, 0x1234567890abcdef, 0x1234567890abcdee); in main()
209 test_type_u32(vcpu, 0x90abcdef, 0x90abcdef); in main()
210 test_type_u32(vcpu, 0x90abcdef, 0x90abcdee); in main()
211 test_type_x32(vcpu, 0x90abcdef, 0x90abcdef); in main()
212 test_type_x32(vcpu, 0x90abcdef, 0x90abcdee); in main()
213 test_type_X32(vcpu, 0x90abcdef, 0x90abcdef); in main()
214 test_type_X32(vcpu, 0x90abcdef, 0x90abcdee); in main()
216 test_type_int(vcpu, -1, -1); in main()
217 test_type_int(vcpu, -1, 1); in main()
218 test_type_int(vcpu, 1, 1); in main()
220 test_type_char(vcpu, 'a', 'a'); in main()
221 test_type_char(vcpu, 'a', 'A'); in main()
222 test_type_char(vcpu, 'a', 'b'); in main()
224 test_type_str(vcpu, "foo", "foo"); in main()
225 test_type_str(vcpu, "foo", "bar"); in main()
227 test_type_ptr(vcpu, 0x1234567890abcdef, 0x1234567890abcdef); in main()
228 test_type_ptr(vcpu, 0x1234567890abcdef, 0x1234567890abcdee); in main()