[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220310164532.1821490-7-bgardon@google.com>
Date: Thu, 10 Mar 2022 08:45:25 -0800
From: Ben Gardon <bgardon@...gle.com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>, Peter Xu <peterx@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
David Dunn <daviddunn@...gle.com>,
Jing Zhang <jingzhangos@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Ben Gardon <bgardon@...gle.com>
Subject: [PATCH 06/13] selftests: KVM: Improve error message in vm_phy_pages_alloc
Make an error message in vm_phy_pages_alloc more specific, and log the
number of pages requested in the allocation.
Signed-off-by: Ben Gardon <bgardon@...gle.com>
---
tools/testing/selftests/kvm/lib/kvm_util.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
index a10bee651191..f9591dad1010 100644
--- a/tools/testing/selftests/kvm/lib/kvm_util.c
+++ b/tools/testing/selftests/kvm/lib/kvm_util.c
@@ -2408,9 +2408,10 @@ vm_paddr_t vm_phy_pages_alloc(struct kvm_vm *vm, size_t num,
} while (pg && pg != base + num);
if (pg == 0) {
- fprintf(stderr, "No guest physical page available, "
+ fprintf(stderr,
+ "Unable to find %ld contiguous guest physical pages. "
"paddr_min: 0x%lx page_size: 0x%x memslot: %u\n",
- paddr_min, vm->page_size, memslot.id);
+ num, paddr_min, vm->page_size, memslot.id);
fputs("---- vm dump ----\n", stderr);
vm_dump(stderr, vm, 2);
abort();
--
2.35.1.616.g0bdcbb4464-goog
Powered by blists - more mailing lists