[PATCH 5/5] UBUNTU: SAUCE: Fix building ARM64

Tim Gardner tim.gardner at canonical.com
Mon Jul 24 17:00:17 UTC 2023


From: Dexuan Cui <decui at microsoft.com>

BugLink: https://bugs.launchpad.net/bugs/2028286

(cherry picked from commit 1727b08420f8909333573aaa67e1aa8738d4fb88 https://github.com/dcui/linux)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
 arch/x86/hyperv/ivm.c          | 2 --
 arch/x86/kernel/cpu/mshyperv.c | 1 -
 drivers/hv/hv_common.c         | 9 +++++++++
 include/asm-generic/mshyperv.h | 1 +
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
index 4e31677d1c02..e68051eba25a 100644
--- a/arch/x86/hyperv/ivm.c
+++ b/arch/x86/hyperv/ivm.c
@@ -122,8 +122,6 @@ u64 hv_tdx_hypercall_fast(u64 control, u64 input)
 	return hv_tdx_hypercall(control | HV_HYPERCALL_FAST_BIT,
 				input_address, output_address);
 }
-EXPORT_SYMBOL_GPL(hv_tdx_hypercall_fast);
-
 
 static inline u64 rd_ghcb_msr(void)
 {
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 63223d40aa03..c7c8ec666fd0 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -41,7 +41,6 @@ struct ms_hyperv_info ms_hyperv;
 
 bool hyperv_paravisor_present;
 /* The variable is used in modules via hv_do_hypercall() */
-EXPORT_SYMBOL_GPL(hyperv_paravisor_present);
 
 #if IS_ENABLED(CONFIG_HYPERV)
 static inline unsigned int hv_get_nested_reg(unsigned int reg)
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index 23871a9d02e9..308d7d485803 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -37,6 +37,9 @@
 bool __weak hv_root_partition;
 EXPORT_SYMBOL_GPL(hv_root_partition);
 
+bool __weak hyperv_paravisor_present;
+EXPORT_SYMBOL_GPL(hyperv_paravisor_present);
+
 bool __weak hv_nested;
 EXPORT_SYMBOL_GPL(hv_nested);
 
@@ -338,3 +341,9 @@ u64 __weak hv_ivm_hypercall(u64 control, void *input, void *output, u32 input_si
 	return HV_STATUS_INVALID_PARAMETER;
 }
 EXPORT_SYMBOL_GPL(hv_ivm_hypercall);
+
+u64 __weak hv_tdx_hypercall_fast(u64 control, u64 input)
+{
+	return HV_STATUS_INVALID_PARAMETER;
+}
+EXPORT_SYMBOL_GPL(hv_tdx_hypercall_fast);
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
index e7e3445e99b7..8081ef1180e0 100644
--- a/include/asm-generic/mshyperv.h
+++ b/include/asm-generic/mshyperv.h
@@ -183,6 +183,7 @@ extern int vmbus_interrupt;
 extern int vmbus_irq;
 
 extern bool hv_root_partition;
+extern bool hyperv_paravisor_present;
 
 #if IS_ENABLED(CONFIG_HYPERV)
 /*
-- 
2.34.1




More information about the kernel-team mailing list