]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9cde847536c0f6ea687806c40c04ac151ac159af
tree9357e74c580d64eabc05c5686fc8cde3c58fe433
parent5bdeb06509a1f268ba54f5b62f088b8a6eaa5764
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