diff options
Diffstat (limited to 'Documentation/x86/entry_64.txt')
-rw-r--r-- | Documentation/x86/entry_64.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Documentation/x86/entry_64.txt b/Documentation/x86/entry_64.txt index 4a1c5c2dc5a9..9132b86176a3 100644 --- a/Documentation/x86/entry_64.txt +++ b/Documentation/x86/entry_64.txt | |||
@@ -78,9 +78,6 @@ The expensive (paranoid) way is to read back the MSR_GS_BASE value | |||
78 | xorl %ebx,%ebx | 78 | xorl %ebx,%ebx |
79 | 1: ret | 79 | 1: ret |
80 | 80 | ||
81 | and the whole paranoid non-paranoid macro complexity is about whether | ||
82 | to suffer that RDMSR cost. | ||
83 | |||
84 | If we are at an interrupt or user-trap/gate-alike boundary then we can | 81 | If we are at an interrupt or user-trap/gate-alike boundary then we can |
85 | use the faster check: the stack will be a reliable indicator of | 82 | use the faster check: the stack will be a reliable indicator of |
86 | whether SWAPGS was already done: if we see that we are a secondary | 83 | whether SWAPGS was already done: if we see that we are a secondary |
@@ -93,6 +90,15 @@ which might have triggered right after a normal entry wrote CS to the | |||
93 | stack but before we executed SWAPGS, then the only safe way to check | 90 | stack but before we executed SWAPGS, then the only safe way to check |
94 | for GS is the slower method: the RDMSR. | 91 | for GS is the slower method: the RDMSR. |
95 | 92 | ||
96 | So we try only to mark those entry methods 'paranoid' that absolutely | 93 | Therefore, super-atomic entries (except NMI, which is handled separately) |
97 | need the more expensive check for the GS base - and we generate all | 94 | must use idtentry with paranoid=1 to handle gsbase correctly. This |
98 | 'normal' entry points with the regular (faster) entry macros. | 95 | triggers three main behavior changes: |
96 | |||
97 | - Interrupt entry will use the slower gsbase check. | ||
98 | - Interrupt entry from user mode will switch off the IST stack. | ||
99 | - Interrupt exit to kernel mode will not attempt to reschedule. | ||
100 | |||
101 | We try to only use IST entries and the paranoid entry code for vectors | ||
102 | that absolutely need the more expensive check for the GS base - and we | ||
103 | generate all 'normal' entry points with the regular (faster) paranoid=0 | ||
104 | variant. | ||