]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
s390/mm: remember the int code for the last gmap fault
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 8 Mar 2016 11:31:52 +0000 (12:31 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 20 Jun 2016 07:55:08 +0000 (09:55 +0200)
For nested virtualization, we want to know if we are handling a protection
exception, because these can directly be forwarded to the guest without
additional checks.

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/processor.h
arch/s390/mm/fault.c

index 94c80b6d031d13b3befb51bbf346f522355a2b38..8c2922f540f9e1687fc7f256af9f6001b4315871 100644 (file)
@@ -110,6 +110,7 @@ struct thread_struct {
        mm_segment_t mm_segment;
        unsigned long gmap_addr;        /* address of last gmap fault. */
        unsigned int gmap_write_flag;   /* gmap fault write indication */
+       unsigned int gmap_int_code;     /* int code of last gmap fault */
        unsigned int gmap_pfault;       /* signal of a pending guest pfault */
        struct per_regs per_user;       /* User specified PER registers */
        struct per_event per_event;     /* Cause of the last PER trap */
index b84416c11c434d753b3169ccdc5ad4514d92873c..730e0d3aa840dde54ca6215454ef3818345a1fce 100644 (file)
@@ -419,6 +419,7 @@ static inline int do_exception(struct pt_regs *regs, int access)
        if (gmap) {
                current->thread.gmap_addr = address;
                current->thread.gmap_write_flag = !!(flags & FAULT_FLAG_WRITE);
+               current->thread.gmap_int_code = regs->int_code & 0xffff;
                address = __gmap_translate(gmap, address);
                if (address == -EFAULT) {
                        fault = VM_FAULT_BADMAP;