movq %cr4, %r13
movq %r13, saved_cr4(%rip)
- /* Save SME active flag */
- movq %r8, %r12
-
/* save indirection list for jumping back */
movq %rdi, pa_backup_pages_map(%rip)
/* Save the preserve_context to %r11 as swap_pages clobbers %rcx. */
movq %rcx, %r11
- /* Physical address of control page */
- movq %rsi, %r8
-
/* setup a new stack at the end of the physical control page */
- lea PAGE_SIZE(%r8), %rsp
+ lea PAGE_SIZE(%rsi), %rsp
/* jump to identity mapped page */
- addq $(identity_mapped - relocate_kernel), %r8
- pushq %r8
+ addq $(identity_mapped - relocate_kernel), %rsi
+ pushq %rsi
ANNOTATE_UNRET_SAFE
ret
int3
/*
* %rdi indirection page
* %rdx start address
+ * %r8 host_mem_enc_active
+ * %r9 page table page
* %r11 preserve_context
- * %r12 host_mem_enc_active
* %r13 original CR4 when relocate_kernel() was invoked
*/
* entries that will conflict with the now unencrypted memory
* used by kexec. Flush the caches before copying the kernel.
*/
- testq %r12, %r12
+ testq %r8, %r8
jz .Lsme_off
wbinvd
.Lsme_off: