diff options
| author | Sean Christopherson <[email protected]> | 2024-11-28 00:55:33 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2024-12-18 22:14:14 +0000 |
| commit | 09bb926d290789ff35e7fa53045811a8c57356a9 (patch) | |
| tree | bef826e60f84ab15e09202873999b60b1a5782ff /tools/testing/selftests/kvm/x86/nested_exceptions_test.c | |
| parent | KVM: Move KVM_REG_SIZE() definition to common uAPI header (diff) | |
| download | kernel-09bb926d290789ff35e7fa53045811a8c57356a9.tar.gz kernel-09bb926d290789ff35e7fa53045811a8c57356a9.zip | |
KVM: selftests: Return a value from vcpu_get_reg() instead of using an out-param
Return a uint64_t from vcpu_get_reg() instead of having the caller provide
a pointer to storage, as none of the vcpu_get_reg() usage in KVM selftests
accesses a register larger than 64 bits, and vcpu_set_reg() only accepts a
64-bit value. If a use case comes along that needs to get a register that
is larger than 64 bits, then a utility can be added to assert success and
take a void pointer, but until then, forcing an out param yields ugly code
and prevents feeding the output of vcpu_get_reg() into vcpu_set_reg().
Reviewed-by: Andrew Jones <[email protected]>
Acked-by: Claudio Imbrenda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/x86/nested_exceptions_test.c')
0 files changed, 0 insertions, 0 deletions
