selftests: kvm: Mmap the entire vcpu mmap area
authorAaron Lewis <aaronlewis@google.com>
Wed, 10 Feb 2021 16:50:36 +0000 (08:50 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Mar 2021 19:30:53 +0000 (14:30 -0500)
commit6528fc0a11de3d16339cf17639e2f69a68fcaf4d
tree9357e74c580d64eabc05c5686fc8cde3c58fe433
parent7d2cdad0da9dc0b1eb74c498c155be8c35a49ee6
selftests: kvm: Mmap the entire vcpu mmap area

The vcpu mmap area may consist of more than just the kvm_run struct.
Allocate enough space for the entire vcpu mmap area. Without this, on
x86, the PIO page, for example, will be missing.  This is problematic
when dealing with an unhandled exception from the guest as the exception
vector will be incorrectly reported as 0x0.

Message-Id: <20210210165035.3712489-1-aaronlewis@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Co-developed-by: Steve Rutherford <srutherford@google.com>
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c