Merge tag 'x86_seves_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / x86 / mm / mem_encrypt.c
index 4b01f7d..f633f9e 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/bitops.h>
 #include <linux/dma-mapping.h>
+#include <linux/virtio_config.h>
 
 #include <asm/tlbflush.h>
 #include <asm/fixmap.h>
@@ -262,7 +263,7 @@ static void __init __set_clr_pte_enc(pte_t *kpte, int level, bool enc)
        if (pgprot_val(old_prot) == pgprot_val(new_prot))
                return;
 
-       pa = pfn << page_level_shift(level);
+       pa = pfn << PAGE_SHIFT;
        size = page_level_size(level);
 
        /*
@@ -484,3 +485,8 @@ void __init mem_encrypt_init(void)
        print_mem_encrypt_feature_info();
 }
 
+int arch_has_restricted_virtio_memory_access(void)
+{
+       return sev_active();
+}
+EXPORT_SYMBOL_GPL(arch_has_restricted_virtio_memory_access);