Lines Matching +full:0 +full:x1234

14 #define MSR_NON_EXISTENT 0x474f4f00
16 static u64 deny_bits = 0;
78 static u8 bitmap_deadbeef[1] = { 0x1 };
89 memset(bitmap_00000000, 0xff, sizeof(bitmap_00000000)); in prepare_bitmaps()
90 memset(bitmap_00000000_write, 0xff, sizeof(bitmap_00000000_write)); in prepare_bitmaps()
91 memset(bitmap_40000000, 0xff, sizeof(bitmap_40000000)); in prepare_bitmaps()
92 memset(bitmap_c0000000, 0xff, sizeof(bitmap_c0000000)); in prepare_bitmaps()
93 memset(bitmap_c0000000_read, 0xff, sizeof(bitmap_c0000000_read)); in prepare_bitmaps()
105 .base = 0x00000000,
110 .base = 0x00000000,
115 .base = 0x40000000,
120 .base = 0xc0000000,
125 .base = 0xc0000000,
130 .base = 0xdeadbeef,
149 guest_exception_count = 0; in test_rdmsr()
166 guest_exception_count = 0; in test_wrmsr()
183 guest_exception_count = 0; in test_em_rdmsr()
200 guest_exception_count = 0; in test_em_wrmsr()
216 * A GP is thrown if anything other than 0 is written to in guest_code_filter_allow()
220 GUEST_ASSERT(data == 0); in guest_code_filter_allow()
221 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
223 test_wrmsr(MSR_IA32_XSS, 0); in guest_code_filter_allow()
224 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
238 test_wrmsr(MSR_IA32_FLUSH_CMD, 0); in guest_code_filter_allow()
242 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
251 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
255 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
259 GUEST_SYNC(0); in guest_code_filter_allow()
265 GUEST_ASSERT(data == 0); in guest_code_filter_allow()
266 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
267 test_em_wrmsr(MSR_IA32_XSS, 0); in guest_code_filter_allow()
268 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
274 test_em_wrmsr(MSR_IA32_FLUSH_CMD, 0); in guest_code_filter_allow()
277 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
280 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
283 GUEST_ASSERT(guest_exception_count == 0); in guest_code_filter_allow()
292 wrmsr(MSR_SYSCALL_MASK, 0); in guest_msr_calls()
304 wrmsr(MSR_IA32_POWER_CTL, 0x1234); in guest_msr_calls()
310 GUEST_ASSERT(rdmsr(0xdeadbeef) == 0xdeadbeef); in guest_msr_calls()
311 wrmsr(0xdeadbeef, 0x1234); in guest_msr_calls()
322 GUEST_SYNC(0); in guest_code_filter_deny()
339 GUEST_SYNC(0); in guest_code_permission_bitmap()
355 regs->rax = 0; in __guest_gp_handler()
356 regs->rdx = 0; in __guest_gp_handler()
396 "Unexpected msr (0x%04x), expected 0x%04x", in process_rdmsr()
401 run->msr.data = 0; in process_rdmsr()
416 TEST_ASSERT(false, "Unexpected MSR: 0x%04x", run->msr.index); in process_rdmsr()
428 "Unexpected msr (0x%04x), expected 0x%04x", in process_wrmsr()
433 if (run->msr.data != 0) in process_wrmsr()
444 TEST_ASSERT(false, "Unexpected MSR: 0x%04x", run->msr.index); in process_wrmsr()
586 return 0; in handle_ucall()
600 if (run->msr.index == 0xdeadbeef) { in handle_rdmsr()
612 TEST_ASSERT(run->msr.data == 0x1234, in handle_wrmsr()
618 if (run->msr.index == 0xdeadbeef) { in handle_wrmsr()
619 TEST_ASSERT(run->msr.data == 0x1234, in handle_wrmsr()
696 "Wanted EINVAL for %s with flag = 0x%llx, got rc: %i errno: %i (%s)", \
703 int nflags = sizeof(cap.args[0]) * BITS_PER_BYTE; in run_user_space_msr_flag_test()
710 for (i = 0; i < nflags; i++) { in run_user_space_msr_flag_test()
711 cap.args[0] = BIT_ULL(i); in run_user_space_msr_flag_test()
719 u64 deny_bits = 0; in run_msr_filter_flag_test()
726 .base = 0, in run_msr_filter_flag_test()
739 for (i = 0; i < nflags; i++) { in run_msr_filter_flag_test()
746 nflags = sizeof(filter.ranges[0].flags) * BITS_PER_BYTE; in run_msr_filter_flag_test()
747 for (i = 0; i < nflags; i++) { in run_msr_filter_flag_test()
748 filter.ranges[0].flags = BIT_ULL(i); in run_msr_filter_flag_test()