kvm: selftests: introduce ucall

Rework the guest exit to userspace code to generalize the concept
into what it is, a "hypercall to userspace", and provide two
implementations of it: the PortIO version currently used, but only
useable by x86, and an MMIO version that other architectures (except
s390) can use.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Andrew Jones
2018-09-18 19:54:25 +02:00
committed by Paolo Bonzini
parent 6c930268bc
commit 14c47b7530
10 changed files with 218 additions and 81 deletions

View File

@@ -47,6 +47,7 @@ struct kvm_vm {
int fd;
unsigned int page_size;
unsigned int page_shift;
unsigned int va_bits;
uint64_t max_gfn;
struct vcpu *vcpu_head;
struct userspace_mem_region *userspace_mem_region_head;