~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/kvm/lib/x86_64/handlers.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 handle_exception:
  2         push %r15
  3         push %r14
  4         push %r13
  5         push %r12
  6         push %r11
  7         push %r10
  8         push %r9
  9         push %r8
 10 
 11         push %rdi
 12         push %rsi
 13         push %rbp
 14         push %rbx
 15         push %rdx
 16         push %rcx
 17         push %rax
 18         mov %rsp, %rdi
 19 
 20         call route_exception
 21 
 22         pop %rax
 23         pop %rcx
 24         pop %rdx
 25         pop %rbx
 26         pop %rbp
 27         pop %rsi
 28         pop %rdi
 29         pop %r8
 30         pop %r9
 31         pop %r10
 32         pop %r11
 33         pop %r12
 34         pop %r13
 35         pop %r14
 36         pop %r15
 37 
 38         /* Discard vector and error code. */
 39         add $16, %rsp
 40         iretq
 41 
 42 /*
 43  * Build the handle_exception wrappers which push the vector/error code on the
 44  * stack and an array of pointers to those wrappers.
 45  */
 46 .pushsection .rodata
 47 .globl idt_handlers
 48 idt_handlers:
 49 .popsection
 50 
 51 .macro HANDLERS has_error from to
 52         vector = \from
 53         .rept \to - \from + 1
 54         .align 8
 55 
 56         /* Fetch current address and append it to idt_handlers. */
 57 666 :
 58 .pushsection .rodata
 59         .quad 666b
 60 .popsection
 61 
 62         .if ! \has_error
 63         pushq $0
 64         .endif
 65         pushq $vector
 66         jmp handle_exception
 67         vector = vector + 1
 68         .endr
 69 .endm
 70 
 71 .global idt_handler_code
 72 idt_handler_code:
 73         HANDLERS has_error=0 from=0  to=7
 74         HANDLERS has_error=1 from=8  to=8
 75         HANDLERS has_error=0 from=9  to=9
 76         HANDLERS has_error=1 from=10 to=14
 77         HANDLERS has_error=0 from=15 to=16
 78         HANDLERS has_error=1 from=17 to=17
 79         HANDLERS has_error=0 from=18 to=255
 80 
 81 .section        .note.GNU-stack, "", %progbits

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php