selftests: kvm: Clear uc so UCALL_NONE is being properly reported
authorAaron Lewis <aaronlewis@google.com>
Mon, 12 Oct 2020 19:47:14 +0000 (12:47 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 8 Nov 2020 11:02:14 +0000 (06:02 -0500)
commit85f2a4320ef27ce74b9da0631460561028c48756
treee0d4b78513754bbc44398e409e3c3f3eae9452e5
parentdf11f7dd5834146defa448acba097e8d7703cc42
selftests: kvm: Clear uc so UCALL_NONE is being properly reported

Ensure the out value 'uc' in get_ucall() is properly reporting
UCALL_NONE if the call fails.  The return value will be correctly
reported, however, the out parameter 'uc' will not be.  Clear the struct
to ensure the correct value is being reported in the out parameter.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Message-Id: <20201012194716.3950330-3-aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/aarch64/ucall.c
tools/testing/selftests/kvm/lib/s390x/ucall.c
tools/testing/selftests/kvm/lib/x86_64/ucall.c