aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-10-12 04:34:00 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-03 06:07:29 -0500
commit7f05db6a20fe4d85bada20d365c78029831b9de1 (patch)
tree272fdd1aaf66d301c594eb92b4db2ba970fcc935 /Documentation/virtual
parent1e0ad70cc1957b9050368e433b1061a2cd1ce543 (diff)
kvm: drop unsupported capabilities, fix documentation
No kernel ever reported KVM_CAP_DEVICE_MSIX, KVM_CAP_DEVICE_MSI, KVM_CAP_DEVICE_ASSIGNMENT, KVM_CAP_DEVICE_DEASSIGNMENT. This makes the documentation wrong, and no application ever written to use these capabilities has a chance to work correctly. The only way to detect support is to try, and test errno for ENOTTY. That's unfortunate, but we can't fix the past. Document the actual semantics, and drop the definitions from the exported header to make it easier for application developers to note and fix the bug. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/api.txt40
1 files changed, 33 insertions, 7 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 7610eaa4d491..7a943c23db1c 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -68,9 +68,12 @@ description:
68 68
69 Capability: which KVM extension provides this ioctl. Can be 'basic', 69 Capability: which KVM extension provides this ioctl. Can be 'basic',
70 which means that is will be provided by any kernel that supports 70 which means that is will be provided by any kernel that supports
71 API version 12 (see section 4.1), or a KVM_CAP_xyz constant, which 71 API version 12 (see section 4.1), a KVM_CAP_xyz constant, which
72 means availability needs to be checked with KVM_CHECK_EXTENSION 72 means availability needs to be checked with KVM_CHECK_EXTENSION
73 (see section 4.4). 73 (see section 4.4), or 'none' which means that while not all kernels
74 support this ioctl, there's no capability bit to check its
75 availability: for kernels that don't support the ioctl,
76 the ioctl returns -ENOTTY.
74 77
75 Architectures: which instruction set architectures provide this ioctl. 78 Architectures: which instruction set architectures provide this ioctl.
76 x86 includes both i386 and x86_64. 79 x86 includes both i386 and x86_64.
@@ -1257,7 +1260,7 @@ The flags bitmap is defined as:
1257 1260
12584.48 KVM_ASSIGN_PCI_DEVICE 12614.48 KVM_ASSIGN_PCI_DEVICE
1259 1262
1260Capability: KVM_CAP_DEVICE_ASSIGNMENT 1263Capability: none
1261Architectures: x86 ia64 1264Architectures: x86 ia64
1262Type: vm ioctl 1265Type: vm ioctl
1263Parameters: struct kvm_assigned_pci_dev (in) 1266Parameters: struct kvm_assigned_pci_dev (in)
@@ -1298,10 +1301,16 @@ Only PCI header type 0 devices with PCI BAR resources are supported by
1298device assignment. The user requesting this ioctl must have read/write 1301device assignment. The user requesting this ioctl must have read/write
1299access to the PCI sysfs resource files associated with the device. 1302access to the PCI sysfs resource files associated with the device.
1300 1303
1304Errors:
1305 ENOTTY: kernel does not support this ioctl
1306
1307 Other error conditions may be defined by individual device types or
1308 have their standard meanings.
1309
1301 1310
13024.49 KVM_DEASSIGN_PCI_DEVICE 13114.49 KVM_DEASSIGN_PCI_DEVICE
1303 1312
1304Capability: KVM_CAP_DEVICE_DEASSIGNMENT 1313Capability: none
1305Architectures: x86 ia64 1314Architectures: x86 ia64
1306Type: vm ioctl 1315Type: vm ioctl
1307Parameters: struct kvm_assigned_pci_dev (in) 1316Parameters: struct kvm_assigned_pci_dev (in)
@@ -1309,9 +1318,14 @@ Returns: 0 on success, -1 on error
1309 1318
1310Ends PCI device assignment, releasing all associated resources. 1319Ends PCI device assignment, releasing all associated resources.
1311 1320
1312See KVM_CAP_DEVICE_ASSIGNMENT for the data structure. Only assigned_dev_id is 1321See KVM_ASSIGN_PCI_DEVICE for the data structure. Only assigned_dev_id is
1313used in kvm_assigned_pci_dev to identify the device. 1322used in kvm_assigned_pci_dev to identify the device.
1314 1323
1324Errors:
1325 ENOTTY: kernel does not support this ioctl
1326
1327 Other error conditions may be defined by individual device types or
1328 have their standard meanings.
1315 1329
13164.50 KVM_ASSIGN_DEV_IRQ 13304.50 KVM_ASSIGN_DEV_IRQ
1317 1331
@@ -1346,6 +1360,12 @@ The following flags are defined:
1346It is not valid to specify multiple types per host or guest IRQ. However, the 1360It is not valid to specify multiple types per host or guest IRQ. However, the
1347IRQ type of host and guest can differ or can even be null. 1361IRQ type of host and guest can differ or can even be null.
1348 1362
1363Errors:
1364 ENOTTY: kernel does not support this ioctl
1365
1366 Other error conditions may be defined by individual device types or
1367 have their standard meanings.
1368
1349 1369
13504.51 KVM_DEASSIGN_DEV_IRQ 13704.51 KVM_DEASSIGN_DEV_IRQ
1351 1371
@@ -1423,7 +1443,7 @@ struct kvm_irq_routing_s390_adapter {
1423 1443
14244.53 KVM_ASSIGN_SET_MSIX_NR 14444.53 KVM_ASSIGN_SET_MSIX_NR
1425 1445
1426Capability: KVM_CAP_DEVICE_MSIX 1446Capability: none
1427Architectures: x86 ia64 1447Architectures: x86 ia64
1428Type: vm ioctl 1448Type: vm ioctl
1429Parameters: struct kvm_assigned_msix_nr (in) 1449Parameters: struct kvm_assigned_msix_nr (in)
@@ -1445,7 +1465,7 @@ struct kvm_assigned_msix_nr {
1445 1465
14464.54 KVM_ASSIGN_SET_MSIX_ENTRY 14664.54 KVM_ASSIGN_SET_MSIX_ENTRY
1447 1467
1448Capability: KVM_CAP_DEVICE_MSIX 1468Capability: none
1449Architectures: x86 ia64 1469Architectures: x86 ia64
1450Type: vm ioctl 1470Type: vm ioctl
1451Parameters: struct kvm_assigned_msix_entry (in) 1471Parameters: struct kvm_assigned_msix_entry (in)
@@ -1461,6 +1481,12 @@ struct kvm_assigned_msix_entry {
1461 __u16 padding[3]; 1481 __u16 padding[3];
1462}; 1482};
1463 1483
1484Errors:
1485 ENOTTY: kernel does not support this ioctl
1486
1487 Other error conditions may be defined by individual device types or
1488 have their standard meanings.
1489
1464 1490
14654.55 KVM_SET_TSC_KHZ 14914.55 KVM_SET_TSC_KHZ
1466 1492