aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2012-01-04 04:25:21 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:18 -0500
commit27e0393f15fc8bc855c6a888387ff5ffd2181089 (patch)
tree7dd5f6f49f6e11ee5cfbbc4d00fb39f649caa61b /Documentation/virtual
parente08b96371625aaa84cb03f51acc4c8e0be27403a (diff)
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 <cotte@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/api.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 579d40b26a5a..ee394b263261 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1496,6 +1496,44 @@ following algorithm:
1496Some guests configure the LINT1 NMI input to cause a panic, aiding in 1496Some guests configure the LINT1 NMI input to cause a panic, aiding in
1497debugging. 1497debugging.
1498 1498
14994.64 KVM_S390_UCAS_MAP
1500
1501Capability: KVM_CAP_S390_UCONTROL
1502Architectures: s390
1503Type: vcpu ioctl
1504Parameters: struct kvm_s390_ucas_mapping (in)
1505Returns: 0 in case of success
1506
1507The parameter is defined like this:
1508 struct kvm_s390_ucas_mapping {
1509 __u64 user_addr;
1510 __u64 vcpu_addr;
1511 __u64 length;
1512 };
1513
1514This ioctl maps the memory at "user_addr" with the length "length" to
1515the vcpu's address space starting at "vcpu_addr". All parameters need to
1516be alligned by 1 megabyte.
1517
15184.65 KVM_S390_UCAS_UNMAP
1519
1520Capability: KVM_CAP_S390_UCONTROL
1521Architectures: s390
1522Type: vcpu ioctl
1523Parameters: struct kvm_s390_ucas_mapping (in)
1524Returns: 0 in case of success
1525
1526The parameter is defined like this:
1527 struct kvm_s390_ucas_mapping {
1528 __u64 user_addr;
1529 __u64 vcpu_addr;
1530 __u64 length;
1531 };
1532
1533This ioctl unmaps the memory in the vcpu's address space starting at
1534"vcpu_addr" with the length "length". The field "user_addr" is ignored.
1535All parameters need to be alligned by 1 megabyte.
1536
14995. The kvm_run structure 15375. The kvm_run structure
1500 1538
1501Application code obtains a pointer to the kvm_run structure by 1539Application code obtains a pointer to the kvm_run structure by