Commit 8a53e13
committed
KVM: selftests: Require KVM_CAP_USER_MEMORY2 for tests that create memslots
Explicitly require KVM_CAP_USER_MEMORY2 for selftests that create memslots,
i.e. skip selftests that need memslots instead of letting them fail on
KVM_SET_USER_MEMORY_REGION2. While it's ok to take a dependency on new
kernel features, selftests should skip gracefully instead of failing hard
when run on older kernels.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/69ae0694-8ca3-402c-b864-99b500b24f5d@moroto.mountain
Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240430162133.337541-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 20ecf59 commit 8a53e13
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
933 | 937 | | |
934 | 938 | | |
935 | 939 | | |
| |||
944 | 948 | | |
945 | 949 | | |
946 | 950 | | |
| 951 | + | |
| 952 | + | |
947 | 953 | | |
948 | 954 | | |
949 | 955 | | |
| |||
970 | 976 | | |
971 | 977 | | |
972 | 978 | | |
| 979 | + | |
| 980 | + | |
973 | 981 | | |
974 | 982 | | |
975 | 983 | | |
| |||
0 commit comments