[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221223000958.729256-3-code@tyhicks.com>
Date: Thu, 22 Dec 2022 18:09:58 -0600
From: Tyler Hicks <code@...icks.com>
To: gregkh@...uxfoundation.org, stable@...r.kernel.org
Cc: "Tyler Hicks" <code@...icks.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
Gavin Shan <gshan@...hat.com>, Marc Zyngier <maz@...nel.org>,
Karolina Drobnik <karolinadrobnik@...il.com>,
Mike Rapoport <rppt@...nel.org>
Subject: [PATCH 5.15 2/2] KVM: selftests: Fix build regression by using accessor function
From: "Tyler Hicks" <code@...icks.com>
Fix the stable backport of commit 05c2224d4b04 ("KVM: selftests: Fix
number of pages for memory slot in memslot_modification_stress_test"),
which caused memslot_modification_stress_test.c build failures due to
trying to access private members of struct kvm_vm.
v6.0 commit b530eba14c70 ("KVM: selftests: Get rid of
kvm_util_internal.h") and some other commits got rid of the accessors
and made all of the KVM data structures public. Keep using the accessors
in older kernels.
There is no corresponding upstream commit for this change.
Signed-off-by: Tyler Hicks (Microsoft) <code@...icks.com>
---
tools/testing/selftests/kvm/memslot_modification_stress_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/memslot_modification_stress_test.c b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
index 1d806b8ffee2..766c1790df66 100644
--- a/tools/testing/selftests/kvm/memslot_modification_stress_test.c
+++ b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
@@ -72,7 +72,7 @@ struct memslot_antagonist_args {
static void add_remove_memslot(struct kvm_vm *vm, useconds_t delay,
uint64_t nr_modifications)
{
- uint64_t pages = max_t(int, vm->page_size, getpagesize()) / vm->page_size;
+ uint64_t pages = max_t(int, vm_get_page_size(vm), getpagesize()) / vm_get_page_size(vm);
uint64_t gpa;
int i;
--
2.34.1
Powered by blists - more mailing lists