1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright IBM Corp. 1999
5 * Author(s): Hartmut Penner (hp@de.ibm.com)
6 * Ulrich Weigand (uweigand@de.ibm.com)
8 * Derived from "arch/i386/mm/fault.c"
9 * Copyright (C) 1995 Linus Torvalds
12 #include <linux/kernel_stat.h>
13 #include <linux/perf_event.h>
14 #include <linux/signal.h>
15 #include <linux/sched.h>
16 #include <linux/sched/debug.h>
17 #include <linux/kernel.h>
18 #include <linux/errno.h>
19 #include <linux/string.h>
20 #include <linux/types.h>
21 #include <linux/ptrace.h>
22 #include <linux/mman.h>
24 #include <linux/compat.h>
25 #include <linux/smp.h>
26 #include <linux/kdebug.h>
27 #include <linux/init.h>
28 #include <linux/console.h>
29 #include <linux/extable.h>
30 #include <linux/hardirq.h>
31 #include <linux/kprobes.h>
32 #include <linux/uaccess.h>
33 #include <linux/hugetlb.h>
34 #include <linux/kfence.h>
35 #include <asm/asm-extable.h>
36 #include <asm/asm-offsets.h>
40 #include <asm/mmu_context.h>
41 #include <asm/facility.h>
43 #include "../kernel/entry.h"
45 #define __FAIL_ADDR_MASK -4096L
46 #define __SUBCODE_MASK 0x0600
47 #define __PF_RES_FIELD 0x8000000000000000ULL
50 * Allocate private vm_fault_reason from top. Please make sure it won't
51 * collide with vm_fault_reason.
53 #define VM_FAULT_BADCONTEXT ((__force vm_fault_t)0x80000000)
54 #define VM_FAULT_BADMAP ((__force vm_fault_t)0x40000000)
55 #define VM_FAULT_BADACCESS ((__force vm_fault_t)0x20000000)
56 #define VM_FAULT_SIGNAL ((__force vm_fault_t)0x10000000)
57 #define VM_FAULT_PFAULT ((__force vm_fault_t)0x8000000)
65 static unsigned long store_indication __read_mostly;
67 static int __init fault_init(void)
69 if (test_facility(75))
70 store_indication = 0xc00;
73 early_initcall(fault_init);
76 * Find out which address space caused the exception.
78 static enum fault_type get_fault_type(struct pt_regs *regs)
80 unsigned long trans_exc_code;
82 trans_exc_code = regs->int_parm_long & 3;
83 if (likely(trans_exc_code == 0)) {
84 /* primary space exception */
87 if (!IS_ENABLED(CONFIG_PGSTE))
89 if (test_pt_regs_flag(regs, PIF_GUEST_FAULT))
93 if (trans_exc_code == 2)
95 if (trans_exc_code == 1) {
96 /* access register mode, not used in the kernel */
99 /* home space exception -> access via kernel ASCE */
103 static unsigned long get_fault_address(struct pt_regs *regs)
105 unsigned long trans_exc_code = regs->int_parm_long;
107 return trans_exc_code & __FAIL_ADDR_MASK;
110 static bool fault_is_write(struct pt_regs *regs)
112 unsigned long trans_exc_code = regs->int_parm_long;
114 return (trans_exc_code & store_indication) == 0x400;
117 static int bad_address(void *p)
121 return get_kernel_nofault(dummy, (unsigned long *)p);
124 static void dump_pagetable(unsigned long asce, unsigned long address)
126 unsigned long *table = __va(asce & _ASCE_ORIGIN);
128 pr_alert("AS:%016lx ", asce);
129 switch (asce & _ASCE_TYPE_MASK) {
130 case _ASCE_TYPE_REGION1:
131 table += (address & _REGION1_INDEX) >> _REGION1_SHIFT;
132 if (bad_address(table))
134 pr_cont("R1:%016lx ", *table);
135 if (*table & _REGION_ENTRY_INVALID)
137 table = __va(*table & _REGION_ENTRY_ORIGIN);
139 case _ASCE_TYPE_REGION2:
140 table += (address & _REGION2_INDEX) >> _REGION2_SHIFT;
141 if (bad_address(table))
143 pr_cont("R2:%016lx ", *table);
144 if (*table & _REGION_ENTRY_INVALID)
146 table = __va(*table & _REGION_ENTRY_ORIGIN);
148 case _ASCE_TYPE_REGION3:
149 table += (address & _REGION3_INDEX) >> _REGION3_SHIFT;
150 if (bad_address(table))
152 pr_cont("R3:%016lx ", *table);
153 if (*table & (_REGION_ENTRY_INVALID | _REGION3_ENTRY_LARGE))
155 table = __va(*table & _REGION_ENTRY_ORIGIN);
157 case _ASCE_TYPE_SEGMENT:
158 table += (address & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
159 if (bad_address(table))
161 pr_cont("S:%016lx ", *table);
162 if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE))
164 table = __va(*table & _SEGMENT_ENTRY_ORIGIN);
166 table += (address & _PAGE_INDEX) >> _PAGE_SHIFT;
167 if (bad_address(table))
169 pr_cont("P:%016lx ", *table);
177 static void dump_fault_info(struct pt_regs *regs)
181 pr_alert("Failing address: %016lx TEID: %016lx\n",
182 regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
183 pr_alert("Fault in ");
184 switch (regs->int_parm_long & 3) {
186 pr_cont("home space ");
189 pr_cont("secondary space ");
192 pr_cont("access register ");
195 pr_cont("primary space ");
198 pr_cont("mode while using ");
199 switch (get_fault_type(regs)) {
201 asce = S390_lowcore.user_asce;
205 asce = ((struct gmap *) S390_lowcore.gmap)->asce;
209 asce = S390_lowcore.kernel_asce;
216 dump_pagetable(asce, regs->int_parm_long & __FAIL_ADDR_MASK);
219 int show_unhandled_signals = 1;
221 void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault)
223 if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
225 if (!unhandled_signal(current, signr))
227 if (!printk_ratelimit())
229 printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d ",
230 regs->int_code & 0xffff, regs->int_code >> 17);
231 print_vma_addr(KERN_CONT "in ", regs->psw.addr);
232 printk(KERN_CONT "\n");
234 dump_fault_info(regs);
239 * Send SIGSEGV to task. This is an external routine
240 * to keep the stack usage of do_page_fault small.
242 static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
244 report_user_fault(regs, SIGSEGV, 1);
245 force_sig_fault(SIGSEGV, si_code,
246 (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK));
249 static noinline void do_no_context(struct pt_regs *regs, vm_fault_t fault)
251 enum fault_type fault_type;
252 unsigned long address;
255 if (fixup_exception(regs))
257 fault_type = get_fault_type(regs);
258 if ((fault_type == KERNEL_FAULT) && (fault == VM_FAULT_BADCONTEXT)) {
259 address = get_fault_address(regs);
260 is_write = fault_is_write(regs);
261 if (kfence_handle_page_fault(address, is_write, regs))
265 * Oops. The kernel tried to access some bad page. We'll have to
266 * terminate things with extreme prejudice.
268 if (fault_type == KERNEL_FAULT)
269 printk(KERN_ALERT "Unable to handle kernel pointer dereference"
270 " in virtual kernel address space\n");
272 printk(KERN_ALERT "Unable to handle kernel paging request"
273 " in virtual user address space\n");
274 dump_fault_info(regs);
278 static noinline void do_low_address(struct pt_regs *regs)
280 /* Low-address protection hit in kernel mode means
281 NULL pointer write access in kernel mode. */
282 if (regs->psw.mask & PSW_MASK_PSTATE) {
283 /* Low-address protection hit in user mode 'cannot happen'. */
284 die (regs, "Low-address protection");
287 do_no_context(regs, VM_FAULT_BADACCESS);
290 static noinline void do_sigbus(struct pt_regs *regs)
293 * Send a sigbus, regardless of whether we were in kernel
296 force_sig_fault(SIGBUS, BUS_ADRERR,
297 (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK));
300 static noinline void do_fault_error(struct pt_regs *regs, vm_fault_t fault)
305 case VM_FAULT_BADACCESS:
306 case VM_FAULT_BADMAP:
307 /* Bad memory access. Check if it is kernel or user space. */
308 if (user_mode(regs)) {
309 /* User mode accesses just cause a SIGSEGV */
310 si_code = (fault == VM_FAULT_BADMAP) ?
311 SEGV_MAPERR : SEGV_ACCERR;
312 do_sigsegv(regs, si_code);
316 case VM_FAULT_BADCONTEXT:
317 case VM_FAULT_PFAULT:
318 do_no_context(regs, fault);
320 case VM_FAULT_SIGNAL:
321 if (!user_mode(regs))
322 do_no_context(regs, fault);
324 default: /* fault & VM_FAULT_ERROR */
325 if (fault & VM_FAULT_OOM) {
326 if (!user_mode(regs))
327 do_no_context(regs, fault);
329 pagefault_out_of_memory();
330 } else if (fault & VM_FAULT_SIGSEGV) {
331 /* Kernel mode? Handle exceptions or die */
332 if (!user_mode(regs))
333 do_no_context(regs, fault);
335 do_sigsegv(regs, SEGV_MAPERR);
336 } else if (fault & VM_FAULT_SIGBUS) {
337 /* Kernel mode? Handle exceptions or die */
338 if (!user_mode(regs))
339 do_no_context(regs, fault);
349 * This routine handles page faults. It determines the address,
350 * and the problem, and then passes it off to one of the appropriate
353 * interruption code (int_code):
354 * 04 Protection -> Write-Protection (suppression)
355 * 10 Segment translation -> Not present (nullification)
356 * 11 Page translation -> Not present (nullification)
357 * 3b Region third trans. -> Not present (nullification)
359 static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
362 struct task_struct *tsk;
363 struct mm_struct *mm;
364 struct vm_area_struct *vma;
365 enum fault_type type;
366 unsigned long address;
373 * The instruction that caused the program check has
374 * been nullified. Don't signal single step via SIGTRAP.
376 clear_thread_flag(TIF_PER_TRAP);
378 if (kprobe_page_fault(regs, 14))
382 address = get_fault_address(regs);
383 is_write = fault_is_write(regs);
386 * Verify that the fault happened in user space, that
387 * we are not in an interrupt and that there is a
390 fault = VM_FAULT_BADCONTEXT;
391 type = get_fault_type(regs);
397 if (faulthandler_disabled() || !mm)
402 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
403 flags = FAULT_FLAG_DEFAULT;
405 flags |= FAULT_FLAG_USER;
408 if (access == VM_WRITE)
409 flags |= FAULT_FLAG_WRITE;
410 #ifdef CONFIG_PER_VMA_LOCK
411 if (!(flags & FAULT_FLAG_USER))
413 vma = lock_vma_under_rcu(mm, address);
416 if (!(vma->vm_flags & access)) {
420 fault = handle_mm_fault(vma, address, flags | FAULT_FLAG_VMA_LOCK, regs);
422 if (!(fault & VM_FAULT_RETRY)) {
423 count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
424 if (likely(!(fault & VM_FAULT_ERROR)))
428 count_vm_vma_lock_event(VMA_LOCK_RETRY);
429 /* Quick path to respond to signals */
430 if (fault_signal_pending(fault, regs)) {
431 fault = VM_FAULT_SIGNAL;
435 #endif /* CONFIG_PER_VMA_LOCK */
439 if (IS_ENABLED(CONFIG_PGSTE) && type == GMAP_FAULT) {
440 gmap = (struct gmap *) S390_lowcore.gmap;
441 current->thread.gmap_addr = address;
442 current->thread.gmap_write_flag = !!(flags & FAULT_FLAG_WRITE);
443 current->thread.gmap_int_code = regs->int_code & 0xffff;
444 address = __gmap_translate(gmap, address);
445 if (address == -EFAULT) {
446 fault = VM_FAULT_BADMAP;
449 if (gmap->pfault_enabled)
450 flags |= FAULT_FLAG_RETRY_NOWAIT;
454 fault = VM_FAULT_BADMAP;
455 vma = find_vma(mm, address);
459 if (unlikely(vma->vm_start > address)) {
460 if (!(vma->vm_flags & VM_GROWSDOWN))
462 vma = expand_stack(mm, address);
468 * Ok, we have a good vm_area for this memory access, so
471 fault = VM_FAULT_BADACCESS;
472 if (unlikely(!(vma->vm_flags & access)))
476 * If for any reason at all we couldn't handle the fault,
477 * make sure we exit gracefully rather than endlessly redo
480 fault = handle_mm_fault(vma, address, flags, regs);
481 if (fault_signal_pending(fault, regs)) {
482 fault = VM_FAULT_SIGNAL;
483 if (flags & FAULT_FLAG_RETRY_NOWAIT)
488 /* The fault is fully completed (including releasing mmap lock) */
489 if (fault & VM_FAULT_COMPLETED) {
498 if (unlikely(fault & VM_FAULT_ERROR))
501 if (fault & VM_FAULT_RETRY) {
502 if (IS_ENABLED(CONFIG_PGSTE) && gmap &&
503 (flags & FAULT_FLAG_RETRY_NOWAIT)) {
505 * FAULT_FLAG_RETRY_NOWAIT has been set, mmap_lock has
508 current->thread.gmap_pfault = 1;
509 fault = VM_FAULT_PFAULT;
512 flags &= ~FAULT_FLAG_RETRY_NOWAIT;
513 flags |= FAULT_FLAG_TRIED;
518 if (IS_ENABLED(CONFIG_PGSTE) && gmap) {
519 address = __gmap_link(gmap, current->thread.gmap_addr,
521 if (address == -EFAULT) {
522 fault = VM_FAULT_BADMAP;
525 if (address == -ENOMEM) {
526 fault = VM_FAULT_OOM;
532 mmap_read_unlock(mm);
537 void do_protection_exception(struct pt_regs *regs)
539 unsigned long trans_exc_code;
543 trans_exc_code = regs->int_parm_long;
545 * Protection exceptions are suppressing, decrement psw address.
546 * The exception to this rule are aborted transactions, for these
547 * the PSW already points to the correct location.
549 if (!(regs->int_code & 0x200))
550 regs->psw.addr = __rewind_psw(regs->psw, regs->int_code >> 16);
552 * Check for low-address protection. This needs to be treated
553 * as a special case because the translation exception code
554 * field is not guaranteed to contain valid data in this case.
556 if (unlikely(!(trans_exc_code & 4))) {
557 do_low_address(regs);
560 if (unlikely(MACHINE_HAS_NX && (trans_exc_code & 0x80))) {
561 regs->int_parm_long = (trans_exc_code & ~PAGE_MASK) |
562 (regs->psw.addr & PAGE_MASK);
564 fault = VM_FAULT_BADACCESS;
567 fault = do_exception(regs, access);
570 do_fault_error(regs, fault);
572 NOKPROBE_SYMBOL(do_protection_exception);
574 void do_dat_exception(struct pt_regs *regs)
579 access = VM_ACCESS_FLAGS;
580 fault = do_exception(regs, access);
582 do_fault_error(regs, fault);
584 NOKPROBE_SYMBOL(do_dat_exception);
588 * 'pfault' pseudo page faults routines.
590 static int pfault_disable;
592 static int __init nopfault(char *str)
598 __setup("nopfault", nopfault);
600 struct pfault_refbk {
609 } __attribute__ ((packed, aligned(8)));
611 static struct pfault_refbk pfault_init_refbk = {
616 .refgaddr = __LC_LPP,
617 .refselmk = 1ULL << 48,
618 .refcmpmk = 1ULL << 48,
619 .reserved = __PF_RES_FIELD
622 int pfault_init(void)
628 diag_stat_inc(DIAG_STAT_X258);
630 " diag %1,%0,0x258\n"
636 : "a" (&pfault_init_refbk), "m" (pfault_init_refbk) : "cc");
640 static struct pfault_refbk pfault_fini_refbk = {
647 void pfault_fini(void)
652 diag_stat_inc(DIAG_STAT_X258);
657 : : "a" (&pfault_fini_refbk), "m" (pfault_fini_refbk) : "cc");
660 static DEFINE_SPINLOCK(pfault_lock);
661 static LIST_HEAD(pfault_list);
663 #define PF_COMPLETE 0x0080
666 * The mechanism of our pfault code: if Linux is running as guest, runs a user
667 * space process and the user space process accesses a page that the host has
668 * paged out we get a pfault interrupt.
670 * This allows us, within the guest, to schedule a different process. Without
671 * this mechanism the host would have to suspend the whole virtual cpu until
672 * the page has been paged in.
674 * So when we get such an interrupt then we set the state of the current task
675 * to uninterruptible and also set the need_resched flag. Both happens within
676 * interrupt context(!). If we later on want to return to user space we
677 * recognize the need_resched flag and then call schedule(). It's not very
678 * obvious how this works...
680 * Of course we have a lot of additional fun with the completion interrupt (->
681 * host signals that a page of a process has been paged in and the process can
682 * continue to run). This interrupt can arrive on any cpu and, since we have
683 * virtual cpus, actually appear before the interrupt that signals that a page
686 static void pfault_interrupt(struct ext_code ext_code,
687 unsigned int param32, unsigned long param64)
689 struct task_struct *tsk;
694 * Get the external interruption subcode & pfault initial/completion
695 * signal bit. VM stores this in the 'cpu address' field associated
696 * with the external interrupt.
698 subcode = ext_code.subcode;
699 if ((subcode & 0xff00) != __SUBCODE_MASK)
701 inc_irq_stat(IRQEXT_PFL);
702 /* Get the token (= pid of the affected task). */
703 pid = param64 & LPP_PID_MASK;
705 tsk = find_task_by_pid_ns(pid, &init_pid_ns);
707 get_task_struct(tsk);
711 spin_lock(&pfault_lock);
712 if (subcode & PF_COMPLETE) {
713 /* signal bit is set -> a page has been swapped in by VM */
714 if (tsk->thread.pfault_wait == 1) {
715 /* Initial interrupt was faster than the completion
716 * interrupt. pfault_wait is valid. Set pfault_wait
717 * back to zero and wake up the process. This can
718 * safely be done because the task is still sleeping
719 * and can't produce new pfaults. */
720 tsk->thread.pfault_wait = 0;
721 list_del(&tsk->thread.list);
722 wake_up_process(tsk);
723 put_task_struct(tsk);
725 /* Completion interrupt was faster than initial
726 * interrupt. Set pfault_wait to -1 so the initial
727 * interrupt doesn't put the task to sleep.
728 * If the task is not running, ignore the completion
729 * interrupt since it must be a leftover of a PFAULT
730 * CANCEL operation which didn't remove all pending
731 * completion interrupts. */
732 if (task_is_running(tsk))
733 tsk->thread.pfault_wait = -1;
736 /* signal bit not set -> a real page is missing. */
737 if (WARN_ON_ONCE(tsk != current))
739 if (tsk->thread.pfault_wait == 1) {
740 /* Already on the list with a reference: put to sleep */
742 } else if (tsk->thread.pfault_wait == -1) {
743 /* Completion interrupt was faster than the initial
744 * interrupt (pfault_wait == -1). Set pfault_wait
745 * back to zero and exit. */
746 tsk->thread.pfault_wait = 0;
748 /* Initial interrupt arrived before completion
749 * interrupt. Let the task sleep.
750 * An extra task reference is needed since a different
751 * cpu may set the task state to TASK_RUNNING again
752 * before the scheduler is reached. */
753 get_task_struct(tsk);
754 tsk->thread.pfault_wait = 1;
755 list_add(&tsk->thread.list, &pfault_list);
757 /* Since this must be a userspace fault, there
758 * is no kernel task state to trample. Rely on the
759 * return to userspace schedule() to block. */
760 __set_current_state(TASK_UNINTERRUPTIBLE);
761 set_tsk_need_resched(tsk);
762 set_preempt_need_resched();
766 spin_unlock(&pfault_lock);
767 put_task_struct(tsk);
770 static int pfault_cpu_dead(unsigned int cpu)
772 struct thread_struct *thread, *next;
773 struct task_struct *tsk;
775 spin_lock_irq(&pfault_lock);
776 list_for_each_entry_safe(thread, next, &pfault_list, list) {
777 thread->pfault_wait = 0;
778 list_del(&thread->list);
779 tsk = container_of(thread, struct task_struct, thread);
780 wake_up_process(tsk);
781 put_task_struct(tsk);
783 spin_unlock_irq(&pfault_lock);
787 static int __init pfault_irq_init(void)
791 rc = register_external_irq(EXT_IRQ_CP_SERVICE, pfault_interrupt);
794 rc = pfault_init() == 0 ? 0 : -EOPNOTSUPP;
797 irq_subclass_register(IRQ_SUBCLASS_SERVICE_SIGNAL);
798 cpuhp_setup_state_nocalls(CPUHP_S390_PFAULT_DEAD, "s390/pfault:dead",
799 NULL, pfault_cpu_dead);
803 unregister_external_irq(EXT_IRQ_CP_SERVICE, pfault_interrupt);
808 early_initcall(pfault_irq_init);
810 #endif /* CONFIG_PFAULT */
812 #if IS_ENABLED(CONFIG_PGSTE)
814 void do_secure_storage_access(struct pt_regs *regs)
816 unsigned long addr = regs->int_parm_long & __FAIL_ADDR_MASK;
817 struct vm_area_struct *vma;
818 struct mm_struct *mm;
824 * bit 61 tells us if the address is valid, if it's not we
825 * have a major problem and should stop the kernel or send a
826 * SIGSEGV to the process. Unfortunately bit 61 is not
827 * reliable without the misc UV feature so we need to check
830 if (test_bit_inv(BIT_UV_FEAT_MISC, &uv_info.uv_feature_indications) &&
831 !test_bit_inv(61, ®s->int_parm_long)) {
833 * When this happens, userspace did something that it
834 * was not supposed to do, e.g. branching into secure
835 * memory. Trigger a segmentation fault.
837 if (user_mode(regs)) {
838 send_sig(SIGSEGV, current, 0);
843 * The kernel should never run into this case and we
844 * have no way out of this situation.
846 panic("Unexpected PGM 0x3d with TEID bit 61=0");
849 switch (get_fault_type(regs)) {
852 gmap = (struct gmap *)S390_lowcore.gmap;
854 addr = __gmap_translate(gmap, addr);
855 mmap_read_unlock(mm);
856 if (IS_ERR_VALUE(addr)) {
857 do_fault_error(regs, VM_FAULT_BADMAP);
864 vma = find_vma(mm, addr);
866 mmap_read_unlock(mm);
867 do_fault_error(regs, VM_FAULT_BADMAP);
870 page = follow_page(vma, addr, FOLL_WRITE | FOLL_GET);
871 if (IS_ERR_OR_NULL(page)) {
872 mmap_read_unlock(mm);
875 if (arch_make_page_accessible(page))
876 send_sig(SIGSEGV, current, 0);
878 mmap_read_unlock(mm);
881 page = phys_to_page(addr);
882 if (unlikely(!try_get_page(page)))
884 rc = arch_make_page_accessible(page);
890 do_fault_error(regs, VM_FAULT_BADMAP);
894 NOKPROBE_SYMBOL(do_secure_storage_access);
896 void do_non_secure_storage_access(struct pt_regs *regs)
898 unsigned long gaddr = regs->int_parm_long & __FAIL_ADDR_MASK;
899 struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
901 if (get_fault_type(regs) != GMAP_FAULT) {
902 do_fault_error(regs, VM_FAULT_BADMAP);
907 if (gmap_convert_to_secure(gmap, gaddr) == -EINVAL)
908 send_sig(SIGSEGV, current, 0);
910 NOKPROBE_SYMBOL(do_non_secure_storage_access);
912 void do_secure_storage_violation(struct pt_regs *regs)
914 unsigned long gaddr = regs->int_parm_long & __FAIL_ADDR_MASK;
915 struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
918 * If the VM has been rebooted, its address space might still contain
919 * secure pages from the previous boot.
920 * Clear the page so it can be reused.
922 if (!gmap_destroy_page(gmap, gaddr))
925 * Either KVM messed up the secure guest mapping or the same
926 * page is mapped into multiple secure guests.
928 * This exception is only triggered when a guest 2 is running
929 * and can therefore never occur in kernel context.
931 printk_ratelimited(KERN_WARNING
932 "Secure storage violation in task: %s, pid %d\n",
933 current->comm, current->pid);
934 send_sig(SIGSEGV, current, 0);
937 #endif /* CONFIG_PGSTE */