diff mbox series

[V3,1/8] KVM: selftests: private_mem: Use native hypercall

Message ID 20221223001352.3873203-2-vannapurve@google.com (mailing list archive)
State New
Headers show
Series KVM: selftests: SEV: selftests for fd-based private memory | expand

Commit Message

Vishal Annapurve Dec. 23, 2022, 12:13 a.m. UTC
CVMs need to execute hypercalls as per the cpu type without relying on
KVM emulation.

Execute hypercall from the guest using native instructions.

Signed-off-by: Vishal Annapurve <vannapurve@google.com>
---
 tools/testing/selftests/kvm/lib/x86_64/private_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/kvm/lib/x86_64/private_mem.c b/tools/testing/selftests/kvm/lib/x86_64/private_mem.c
index 2b97fc34ec4a..5a8fd8c3bc04 100644
--- a/tools/testing/selftests/kvm/lib/x86_64/private_mem.c
+++ b/tools/testing/selftests/kvm/lib/x86_64/private_mem.c
@@ -24,7 +24,7 @@ 
 static inline uint64_t __kvm_hypercall_map_gpa_range(uint64_t gpa, uint64_t size,
 	uint64_t flags)
 {
-	return kvm_hypercall(KVM_HC_MAP_GPA_RANGE, gpa, size >> PAGE_SHIFT, flags, 0);
+	return kvm_native_hypercall(KVM_HC_MAP_GPA_RANGE, gpa, size >> PAGE_SHIFT, flags, 0);
 }
 
 static inline void kvm_hypercall_map_gpa_range(uint64_t gpa, uint64_t size,