diff options
Diffstat (limited to 'arch/x86/hyperv/hv_init.c')
| -rw-r--r-- | arch/x86/hyperv/hv_init.c | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index 96eb7db31c8e..8b392b6b7b93 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -28,6 +28,7 @@  #include <linux/syscore_ops.h>  #include <clocksource/hyperv_timer.h>  #include <linux/highmem.h> +#include <linux/swiotlb.h>  int hyperv_init_cpuhp;  u64 hv_current_partition_id = ~0ull; @@ -36,7 +37,7 @@ EXPORT_SYMBOL_GPL(hv_current_partition_id);  void *hv_hypercall_pg;  EXPORT_SYMBOL_GPL(hv_hypercall_pg); -union hv_ghcb __percpu **hv_ghcb_pg; +union hv_ghcb * __percpu *hv_ghcb_pg;  /* Storage to save the hypercall page temporarily for hibernation */  static void *hv_hypercall_pg_saved; @@ -498,6 +499,17 @@ void __init hyperv_init(void)  	/* Query the VMs extended capability once, so that it can be cached. */  	hv_query_ext_cap(0); + +#ifdef CONFIG_SWIOTLB +	/* +	 * Swiotlb bounce buffer needs to be mapped in extra address +	 * space. Map function doesn't work in the early place and so +	 * call swiotlb_update_mem_attributes() here. +	 */ +	if (hv_is_isolation_supported()) +		swiotlb_update_mem_attributes(); +#endif +  	return;  clean_guest_os_id: |