mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
KVM: s390: ucontrol: per vcpu address spaces
This patch introduces two ioctls for virtual cpus, that are only valid for kernel virtual machines that are controlled by userspace. Each virtual cpu has its individual address space in this mode of operation, and each address space is backed by the gmap implementation just like the address space for regular KVM guests. KVM_S390_UCAS_MAP allows to map a part of the user's virtual address space to the vcpu. Starting offset and length in both the user and the vcpu address space need to be aligned to 1M. KVM_S390_UCAS_UNMAP can be used to unmap a range of memory from a virtual cpu in a similar way. Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
This commit is contained in:
parent
e08b963716
commit
27e0393f15
3 changed files with 97 additions and 1 deletions
|
|
@ -1496,6 +1496,44 @@ following algorithm:
|
|||
Some guests configure the LINT1 NMI input to cause a panic, aiding in
|
||||
debugging.
|
||||
|
||||
4.64 KVM_S390_UCAS_MAP
|
||||
|
||||
Capability: KVM_CAP_S390_UCONTROL
|
||||
Architectures: s390
|
||||
Type: vcpu ioctl
|
||||
Parameters: struct kvm_s390_ucas_mapping (in)
|
||||
Returns: 0 in case of success
|
||||
|
||||
The parameter is defined like this:
|
||||
struct kvm_s390_ucas_mapping {
|
||||
__u64 user_addr;
|
||||
__u64 vcpu_addr;
|
||||
__u64 length;
|
||||
};
|
||||
|
||||
This ioctl maps the memory at "user_addr" with the length "length" to
|
||||
the vcpu's address space starting at "vcpu_addr". All parameters need to
|
||||
be alligned by 1 megabyte.
|
||||
|
||||
4.65 KVM_S390_UCAS_UNMAP
|
||||
|
||||
Capability: KVM_CAP_S390_UCONTROL
|
||||
Architectures: s390
|
||||
Type: vcpu ioctl
|
||||
Parameters: struct kvm_s390_ucas_mapping (in)
|
||||
Returns: 0 in case of success
|
||||
|
||||
The parameter is defined like this:
|
||||
struct kvm_s390_ucas_mapping {
|
||||
__u64 user_addr;
|
||||
__u64 vcpu_addr;
|
||||
__u64 length;
|
||||
};
|
||||
|
||||
This ioctl unmaps the memory in the vcpu's address space starting at
|
||||
"vcpu_addr" with the length "length". The field "user_addr" is ignored.
|
||||
All parameters need to be alligned by 1 megabyte.
|
||||
|
||||
5. The kvm_run structure
|
||||
|
||||
Application code obtains a pointer to the kvm_run structure by
|
||||
|
|
|
|||
Loading…
Reference in a new issue