Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1173908
| From | Eric Auger <eric.auger@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/7] KVM: irqchip: convey devid to kvm_set_msi |
| Date | 2015-06-29 17:50 +0200 |
| Message-ID | <pGJtM-7jc-19@gated-at.bofh.it> (permalink) |
| References | <pGJk6-77K-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
on ARM, a devid field is conveyed in kvm_msi struct. Let's choose the
routing type and struct according to its availability and fill the
corresponding struct. Also remove the flag check now this latter can
be non null.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
virt/kvm/irqchip.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
index 1d56a90..e76c7d2 100644
--- a/virt/kvm/irqchip.c
+++ b/virt/kvm/irqchip.c
@@ -73,12 +73,22 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi)
{
struct kvm_kernel_irq_routing_entry route;
- if (!irqchip_in_kernel(kvm) || msi->flags != 0)
+ if (!irqchip_in_kernel(kvm))
return -EINVAL;
- route.msi.address_lo = msi->address_lo;
- route.msi.address_hi = msi->address_hi;
- route.msi.data = msi->data;
+ if (msi->flags & KVM_MSI_VALID_DEVID) {
+ route.type = KVM_IRQ_ROUTING_EXTENDED_MSI;
+ route.ext_msi.address_lo = msi->address_lo;
+ route.ext_msi.address_hi = msi->address_hi;
+ route.ext_msi.data = msi->data;
+ route.ext_msi.devid= msi->devid;
+ }
+ else {
+ route.type = KVM_IRQ_ROUTING_MSI;
+ route.msi.address_lo = msi->address_lo;
+ route.msi.address_hi = msi->address_hi;
+ route.msi.data = msi->data;
+ }
return kvm_set_msi(&route, kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 1, false);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/7] KVM: arm/arm64: gsi routing support Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
[PATCH 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
[PATCH 2/7] KVM: kvm_host: add kvm_extended_msi Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
[PATCH 5/7] KVM: arm/arm64: build a default routing table Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
[PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
RE: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Pavel Fedin <p.fedin@samsung.com> - 2015-07-02 10:50 +0200
RE: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Pavel Fedin <p.fedin@samsung.com> - 2015-07-03 17:30 +0200
Re: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Eric Auger <eric.auger@linaro.org> - 2015-07-03 17:50 +0200
Re: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Andre Przywara <andre.przywara@arm.com> - 2015-07-03 18:00 +0200
Re: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Andre Przywara <andre.przywara@arm.com> - 2015-07-07 12:10 +0200
RE: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi Pavel Fedin <p.fedin@samsung.com> - 2015-07-07 13:00 +0200
[PATCH 6/7] KVM: arm/arm64: enable MSI routing Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:40 +0200
[PATCH 3/7] KVM: irqchip: convey devid to kvm_set_msi Eric Auger <eric.auger@linaro.org> - 2015-06-29 17:50 +0200
csiph-web