summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/hv_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
index da3307533f4d..897bbb96f411 100644
--- a/drivers/hv/hv_common.c
+++ b/drivers/hv/hv_common.c
@@ -381,10 +381,10 @@ int hv_common_cpu_init(unsigned int cpu)
*outputarg = (char *)(*inputarg) + HV_HYP_PAGE_SIZE;
}
- if (hv_isolation_type_en_snp()) {
+ if (hv_isolation_type_en_snp() || hv_isolation_type_tdx()) {
ret = set_memory_decrypted((unsigned long)*inputarg, pgcount);
if (ret) {
- kfree(*inputarg);
+ /* It may be unsafe to free *inputarg */
*inputarg = NULL;
return ret;
}
@@ -567,3 +567,9 @@ u64 __weak hv_ghcb_hypercall(u64 control, void *input, void *output, u32 input_s
return HV_STATUS_INVALID_PARAMETER;
}
EXPORT_SYMBOL_GPL(hv_ghcb_hypercall);
+
+u64 __weak hv_tdx_hypercall(u64 control, u64 param1, u64 param2)
+{
+ return HV_STATUS_INVALID_PARAMETER;
+}
+EXPORT_SYMBOL_GPL(hv_tdx_hypercall);