diff options
Diffstat (limited to 'Documentation/virtual/kvm/api.txt')
-rw-r--r-- | Documentation/virtual/kvm/api.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index e8875fef3eb8..a1d344d5ff4c 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1350,6 +1350,41 @@ The following flags are defined: | |||
1350 | If datamatch flag is set, the event will be signaled only if the written value | 1350 | If datamatch flag is set, the event will be signaled only if the written value |
1351 | to the registered address is equal to datamatch in struct kvm_ioeventfd. | 1351 | to the registered address is equal to datamatch in struct kvm_ioeventfd. |
1352 | 1352 | ||
1353 | 4.62 KVM_CREATE_SPAPR_TCE | ||
1354 | |||
1355 | Capability: KVM_CAP_SPAPR_TCE | ||
1356 | Architectures: powerpc | ||
1357 | Type: vm ioctl | ||
1358 | Parameters: struct kvm_create_spapr_tce (in) | ||
1359 | Returns: file descriptor for manipulating the created TCE table | ||
1360 | |||
1361 | This creates a virtual TCE (translation control entry) table, which | ||
1362 | is an IOMMU for PAPR-style virtual I/O. It is used to translate | ||
1363 | logical addresses used in virtual I/O into guest physical addresses, | ||
1364 | and provides a scatter/gather capability for PAPR virtual I/O. | ||
1365 | |||
1366 | /* for KVM_CAP_SPAPR_TCE */ | ||
1367 | struct kvm_create_spapr_tce { | ||
1368 | __u64 liobn; | ||
1369 | __u32 window_size; | ||
1370 | }; | ||
1371 | |||
1372 | The liobn field gives the logical IO bus number for which to create a | ||
1373 | TCE table. The window_size field specifies the size of the DMA window | ||
1374 | which this TCE table will translate - the table will contain one 64 | ||
1375 | bit TCE entry for every 4kiB of the DMA window. | ||
1376 | |||
1377 | When the guest issues an H_PUT_TCE hcall on a liobn for which a TCE | ||
1378 | table has been created using this ioctl(), the kernel will handle it | ||
1379 | in real mode, updating the TCE table. H_PUT_TCE calls for other | ||
1380 | liobns will cause a vm exit and must be handled by userspace. | ||
1381 | |||
1382 | The return value is a file descriptor which can be passed to mmap(2) | ||
1383 | to map the created TCE table into userspace. This lets userspace read | ||
1384 | the entries written by kernel-handled H_PUT_TCE calls, and also lets | ||
1385 | userspace update the TCE table directly which is useful in some | ||
1386 | circumstances. | ||
1387 | |||
1353 | 5. The kvm_run structure | 1388 | 5. The kvm_run structure |
1354 | 1389 | ||
1355 | Application code obtains a pointer to the kvm_run structure by | 1390 | Application code obtains a pointer to the kvm_run structure by |