Skip to content

Commit 31e00da

Browse files
pgondasean-jc
authored andcommitted
KVM: selftests: Explicitly ucall pool from shared memory
Allocate the common ucall pool using vm_vaddr_alloc_shared() so that the ucall structures will be placed in shared (unencrypted) memory for VMs with support for protected (encrypted) memory, e.g. x86's SEV. Cc: Paolo Bonzini <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Vishal Annapurve <[email protected]> Cc: Ackerly Tng <[email protected]> cc: Andrew Jones <[email protected]> Cc: Tom Lendacky <[email protected]> Cc: Michael Roth <[email protected]> Tested-by: Carlos Bilbao <[email protected]> Signed-off-by: Peter Gonda <[email protected]> [sean: massage changelog] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent d210eeb commit 31e00da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/kvm/lib/ucall_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
2929
vm_vaddr_t vaddr;
3030
int i;
3131

32-
vaddr = __vm_vaddr_alloc(vm, sizeof(*hdr), KVM_UTIL_MIN_VADDR, MEM_REGION_DATA);
32+
vaddr = vm_vaddr_alloc_shared(vm, sizeof(*hdr), KVM_UTIL_MIN_VADDR,
33+
MEM_REGION_DATA);
3334
hdr = (struct ucall_header *)addr_gva2hva(vm, vaddr);
3435
memset(hdr, 0, sizeof(*hdr));
3536

0 commit comments

Comments
 (0)