diff options
| author | Colton Lewis <[email protected]> | 2022-06-15 19:31:13 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2022-07-13 18:14:06 -0700 |
| commit | 8fb2638a568d8ef635bbef4f61eb6587d2ebd8da (patch) | |
| tree | e1dcdd117484bec716bc29b2db74f86fc56e2984 | |
| parent | 0bc273266112937cd6560f7d447b6aa9cfd9134a (diff) | |
KVM: selftests: enumerate GUEST_ASSERT arguments
Enumerate GUEST_ASSERT arguments to avoid magic indices to ucall.args.
Signed-off-by: Colton Lewis <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
| -rw-r--r-- | tools/testing/selftests/kvm/include/ucall_common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h index 98562f685151..dbe872870b83 100644 --- a/tools/testing/selftests/kvm/include/ucall_common.h +++ b/tools/testing/selftests/kvm/include/ucall_common.h @@ -32,6 +32,14 @@ uint64_t get_ucall(struct kvm_vcpu *vcpu, struct ucall *uc); ucall(UCALL_SYNC, 6, "hello", stage, arg1, arg2, arg3, arg4) #define GUEST_SYNC(stage) ucall(UCALL_SYNC, 2, "hello", stage) #define GUEST_DONE() ucall(UCALL_DONE, 0) + +enum guest_assert_builtin_args { + GUEST_ERROR_STRING, + GUEST_FILE, + GUEST_LINE, + GUEST_ASSERT_BUILTIN_NARGS +}; + #define __GUEST_ASSERT(_condition, _condstr, _nargs, _args...) do { \ if (!(_condition)) \ ucall(UCALL_ABORT, 2 + _nargs, \ |