lkml.org 
[lkml]   [2021]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 06/13] KVM: selftests: ensure ucall_shared_alloc() allocates shared memory
Date
Now that vm_vaddr_alloc() allocates encrypted/private guest memory by
default for confidential guests, ucall_shared_alloc() needs to be
switched over to using the new vm_vaddr_alloc_shared() function to
ensure that shared memory is used for the allocation.

Signed-off-by: Michael Roth <michael.roth@amd.com>
---
tools/testing/selftests/kvm/lib/ucall_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/kvm/lib/ucall_common.c b/tools/testing/selftests/kvm/lib/ucall_common.c
index 8e5738241a7c..54c6c159dcd5 100644
--- a/tools/testing/selftests/kvm/lib/ucall_common.c
+++ b/tools/testing/selftests/kvm/lib/ucall_common.c
@@ -97,8 +97,8 @@ uint64_t get_ucall(struct kvm_vm *vm, uint32_t vcpu_id, struct ucall *uc)
/* Allocate shared memory within a guest to for a shared ucall buffer. */
vm_vaddr_t ucall_shared_alloc(struct kvm_vm *vm, int count)
{
- return vm_vaddr_alloc(vm, count * sizeof(struct ucall),
- vm_get_page_size(vm));
+ return vm_vaddr_alloc_shared(vm, count * sizeof(struct ucall),
+ vm_get_page_size(vm));
}

/*
--
2.25.1
\
 
 \ /
  Last update: 2021-12-16 18:20    [W:0.897 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site