summaryrefslogtreecommitdiffstats
path: root/test/eviction.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-01-11 18:56:23 +0100
committerLouis Burda <quent.burda@gmail.com>2023-01-11 18:56:23 +0100
commitb8f40e776af1a82116a44ce8fac34f343194f033 (patch)
treef2a0a531a6c99d74f18ae81cf6d9c2ceee243672 /test/eviction.c
parentbca09eea299f162a27be3f6a59160afe86c8d525 (diff)
downloadcachepc-b8f40e776af1a82116a44ce8fac34f343194f033.tar.gz
cachepc-b8f40e776af1a82116a44ce8fac34f343194f033.zip
Fix kvm-eviction kvm & sev support
Diffstat (limited to 'test/eviction.c')
-rw-r--r--test/eviction.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/eviction.c b/test/eviction.c
index 8cb5914..69103af 100644
--- a/test/eviction.c
+++ b/test/eviction.c
@@ -21,6 +21,8 @@ main(int argc, const char **argv)
set = 48;
if (argc > 1) set = atoi(argv[1]);
+ if (set >= L1_SETS)
+ errx(1, "set out-of-bounds");
ret = ioctl(fd, KVM_CPC_TEST_EVICTION, &set);
if (ret == -1) err(1, "ioctl KVM_CPC_TEST_EVICTION");