Enable MSI support for KVM VT-d
cover Enable MSI support for KVM VT-d
Hi, Avi
This patchset enable MSI support for KVM VT-d.
And here are only kernel space ones. The third patch would go to also goto x86 upstream.
The userspace code would looks like this:
assigned_irq_data.guest_msi_addr = *(uint32_t *)(d->msi_cap + 4); assigned_irq_data.guest_msi_data = *(uint16_t *)(d->msi_cap + 8); assigned_irq_data.flags |= KVM_DEV_IRQ_ASSIGN_ENABLE_MSI; r = kvm_assign_irq(kvm_context, &assigned_irq_data);
I've test the patchset with some userspace hack, it works well.
Thanks!
--
regards
Yang, Sheng
Quoted 7 lines · Sheng Yang
Hi, Avi
This patchset enable MSI support for KVM VT-d.
And here are only kernel space ones. The third patch would go to also goto x86 upstream.
Quoted 10 lines
The userspace code would looks like this:
assigned_irq_data.guest_msi_addr = *(uint32_t *)(d->msi_cap + 4); assigned_irq_data.guest_msi_data = *(uint16_t *)(d->msi_cap + 8); assigned_irq_data.flags |=
KVM_DEV_IRQ_ASSIGN_ENABLE_MSI; r =kvm_assign_irq(kvm_context, &assigned_irq_data);I've test the patchset with some userspace hack, it works well.
Can you resend this patch with all the updates, as well as the userspace changes?
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Sheng Yang
Hi, Avi
This patchset enable MSI support for KVM VT-d.
And here are only kernel space ones. The third patch would go to also goto x86 upstream.
The userspace code would looks like this:
assigned_irq_data.guest_msi_addr = *(uint32_t *)(d->msi_cap + 4); assigned_irq_data.guest_msi_data = *(uint16_t *)(d->msi_cap + 8); assigned_irq_data.flags |=
KVM_DEV_IRQ_ASSIGN_ENABLE_MSI; r =kvm_assign_irq(kvm_context, &assigned_irq_data);
Quoted 6 lines
Quoted 3 lines
I've test the patchset with some userspace hack, it works well.
Can you resend this patch with all the updates, as well as the userspace changes?
Maybe Sheng need to make it work on kvm/ia64, and at least the changes can't break ia64 side.
Xiantao
Quoted 2 lines
--
error compilingcommittee.c: too many arguments to function
Quoted 16 lines · Xiantao
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Sheng Yang
Hi, Avi
This patchset enable MSI support for KVM VT-d.
And here are only kernel space ones. The third patch would go to also goto x86 upstream.
The userspace code would looks like this:
assigned_irq_data.guest_msi_addr = *(uint32_t *)(d->msi_cap + 4); assigned_irq_data.guest_msi_data = *(uint16_t *)(d->msi_cap + 8); assigned_irq_data.flags |=
KVM_DEV_IRQ_ASSIGN_ENABLE_MSI; r =kvm_assign_irq(kvm_context, &assigned_irq_data);
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I've test the patchset with some userspace hack, it works well.
Can you resend this patch with all the updates, as well as the userspace changes?
Maybe Sheng need to make it work on kvm/ia64, and at least the changes can't break ia64 side. Xiantao
Yes, I would ensure that won't break ia64. I would repost the patchset soon.
But Avi, for the userspace, the Amit's patch still not checked in, so I haven't written a complete version because of lacking code base. I only got a experiment patch by hand, expose MSI cap to guest and enable MSI when guest wrote MSI enable bit. Well, I prefer to give you a complete version after Amit's patch is there. (I will conclude the change of userspace in the first mail).
--
regards
Yang, Sheng