diff options
author | Carsten Otte <cotte@de.ibm.com> | 2012-01-04 04:25:21 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 07:52:18 -0500 |
commit | 27e0393f15fc8bc855c6a888387ff5ffd2181089 (patch) | |
tree | 7dd5f6f49f6e11ee5cfbbc4d00fb39f649caa61b /Documentation/virtual | |
parent | e08b96371625aaa84cb03f51acc4c8e0be27403a (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.txt | 38 |
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: | |||
1496 | Some guests configure the LINT1 NMI input to cause a panic, aiding in | 1496 | Some guests configure the LINT1 NMI input to cause a panic, aiding in |
1497 | debugging. | 1497 | debugging. |
1498 | 1498 | ||
1499 | 4.64 KVM_S390_UCAS_MAP | ||
1500 | |||
1501 | Capability: KVM_CAP_S390_UCONTROL | ||
1502 | Architectures: s390 | ||
1503 | Type: vcpu ioctl | ||
1504 | Parameters: struct kvm_s390_ucas_mapping (in) | ||
1505 | Returns: 0 in case of success | ||
1506 | |||
1507 | The parameter is defined like this: | ||
1508 | struct kvm_s390_ucas_mapping { | ||
1509 | __u64 user_addr; | ||
1510 | __u64 vcpu_addr; | ||
1511 | __u64 length; | ||
1512 | }; | ||
1513 | |||
1514 | This ioctl maps the memory at "user_addr" with the length "length" to | ||
1515 | the vcpu's address space starting at "vcpu_addr". All parameters need to | ||
1516 | be alligned by 1 megabyte. | ||
1517 | |||
1518 | 4.65 KVM_S390_UCAS_UNMAP | ||
1519 | |||
1520 | Capability: KVM_CAP_S390_UCONTROL | ||
1521 | Architectures: s390 | ||
1522 | Type: vcpu ioctl | ||
1523 | Parameters: struct kvm_s390_ucas_mapping (in) | ||
1524 | Returns: 0 in case of success | ||
1525 | |||
1526 | The parameter is defined like this: | ||
1527 | struct kvm_s390_ucas_mapping { | ||
1528 | __u64 user_addr; | ||
1529 | __u64 vcpu_addr; | ||
1530 | __u64 length; | ||
1531 | }; | ||
1532 | |||
1533 | This 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. | ||
1535 | All parameters need to be alligned by 1 megabyte. | ||
1536 | |||
1499 | 5. The kvm_run structure | 1537 | 5. The kvm_run structure |
1500 | 1538 | ||
1501 | Application code obtains a pointer to the kvm_run structure by | 1539 | Application code obtains a pointer to the kvm_run structure by |