]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: selftests: Wrap madvise() to assert success
authorAckerley Tng <ackerleytng@google.com>
Fri, 20 Feb 2026 23:54:35 +0000 (23:54 +0000)
committerSean Christopherson <seanjc@google.com>
Wed, 4 Mar 2026 22:56:21 +0000 (14:56 -0800)
Extend kvm_syscalls.h to wrap madvise() to assert success. This will be
used in the next patch.

Signed-off-by: Ackerley Tng <ackerleytng@google.com>
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Link: https://patch.msgid.link/455483ca29a3a3042efee0cf3bbd0e2548cbeb1c.1771630983.git.ackerleytng@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/kvm_syscalls.h

index d4e613162bba918ba78a12de594fbfcdd92e4812..843c9904c46f64b3b059527c0e8ffcfadfb8d51d 100644 (file)
@@ -77,5 +77,6 @@ __KVM_SYSCALL_DEFINE(munmap, 2, void *, mem, size_t, size);
 __KVM_SYSCALL_DEFINE(close, 1, int, fd);
 __KVM_SYSCALL_DEFINE(fallocate, 4, int, fd, int, mode, loff_t, offset, loff_t, len);
 __KVM_SYSCALL_DEFINE(ftruncate, 2, unsigned int, fd, off_t, length);
+__KVM_SYSCALL_DEFINE(madvise, 3, void *, addr, size_t, length, int, advice);
 
 #endif /* SELFTEST_KVM_SYSCALLS_H */