Lines Matching +full:main +full:- +full:storage
1 // SPDX-License-Identifier: GPL-2.0-or-later
14 #define CR0_FETCH_PROTECTION_OVERRIDE (1UL << (63 - 38))
15 #define CR0_STORAGE_PROTECTION_OVERRIDE (1UL << (63 - 39))
37 return -not_mapped; in set_storage_key()
91 * See Enhanced Suppression-on-Protection Facilities in the
92 * Interpretive-Execution Mode
95 * guest: set storage key of page_store_prot to 1
96 * storage key of page_fetch_prot to 9 and enable
101 /* access key 0 matches any storage key -> RW */
103 /* access key matches storage key -> RW */
105 /* mismatched keys, but no fetch protection -> RO */
107 /* access key 0 matches any storage key -> RW */
109 /* access key matches storage key -> RW */
111 /* mismatched keys, fetch protection -> inaccessible */
113 /* page 0 not mapped yet -> translation not available */
117 * guest: set storage key of page 0 to 9 and enable fetch protection
122 /* mismatched keys, fetch protection, but override applies -> RO */
124 /* mismatched keys, fetch protection, override applies to 0-2048 only -> inaccessible */
127 * host: enable storage protection override
129 /* mismatched keys, but override applies (storage key 9) -> RW */
131 /* mismatched keys, no fetch protection, override doesn't apply -> RO */
133 /* mismatched keys, but override applies (storage key 9) -> RW */
176 /* Fetch-protection override */ in guest_code()
181 /* Storage-protection override */ in guest_code()
205 int main(int argc, char *argv[]) in main() function
216 run = vcpu->run; in main()
226 ksft_test_result_skip("STAGE_INIT_FETCH_PROT_OVERRIDE - " in main()
233 run->s.regs.crs[0] |= CR0_FETCH_PROTECTION_OVERRIDE; in main()
234 run->kvm_dirty_regs = KVM_SYNC_CRS; in main()
237 run->s.regs.crs[0] |= CR0_STORAGE_PROTECTION_OVERRIDE; in main()
238 run->kvm_dirty_regs = KVM_SYNC_CRS; in main()