summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86/userspace_io_test.c
diff options
context:
space:
mode:
authorYosry Ahmed <yosry.ahmed@linux.dev>2025-10-21 07:47:21 +0000
committerSean Christopherson <seanjc@google.com>2025-11-20 16:19:56 -0800
commit28b2dced8ba4604b2cdd97c11d7fbd0fa99f9835 (patch)
tree1965ac783a6f64e41d80155af65152a502fc899c /tools/testing/selftests/kvm/x86/userspace_io_test.c
parent3c40777f0ed81e8b8f7047319ad195e407614b69 (diff)
KVM: selftests: Stop hardcoding PAGE_SIZE in x86 selftests
Use PAGE_SIZE instead of 4096. Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev> Link: https://patch.msgid.link/20251021074736.1324328-9-yosry.ahmed@linux.dev Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86/userspace_io_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86/userspace_io_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86/userspace_io_test.c b/tools/testing/selftests/kvm/x86/userspace_io_test.c
index 9481cbcf284f..be7d72f3c029 100644
--- a/tools/testing/selftests/kvm/x86/userspace_io_test.c
+++ b/tools/testing/selftests/kvm/x86/userspace_io_test.c
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
regs.rcx = 1;
if (regs.rcx == 3)
regs.rcx = 8192;
- memset((void *)run + run->io.data_offset, 0xaa, 4096);
+ memset((void *)run + run->io.data_offset, 0xaa, PAGE_SIZE);
vcpu_regs_set(vcpu, &regs);
}