mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
KVM: selftests: Unconditionally use memslot 0 for vaddr allocations
Drop the memslot param(s) from vm_vaddr_alloc() now that all callers directly specific '0' as the memslot. Drop the memslot param from virt_pgd_alloc() as well since vm_vaddr_alloc() is its only user. I.e. shove the hardcoded '0' down to the vm_phy_pages_alloc() calls. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
408633c326
commit
a75a895e64
@@ -13,7 +13,7 @@
|
||||
|
||||
#define PAGES_PER_REGION 4
|
||||
|
||||
void virt_pgd_alloc(struct kvm_vm *vm, uint32_t memslot)
|
||||
void virt_pgd_alloc(struct kvm_vm *vm)
|
||||
{
|
||||
vm_paddr_t paddr;
|
||||
|
||||
@@ -24,7 +24,7 @@ void virt_pgd_alloc(struct kvm_vm *vm, uint32_t memslot)
|
||||
return;
|
||||
|
||||
paddr = vm_phy_pages_alloc(vm, PAGES_PER_REGION,
|
||||
KVM_GUEST_PAGE_TABLE_MIN_PADDR, memslot);
|
||||
KVM_GUEST_PAGE_TABLE_MIN_PADDR, 0);
|
||||
memset(addr_gpa2hva(vm, paddr), 0xff, PAGES_PER_REGION * vm->page_size);
|
||||
|
||||
vm->pgd = paddr;
|
||||
@@ -170,7 +170,7 @@ void vm_vcpu_add_default(struct kvm_vm *vm, uint32_t vcpuid, void *guest_code)
|
||||
vm->page_size);
|
||||
|
||||
stack_vaddr = vm_vaddr_alloc(vm, stack_size,
|
||||
DEFAULT_GUEST_STACK_VADDR_MIN, 0, 0);
|
||||
DEFAULT_GUEST_STACK_VADDR_MIN);
|
||||
|
||||
vm_vcpu_add(vm, vcpuid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user