[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211216171358.61140-7-michael.roth@amd.com>
Date: Thu, 16 Dec 2021 11:13:51 -0600
From: Michael Roth <michael.roth@....com>
To: <linux-kselftest@...r.kernel.org>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<x86@...nel.org>, Nathan Tempelman <natet@...gle.com>,
Marc Orr <marcorr@...gle.com>,
"Steve Rutherford" <srutherford@...gle.com>,
Sean Christopherson <seanjc@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>,
Brijesh Singh <brijesh.singh@....com>,
Tom Lendacky <thomas.lendacky@....com>,
Varad Gautam <varad.gautam@...e.com>,
Shuah Khan <shuah@...nel.org>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"David Woodhouse" <dwmw@...zon.co.uk>,
Ricardo Koller <ricarkol@...gle.com>,
"Jim Mattson" <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
"Thomas Gleixner" <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"Borislav Petkov" <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Krish Sadhukhan <krish.sadhukhan@...cle.com>,
Peter Gonda <pgonda@...gle.com>
Subject: [PATCH v2 06/13] KVM: selftests: ensure ucall_shared_alloc() allocates shared memory
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@....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
Powered by blists - more mailing lists