21
21
struct patch_xxl {
22
22
const unsigned char irq_irq_disable [1 ];
23
23
const unsigned char irq_irq_enable [1 ];
24
- const unsigned char irq_restore_fl [2 ];
25
24
const unsigned char irq_save_fl [2 ];
26
25
const unsigned char mmu_read_cr2 [3 ];
27
26
const unsigned char mmu_read_cr3 [3 ];
28
27
const unsigned char mmu_write_cr3 [3 ];
28
+ const unsigned char irq_restore_fl [2 ];
29
29
# ifdef CONFIG_X86_64
30
30
const unsigned char cpu_wbinvd [2 ];
31
31
const unsigned char cpu_usergs_sysret64 [6 ];
@@ -43,16 +43,16 @@ static const struct patch_xxl patch_data_xxl = {
43
43
.mmu_read_cr2 = { 0x0f , 0x20 , 0xd0 }, // mov %cr2, %[re]ax
44
44
.mmu_read_cr3 = { 0x0f , 0x20 , 0xd8 }, // mov %cr3, %[re]ax
45
45
# ifdef CONFIG_X86_64
46
- .irq_restore_fl = { 0x57 , 0x9d }, // push %rdi; popfq
47
46
.mmu_write_cr3 = { 0x0f , 0x22 , 0xdf }, // mov %rdi, %cr3
47
+ .irq_restore_fl = { 0x57 , 0x9d }, // push %rdi; popfq
48
48
.cpu_wbinvd = { 0x0f , 0x09 }, // wbinvd
49
49
.cpu_usergs_sysret64 = { 0x0f , 0x01 , 0xf8 ,
50
50
0x48 , 0x0f , 0x07 }, // swapgs; sysretq
51
51
.cpu_swapgs = { 0x0f , 0x01 , 0xf8 }, // swapgs
52
52
.mov64 = { 0x48 , 0x89 , 0xf8 }, // mov %rdi, %rax
53
53
# else
54
- .irq_restore_fl = { 0x50 , 0x9d }, // push %eax; popf
55
54
.mmu_write_cr3 = { 0x0f , 0x22 , 0xd8 }, // mov %eax, %cr3
55
+ .irq_restore_fl = { 0x50 , 0x9d }, // push %eax; popf
56
56
.cpu_iret = { 0xcf }, // iret
57
57
# endif
58
58
};
0 commit comments