]> 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)
commite973d088ddb0c49a837ce0cf8866f6b14cb81823
tree9357e74c580d64eabc05c5686fc8cde3c58fe433
parentbb4aa30fef8f8599bc06e3511d7986cee51e9769
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