diff options
Diffstat (limited to 'Documentation/virtual/kvm/api.txt')
-rw-r--r-- | Documentation/virtual/kvm/api.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 59a38264a0ed..6386f8c0482e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -1169,6 +1169,14 @@ following flags are specified: | |||
1169 | 1169 | ||
1170 | /* Depends on KVM_CAP_IOMMU */ | 1170 | /* Depends on KVM_CAP_IOMMU */ |
1171 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1171 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
1172 | /* The following two depend on KVM_CAP_PCI_2_3 */ | ||
1173 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) | ||
1174 | #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) | ||
1175 | |||
1176 | If KVM_DEV_ASSIGN_PCI_2_3 is set, the kernel will manage legacy INTx interrupts | ||
1177 | via the PCI-2.3-compliant device-level mask, thus enable IRQ sharing with other | ||
1178 | assigned devices or host devices. KVM_DEV_ASSIGN_MASK_INTX specifies the | ||
1179 | guest's view on the INTx mask, see KVM_ASSIGN_SET_INTX_MASK for details. | ||
1172 | 1180 | ||
1173 | The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure | 1181 | The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure |
1174 | isolation of the device. Usages not specifying this flag are deprecated. | 1182 | isolation of the device. Usages not specifying this flag are deprecated. |
@@ -1441,6 +1449,39 @@ The "num_dirty" field is a performance hint for KVM to determine whether it | |||
1441 | should skip processing the bitmap and just invalidate everything. It must | 1449 | should skip processing the bitmap and just invalidate everything. It must |
1442 | be set to the number of set bits in the bitmap. | 1450 | be set to the number of set bits in the bitmap. |
1443 | 1451 | ||
1452 | 4.60 KVM_ASSIGN_SET_INTX_MASK | ||
1453 | |||
1454 | Capability: KVM_CAP_PCI_2_3 | ||
1455 | Architectures: x86 | ||
1456 | Type: vm ioctl | ||
1457 | Parameters: struct kvm_assigned_pci_dev (in) | ||
1458 | Returns: 0 on success, -1 on error | ||
1459 | |||
1460 | Allows userspace to mask PCI INTx interrupts from the assigned device. The | ||
1461 | kernel will not deliver INTx interrupts to the guest between setting and | ||
1462 | clearing of KVM_ASSIGN_SET_INTX_MASK via this interface. This enables use of | ||
1463 | and emulation of PCI 2.3 INTx disable command register behavior. | ||
1464 | |||
1465 | This may be used for both PCI 2.3 devices supporting INTx disable natively and | ||
1466 | older devices lacking this support. Userspace is responsible for emulating the | ||
1467 | read value of the INTx disable bit in the guest visible PCI command register. | ||
1468 | When modifying the INTx disable state, userspace should precede updating the | ||
1469 | physical device command register by calling this ioctl to inform the kernel of | ||
1470 | the new intended INTx mask state. | ||
1471 | |||
1472 | Note that the kernel uses the device INTx disable bit to internally manage the | ||
1473 | device interrupt state for PCI 2.3 devices. Reads of this register may | ||
1474 | therefore not match the expected value. Writes should always use the guest | ||
1475 | intended INTx disable value rather than attempting to read-copy-update the | ||
1476 | current physical device state. Races between user and kernel updates to the | ||
1477 | INTx disable bit are handled lazily in the kernel. It's possible the device | ||
1478 | may generate unintended interrupts, but they will not be injected into the | ||
1479 | guest. | ||
1480 | |||
1481 | See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified | ||
1482 | by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is | ||
1483 | evaluated. | ||
1484 | |||
1444 | 4.62 KVM_CREATE_SPAPR_TCE | 1485 | 4.62 KVM_CREATE_SPAPR_TCE |
1445 | 1486 | ||
1446 | Capability: KVM_CAP_SPAPR_TCE | 1487 | Capability: KVM_CAP_SPAPR_TCE |