Lines Matching +full:0 +full:x10

26 	void *addr = (void *)0x10000 - 2 * PAGE_SIZE;  in test_set_mb()
27 void *end = (void *)0x10000; in test_set_mb()
33 skey.val = 0x30; in test_set_mb()
46 skey1.val = 0x30; in test_chg()
47 set_storage_key(pagebuf, skey1.val, 0); in test_chg()
49 pagebuf[0] = 3; in test_chg()
58 skey.val = 0x30; in test_set()
60 set_storage_key(pagebuf, skey.val, 0); in test_set()
75 memset(pagebuf, 0, PAGE_SIZE * 2); in test_priv()
80 set_storage_key(pagebuf, 0x30, 0); in test_priv()
105 set_storage_key(inv_addr, 0, 0); in test_invalid_address()
130 set_storage_key(pagebuf, 0x10, 0); in test_test_protection()
131 report(tprot(addr, 0) == TPROT_READ_WRITE, "zero key: no protection"); in test_test_protection()
138 set_storage_key(pagebuf, 0x18, 0); in test_test_protection()
143 set_storage_key(0, 0x18, 0); in test_test_protection()
144 report(tprot(0, 2) == TPROT_RW_PROTECTED, "disabled: fetch & store protection"); in test_test_protection()
145 ctl_set_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_test_protection()
146 report(tprot(0, 2) == TPROT_READ, "enabled: store protection"); in test_test_protection()
148 ctl_clear_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_test_protection()
149 set_storage_key(0, 0x00, 0); in test_test_protection()
152 ctl_set_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_test_protection()
153 set_storage_key(pagebuf, 0x90, 0); in test_test_protection()
156 ctl_clear_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_test_protection()
159 set_storage_key(pagebuf, 0x00, 0); in test_test_protection()
198 case 0: in check_key_prot_exc()
235 "spka 0x10\n\t" in store_cpu_address_key_1()
236 "stap %0\n\t" in store_cpu_address_key_1()
237 "spka 0\n" in store_cpu_address_key_1()
248 asm ("stap %0" : "=Q" (cpu_addr)); in test_store_cpu_address()
251 set_storage_key(pagebuf, 0x20, 0); in test_store_cpu_address()
252 WRITE_ONCE(*out, 0xbeef); in test_store_cpu_address()
253 asm ("stap %0" : "=Q" (*out)); in test_store_cpu_address()
258 set_storage_key(pagebuf, 0x10, 0); in test_store_cpu_address()
259 *out = 0xbeef; in test_store_cpu_address()
265 set_storage_key(pagebuf, 0x20, 0); in test_store_cpu_address()
267 *out = 0xbeef; in test_store_cpu_address()
270 report(*out == 0xbeef, "no store occurred"); in test_store_cpu_address()
273 ctl_set_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_store_cpu_address()
276 set_storage_key(pagebuf, 0x20, 0); in test_store_cpu_address()
278 *out = 0xbeef; in test_store_cpu_address()
281 report(*out == 0xbeef, "no store occurred"); in test_store_cpu_address()
285 set_storage_key(pagebuf, 0x90, 0); in test_store_cpu_address()
286 *out = 0xbeef; in test_store_cpu_address()
291 ctl_clear_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_store_cpu_address()
294 set_storage_key(pagebuf, 0x90, 0); in test_store_cpu_address()
296 *out = 0xbeef; in test_store_cpu_address()
299 report(*out == 0xbeef, "no store occurred"); in test_store_cpu_address()
302 set_storage_key(pagebuf, 0x00, 0); in test_store_cpu_address()
312 WRITE_ONCE(ipib[0], 0); /* Invalid length */ in test_diag_308()
313 set_storage_key(ipib, 0x28, 0); in test_diag_308()
317 "spka 0x10\n\t" in test_diag_308()
318 "diag %%r2,%[code],0x308\n\t" in test_diag_308()
319 "spka 0\n\t" in test_diag_308()
326 report(response == 0x402, "no exception on fetch, response: invalid IPIB"); in test_diag_308()
327 set_storage_key(ipib, 0x00, 0); in test_diag_308()
340 "spka 0x10\n\t" in chsc_key_1()
341 ".insn rre,0xb25f0000,%[comm_block],0\n\t" in chsc_key_1()
342 "spka 0\n\t" in chsc_key_1()
354 memset(comm_block, 0, PAGE_SIZE); in init_comm_block()
356 comm_block[0] = 0x10; in init_comm_block()
357 comm_block[1] = 0x10; in init_comm_block()
358 comm_block[9] = 0; in init_comm_block()
370 set_storage_key(comm_block, 0x10, 0); in test_channel_subsystem_call()
372 ".insn rre,0xb25f0000,%[comm_block],0\n\t" in test_channel_subsystem_call()
379 report(cc == 0 && comm_block[9], chsc_msg); in test_channel_subsystem_call()
384 set_storage_key(comm_block, 0x10, 0); in test_channel_subsystem_call()
386 report(cc == 0 && comm_block[9], chsc_msg); in test_channel_subsystem_call()
393 set_storage_key(comm_block, 0x20, 0); in test_channel_subsystem_call()
401 set_storage_key(comm_block, 0x28, 0); in test_channel_subsystem_call()
407 ctl_set_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_channel_subsystem_call()
410 set_storage_key(comm_block, 0x20, 0); in test_channel_subsystem_call()
419 set_storage_key(comm_block, 0x90, 0); in test_channel_subsystem_call()
421 report(cc == 0 && comm_block[9], chsc_msg); in test_channel_subsystem_call()
424 ctl_clear_bit(0, CTL0_STORAGE_PROTECTION_OVERRIDE); in test_channel_subsystem_call()
428 set_storage_key(comm_block, 0x90, 0); in test_channel_subsystem_call()
436 set_storage_key(comm_block, 0x00, 0); in test_channel_subsystem_call()
447 "spka 0x10\n\t" in set_prefix_key_1()
448 "spx %0\n\t" in set_prefix_key_1()
449 "spka 0\n" in set_prefix_key_1()
473 memcpy(lowcore_tmp, 0, sizeof(lowcore_tmp)); in test_set_prefix()
474 assert(((uint64_t)&lowcore_tmp >> 31) == 0); in test_set_prefix()
479 set_storage_key(prefix_ptr, 0x20, 0); in test_set_prefix()
486 set_storage_key(pagebuf, 0x10, 0); in test_set_prefix()
495 set_storage_key(pagebuf, 0x20, 0); in test_set_prefix()
502 set_storage_key(pagebuf, 0x28, 0); in test_set_prefix()
510 * Page 0 will be remapped, making the lowcore inaccessible, which in test_set_prefix()
519 set_storage_key(pagebuf, 0x28, 0); in test_set_prefix()
521 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_set_prefix()
522 set_prefix_key_1((uint32_t *)0); in test_set_prefix()
523 install_page(root, 0, 0); in test_set_prefix()
528 ctl_set_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_set_prefix()
532 set_storage_key(pagebuf, 0x28, 0); in test_set_prefix()
533 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_set_prefix()
534 set_prefix_key_1((uint32_t *)0); in test_set_prefix()
535 install_page(root, 0, 0); in test_set_prefix()
543 set_storage_key(pagebuf, 0x28, 0); in test_set_prefix()
545 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_set_prefix()
547 install_page(root, 0, 0); in test_set_prefix()
552 ctl_clear_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_set_prefix()
555 set_storage_key(pagebuf, 0x00, 0); in test_set_prefix()
569 "spka 0x10\n\t" in modify_subchannel_key_1()
571 "spka 0\n\t" in modify_subchannel_key_1()
606 set_storage_key(schib, 0x28, 0); in test_msch()
609 WRITE_ONCE(schib->pmcw.intparm, 0); in test_msch()
613 report_fail("MSCH cc != 0"); in test_msch()
619 set_storage_key(schib, 0x18, 0); in test_msch()
622 WRITE_ONCE(schib->pmcw.intparm, 0); in test_msch()
626 report_fail("MSCH cc != 0"); in test_msch()
634 set_storage_key(schib, 0x20, 0); in test_msch()
637 WRITE_ONCE(schib->pmcw.intparm, 0); in test_msch()
641 report_fail("MSCH cc != 0"); in test_msch()
645 schib->pmcw.intparm = 0; in test_msch()
649 set_storage_key(schib, 0x28, 0); in test_msch()
654 report(!cc && schib->pmcw.intparm == 0, "did not modify subchannel"); in test_msch()
661 * Page 0 will be remapped, making the lowcore inaccessible, which in test_msch()
668 schib->pmcw.intparm = 0; in test_msch()
672 set_storage_key(pagebuf, 0x28, 0); in test_msch()
674 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_msch()
675 modify_subchannel_key_1(test_device_sid, (struct schib *)0); in test_msch()
676 install_page(root, 0, 0); in test_msch()
679 report(!cc && schib->pmcw.intparm == 0, "did not modify subchannel"); in test_msch()
685 ctl_set_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_msch()
689 set_storage_key(pagebuf, 0x28, 0); in test_msch()
690 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_msch()
691 cc = modify_subchannel_key_1(test_device_sid, (struct schib *)0); in test_msch()
692 install_page(root, 0, 0); in test_msch()
694 WRITE_ONCE(schib->pmcw.intparm, 0); in test_msch()
698 report_fail("MSCH cc != 0"); in test_msch()
702 schib->pmcw.intparm = 0; in test_msch()
708 set_storage_key(pagebuf, 0x28, 0); in test_msch()
710 install_page(root, virt_to_pte_phys(root, pagebuf), 0); in test_msch()
712 install_page(root, 0, 0); in test_msch()
715 report(!cc && schib->pmcw.intparm == 0, "did not modify subchannel"); in test_msch()
721 ctl_clear_bit(0, CTL0_FETCH_PROTECTION_OVERRIDE); in test_msch()
724 set_storage_key(schib, 0x00, 0); in test_msch()