diff options
author | Wei Liu <wei.liu@kernel.org> | 2023-04-17 19:18:13 +0000 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2023-04-17 19:18:13 +0000 |
commit | 21eb596fce6c9f034f4e1bd91210336815bf8048 (patch) | |
tree | 7df638a58df39b2d8cab22908d7f0bf52a1f249e /init | |
parent | f83705a51275ed29117d46e1d68e8b16dcb40507 (diff) | |
parent | 87efe384109f7938c94e74b1ce9c613136f50fd9 (diff) |
Merge remote-tracking branch 'tip/x86/sev' into hyperv-next
Merge the following 6 patches from tip/x86/sev, which are taken from
Michael Kelley's series [0]. The rest of Michael's series depend on
them.
x86/hyperv: Change vTOM handling to use standard coco mechanisms
init: Call mem_encrypt_init() after Hyper-V hypercall init is done
x86/mm: Handle decryption/re-encryption of bss_decrypted consistently
Drivers: hv: Explicitly request decrypted in vmap_pfn() calls
x86/hyperv: Reorder code to facilitate future work
x86/ioremap: Add hypervisor callback for private MMIO mapping in coco VM
0: https://lore.kernel.org/linux-hyperv/1679838727-87310-1-git-send-email-mikelley@microsoft.com/
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/init/main.c b/init/main.c index bb87b789c543..af5f12fd47fd 100644 --- a/init/main.c +++ b/init/main.c @@ -1092,14 +1092,6 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) */ locking_selftest(); - /* - * This needs to be called before any devices perform DMA - * operations that might use the SWIOTLB bounce buffers. It will - * mark the bounce buffers as decrypted so that their usage will - * not cause "plain-text" data to be decrypted when accessed. - */ - mem_encrypt_init(); - #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { @@ -1116,6 +1108,17 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) late_time_init(); sched_clock_init(); calibrate_delay(); + + /* + * This needs to be called before any devices perform DMA + * operations that might use the SWIOTLB bounce buffers. It will + * mark the bounce buffers as decrypted so that their usage will + * not cause "plain-text" data to be decrypted when accessed. It + * must be called after late_time_init() so that Hyper-V x86/x64 + * hypercalls work when the SWIOTLB bounce buffers are decrypted. + */ + mem_encrypt_init(); + pid_idr_init(); anon_vma_init(); #ifdef CONFIG_X86 |