On 10/20/2010 10:26 AM, Sheng Yang wrote:
This patch enable per-vector mask for assigned devices using MSI-X. @@ -1087,6 +1087,28 @@ of 4 instructions that make up a hypercall. If any additional field gets added to this structure later on, a bit for that additional piece of information will be set in the flags bitmap. +4.47 KVM_ASSIGN_REG_MSIX_MMIO + +Capability: KVM_CAP_DEVICE_MSIX_MASK +Architectures: x86 +Type: vm ioctl +Parameters: struct kvm_assigned_msix_mmio (in) +Returns: 0 on success, !0 on error + +struct kvm_assigned_msix_mmio { + /* Assigned device's ID */ + __u32 assigned_dev_id; + /* MSI-X table MMIO address */ + __u64 base_addr; + /* Must be 0 */ + __u32 flags; + /* Must be 0, reserved for future use */ + __u64 reserved; +}; + +This ioctl would enable in-kernel MSI-X emulation, which would handle MSI-X +mask bit in the kernel.
Need to clarify what happens for non-mask bits.
@@ -2717,6 +2719,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, return -EINVAL; switch (cap->cap) { + case KVM_CAP_DEVICE_MSIX_EXT: + vcpu->kvm->arch.msix_flags_enabled = true; + r = 0; + break;
It's strange to enable a per-vm capability with a vcpu ioctl. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html