Merge tag 'for-linus-6.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / x86 / xen / enlighten_hvm.c
index 8b71b1dd76396f92dc1542c84dde948591599c52..28762f80059611c1a2d3d598ff7bc742a814b414 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/cpu.h>
 #include <linux/kexec.h>
 #include <linux/memblock.h>
+#include <linux/virtio_anchor.h>
 
 #include <xen/features.h>
 #include <xen/events.h>
@@ -195,7 +196,8 @@ static void __init xen_hvm_guest_init(void)
        if (xen_pv_domain())
                return;
 
-       xen_set_restricted_virtio_memory_access();
+       if (IS_ENABLED(CONFIG_XEN_VIRTIO_FORCE_GRANT))
+               virtio_set_mem_acc_cb(virtio_require_restricted_mem_acc);
 
        init_hvm_pv_info();