All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
@ 2015-04-10  7:48 ` Eric Auger
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, christoffer.dall, patches

After the introduction of gicv2m, this series adds missing pieces to
run VIRTIO-PCI with vhost back-end on ARM.

It is proposed to use the kvm_gsi_direct_mapping modality that sets
the irqfd gsi to the MSI data value. With that trick there is no need
to create a KVM MSI routing entry featuring a different gsi.

The only adaptation needed for ARM consists in adding an architecture
specific function that converts the MSI data field into the actual
gsi index: there is an offset of 32 between the MSI data content
(SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
this is done we can set the requested flags to enable vhost:
kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.

This was tested on XGene, on top of Christoffer's series,
[PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
(https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)

Best Regards

Eric

v1 -> v2:
- abort on i386/mips/s390x since those archs do not support
  kvm_gsi_direct_mapping


Eric Auger (2):
  kvm: introduce kvm_arch_msi_data_to_gsi
  arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed

 hw/intc/arm_gicv2m.c | 2 ++
 include/sysemu/kvm.h | 2 ++
 kvm-all.c            | 2 +-
 target-arm/kvm.c     | 5 +++++
 target-i386/kvm.c    | 5 +++++
 target-mips/kvm.c    | 5 +++++
 target-ppc/kvm.c     | 5 +++++
 target-s390x/kvm.c   | 5 +++++
 8 files changed, 30 insertions(+), 1 deletion(-)

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
@ 2015-04-10  7:48 ` Eric Auger
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, patches

After the introduction of gicv2m, this series adds missing pieces to
run VIRTIO-PCI with vhost back-end on ARM.

It is proposed to use the kvm_gsi_direct_mapping modality that sets
the irqfd gsi to the MSI data value. With that trick there is no need
to create a KVM MSI routing entry featuring a different gsi.

The only adaptation needed for ARM consists in adding an architecture
specific function that converts the MSI data field into the actual
gsi index: there is an offset of 32 between the MSI data content
(SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
this is done we can set the requested flags to enable vhost:
kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.

This was tested on XGene, on top of Christoffer's series,
[PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
(https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)

Best Regards

Eric

v1 -> v2:
- abort on i386/mips/s390x since those archs do not support
  kvm_gsi_direct_mapping


Eric Auger (2):
  kvm: introduce kvm_arch_msi_data_to_gsi
  arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed

 hw/intc/arm_gicv2m.c | 2 ++
 include/sysemu/kvm.h | 2 ++
 kvm-all.c            | 2 +-
 target-arm/kvm.c     | 5 +++++
 target-i386/kvm.c    | 5 +++++
 target-mips/kvm.c    | 5 +++++
 target-ppc/kvm.c     | 5 +++++
 target-s390x/kvm.c   | 5 +++++
 8 files changed, 30 insertions(+), 1 deletion(-)

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
  2015-04-10  7:48 ` Eric Auger
@ 2015-04-10  7:48   ` Eric Auger
  -1 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, christoffer.dall, patches

On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
matching the gsi, an architecture specific function is introduced.

Signed-off-by: Eric Auger <eric.auger@linaro.org>

---

v1 -> v2:
- abort on i386/mips/s390x since those archs do not support
  kvm_gsi_direct_mapping
---
 include/sysemu/kvm.h | 2 ++
 kvm-all.c            | 2 +-
 target-arm/kvm.c     | 5 +++++
 target-i386/kvm.c    | 5 +++++
 target-mips/kvm.c    | 5 +++++
 target-ppc/kvm.c     | 5 +++++
 target-s390x/kvm.c   | 5 +++++
 7 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 197e6c0..ebd8b17 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -286,6 +286,8 @@ void kvm_arch_init_irq_routing(KVMState *s);
 int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
                              uint64_t address, uint32_t data);
 
+int kvm_arch_msi_data_to_gsi(uint32_t data);
+
 int kvm_set_irq(KVMState *s, int irq, int level);
 int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg);
 
diff --git a/kvm-all.c b/kvm-all.c
index dd44f8c..3e9675e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1228,7 +1228,7 @@ int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
     int virq;
 
     if (kvm_gsi_direct_mapping()) {
-        return msg.data & 0xffff;
+        return kvm_arch_msi_data_to_gsi(msg.data);
     }
 
     if (!kvm_gsi_routing_enabled()) {
diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index fdd9ba3..05d5634 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -598,3 +598,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    return (data - 32) & 0xffff;
+}
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 41d09e5..a832328 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2764,3 +2764,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
diff --git a/target-mips/kvm.c b/target-mips/kvm.c
index 4d1f7ea..09eb8f9 100644
--- a/target-mips/kvm.c
+++ b/target-mips/kvm.c
@@ -694,3 +694,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 12328a4..53569f6 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -2408,3 +2408,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    return data & 0xffff;
+}
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index b48c643..5911a38 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -1940,3 +1940,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
     route->u.adapter.adapter_id = pbdev->routes.adapter.adapter_id;
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
@ 2015-04-10  7:48   ` Eric Auger
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, patches

On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
matching the gsi, an architecture specific function is introduced.

Signed-off-by: Eric Auger <eric.auger@linaro.org>

---

v1 -> v2:
- abort on i386/mips/s390x since those archs do not support
  kvm_gsi_direct_mapping
---
 include/sysemu/kvm.h | 2 ++
 kvm-all.c            | 2 +-
 target-arm/kvm.c     | 5 +++++
 target-i386/kvm.c    | 5 +++++
 target-mips/kvm.c    | 5 +++++
 target-ppc/kvm.c     | 5 +++++
 target-s390x/kvm.c   | 5 +++++
 7 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 197e6c0..ebd8b17 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -286,6 +286,8 @@ void kvm_arch_init_irq_routing(KVMState *s);
 int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
                              uint64_t address, uint32_t data);
 
+int kvm_arch_msi_data_to_gsi(uint32_t data);
+
 int kvm_set_irq(KVMState *s, int irq, int level);
 int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg);
 
diff --git a/kvm-all.c b/kvm-all.c
index dd44f8c..3e9675e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1228,7 +1228,7 @@ int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
     int virq;
 
     if (kvm_gsi_direct_mapping()) {
-        return msg.data & 0xffff;
+        return kvm_arch_msi_data_to_gsi(msg.data);
     }
 
     if (!kvm_gsi_routing_enabled()) {
diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index fdd9ba3..05d5634 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -598,3 +598,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    return (data - 32) & 0xffff;
+}
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 41d09e5..a832328 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2764,3 +2764,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
diff --git a/target-mips/kvm.c b/target-mips/kvm.c
index 4d1f7ea..09eb8f9 100644
--- a/target-mips/kvm.c
+++ b/target-mips/kvm.c
@@ -694,3 +694,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index 12328a4..53569f6 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -2408,3 +2408,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
 {
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    return data & 0xffff;
+}
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index b48c643..5911a38 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -1940,3 +1940,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
     route->u.adapter.adapter_id = pbdev->routes.adapter.adapter_id;
     return 0;
 }
+
+int kvm_arch_msi_data_to_gsi(uint32_t data)
+{
+    abort();
+}
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Qemu-devel] [PATCH v2 2/2] arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed
  2015-04-10  7:48 ` Eric Auger
@ 2015-04-10  7:48   ` Eric Auger
  -1 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, christoffer.dall, patches

After introduction of kvm_arch_msi_data_to_gsi, kvm_gsi_direct_mapping
now can be set on ARM. Also kvm_msi_via_irqfd_allowed can be set,
depending on kernel irqfd support, hence enabling VIRTIO-PCI with
vhost back-end.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
 hw/intc/arm_gicv2m.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
index a80a16d..7c6bea2 100644
--- a/hw/intc/arm_gicv2m.c
+++ b/hw/intc/arm_gicv2m.c
@@ -138,6 +138,8 @@ static void gicv2m_realize(DeviceState *dev, Error **errp)
     }
 
     msi_supported = true;
+    kvm_gsi_direct_mapping = true;
+    kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
 }
 
 static void gicv2m_init(Object *obj)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed
@ 2015-04-10  7:48   ` Eric Auger
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Auger @ 2015-04-10  7:48 UTC (permalink / raw)
  To: eric.auger, eric.auger, qemu-devel, pbonzini, peter.maydell,
	cornelia.huck, borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, patches

After introduction of kvm_arch_msi_data_to_gsi, kvm_gsi_direct_mapping
now can be set on ARM. Also kvm_msi_via_irqfd_allowed can be set,
depending on kernel irqfd support, hence enabling VIRTIO-PCI with
vhost back-end.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
 hw/intc/arm_gicv2m.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
index a80a16d..7c6bea2 100644
--- a/hw/intc/arm_gicv2m.c
+++ b/hw/intc/arm_gicv2m.c
@@ -138,6 +138,8 @@ static void gicv2m_realize(DeviceState *dev, Error **errp)
     }
 
     msi_supported = true;
+    kvm_gsi_direct_mapping = true;
+    kvm_msi_via_irqfd_allowed = kvm_irqfds_enabled();
 }
 
 static void gicv2m_init(Object *obj)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
  2015-04-10  7:48 ` Eric Auger
@ 2015-04-10  8:15   ` Paolo Bonzini
  -1 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2015-04-10  8:15 UTC (permalink / raw)
  To: Eric Auger, eric.auger, qemu-devel, peter.maydell, cornelia.huck,
	borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, christoffer.dall, patches



On 10/04/2015 09:48, Eric Auger wrote:
> After the introduction of gicv2m, this series adds missing pieces to
> run VIRTIO-PCI with vhost back-end on ARM.
> 
> It is proposed to use the kvm_gsi_direct_mapping modality that sets
> the irqfd gsi to the MSI data value. With that trick there is no need
> to create a KVM MSI routing entry featuring a different gsi.
> 
> The only adaptation needed for ARM consists in adding an architecture
> specific function that converts the MSI data field into the actual
> gsi index: there is an offset of 32 between the MSI data content
> (SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
> this is done we can set the requested flags to enable vhost:
> kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.
> 
> This was tested on XGene, on top of Christoffer's series,
> [PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
> (https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)
> 
> Best Regards
> 
> Eric
> 
> v1 -> v2:
> - abort on i386/mips/s390x since those archs do not support
>   kvm_gsi_direct_mapping

Patch 1 is okay.  I guess this series will go through some ARM tree.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
@ 2015-04-10  8:15   ` Paolo Bonzini
  0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2015-04-10  8:15 UTC (permalink / raw)
  To: Eric Auger, eric.auger, qemu-devel, peter.maydell, cornelia.huck,
	borntraeger, agraf, james.hogan
  Cc: aik, kvmarm, patches



On 10/04/2015 09:48, Eric Auger wrote:
> After the introduction of gicv2m, this series adds missing pieces to
> run VIRTIO-PCI with vhost back-end on ARM.
> 
> It is proposed to use the kvm_gsi_direct_mapping modality that sets
> the irqfd gsi to the MSI data value. With that trick there is no need
> to create a KVM MSI routing entry featuring a different gsi.
> 
> The only adaptation needed for ARM consists in adding an architecture
> specific function that converts the MSI data field into the actual
> gsi index: there is an offset of 32 between the MSI data content
> (SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
> this is done we can set the requested flags to enable vhost:
> kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.
> 
> This was tested on XGene, on top of Christoffer's series,
> [PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
> (https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)
> 
> Best Regards
> 
> Eric
> 
> v1 -> v2:
> - abort on i386/mips/s390x since those archs do not support
>   kvm_gsi_direct_mapping

Patch 1 is okay.  I guess this series will go through some ARM tree.

Paolo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
  2015-04-10  7:48   ` Eric Auger
@ 2015-04-10  9:10     ` Christoffer Dall
  -1 siblings, 0 replies; 14+ messages in thread
From: Christoffer Dall @ 2015-04-10  9:10 UTC (permalink / raw)
  To: Eric Auger
  Cc: peter.maydell, james.hogan, eric.auger, patches, aik, qemu-devel,
	agraf, borntraeger, cornelia.huck, pbonzini, kvmarm

On Fri, Apr 10, 2015 at 08:48:09AM +0100, Eric Auger wrote:
> On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
> ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
> matching the gsi, an architecture specific function is introduced.
> 
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> 
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
@ 2015-04-10  9:10     ` Christoffer Dall
  0 siblings, 0 replies; 14+ messages in thread
From: Christoffer Dall @ 2015-04-10  9:10 UTC (permalink / raw)
  To: Eric Auger
  Cc: james.hogan, eric.auger, patches, aik, qemu-devel, borntraeger,
	cornelia.huck, pbonzini, kvmarm

On Fri, Apr 10, 2015 at 08:48:09AM +0100, Eric Auger wrote:
> On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
> ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
> matching the gsi, an architecture specific function is introduced.
> 
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> 
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
  2015-04-10  7:48   ` Eric Auger
@ 2015-04-10 10:50     ` Cornelia Huck
  -1 siblings, 0 replies; 14+ messages in thread
From: Cornelia Huck @ 2015-04-10 10:50 UTC (permalink / raw)
  To: Eric Auger
  Cc: peter.maydell, james.hogan, eric.auger, patches, aik, agraf,
	qemu-devel, borntraeger, pbonzini, kvmarm, christoffer.dall

On Fri, 10 Apr 2015 08:48:09 +0100
Eric Auger <eric.auger@linaro.org> wrote:

> On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
> ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
> matching the gsi, an architecture specific function is introduced.
> 
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> 
> ---
> 
> v1 -> v2:
> - abort on i386/mips/s390x since those archs do not support
>   kvm_gsi_direct_mapping
> ---
>  include/sysemu/kvm.h | 2 ++
>  kvm-all.c            | 2 +-
>  target-arm/kvm.c     | 5 +++++
>  target-i386/kvm.c    | 5 +++++
>  target-mips/kvm.c    | 5 +++++
>  target-ppc/kvm.c     | 5 +++++
>  target-s390x/kvm.c   | 5 +++++
>  7 files changed, 28 insertions(+), 1 deletion(-)

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi
@ 2015-04-10 10:50     ` Cornelia Huck
  0 siblings, 0 replies; 14+ messages in thread
From: Cornelia Huck @ 2015-04-10 10:50 UTC (permalink / raw)
  To: Eric Auger
  Cc: james.hogan, eric.auger, patches, aik, qemu-devel, borntraeger,
	pbonzini, kvmarm

On Fri, 10 Apr 2015 08:48:09 +0100
Eric Auger <eric.auger@linaro.org> wrote:

> On ARM the MSI data corresponds to the shared peripheral interrupt (SPI)
> ID. This latter equals to the SPI index + 32. to retrieve the SPI index,
> matching the gsi, an architecture specific function is introduced.
> 
> Signed-off-by: Eric Auger <eric.auger@linaro.org>
> 
> ---
> 
> v1 -> v2:
> - abort on i386/mips/s390x since those archs do not support
>   kvm_gsi_direct_mapping
> ---
>  include/sysemu/kvm.h | 2 ++
>  kvm-all.c            | 2 +-
>  target-arm/kvm.c     | 5 +++++
>  target-i386/kvm.c    | 5 +++++
>  target-mips/kvm.c    | 5 +++++
>  target-ppc/kvm.c     | 5 +++++
>  target-s390x/kvm.c   | 5 +++++
>  7 files changed, 28 insertions(+), 1 deletion(-)

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
  2015-04-10  8:15   ` Paolo Bonzini
@ 2015-06-01 18:28     ` Peter Maydell
  -1 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2015-06-01 18:28 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: James Hogan, eric.auger, Eric Auger, Alexey Kardashevskiy,
	Patch Tracking, Alexander Graf, QEMU Developers,
	Christian Borntraeger, Cornelia Huck, kvmarm, Christoffer Dall

On 10 April 2015 at 09:15, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 10/04/2015 09:48, Eric Auger wrote:
>> After the introduction of gicv2m, this series adds missing pieces to
>> run VIRTIO-PCI with vhost back-end on ARM.
>>
>> It is proposed to use the kvm_gsi_direct_mapping modality that sets
>> the irqfd gsi to the MSI data value. With that trick there is no need
>> to create a KVM MSI routing entry featuring a different gsi.
>>
>> The only adaptation needed for ARM consists in adding an architecture
>> specific function that converts the MSI data field into the actual
>> gsi index: there is an offset of 32 between the MSI data content
>> (SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
>> this is done we can set the requested flags to enable vhost:
>> kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.
>>
>> This was tested on XGene, on top of Christoffer's series,
>> [PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
>> (https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)
>>
>> Best Regards
>>
>> Eric
>>
>> v1 -> v2:
>> - abort on i386/mips/s390x since those archs do not support
>>   kvm_gsi_direct_mapping
>
> Patch 1 is okay.  I guess this series will go through some ARM tree.

Now that I've applied the gicv2m patches I've also applied this
series to target-arm.next.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/2] ARM adaptations for vhost irqfd setup
@ 2015-06-01 18:28     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2015-06-01 18:28 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: James Hogan, eric.auger, Alexey Kardashevskiy, Patch Tracking,
	QEMU Developers, Christian Borntraeger, Cornelia Huck, kvmarm

On 10 April 2015 at 09:15, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 10/04/2015 09:48, Eric Auger wrote:
>> After the introduction of gicv2m, this series adds missing pieces to
>> run VIRTIO-PCI with vhost back-end on ARM.
>>
>> It is proposed to use the kvm_gsi_direct_mapping modality that sets
>> the irqfd gsi to the MSI data value. With that trick there is no need
>> to create a KVM MSI routing entry featuring a different gsi.
>>
>> The only adaptation needed for ARM consists in adding an architecture
>> specific function that converts the MSI data field into the actual
>> gsi index: there is an offset of 32 between the MSI data content
>> (SPI ID) and the SPI index that is passed to KVM_IRQFD ioctl. Once
>> this is done we can set the requested flags to enable vhost:
>> kvm_gsi_direct_mapping, kvm_msi_via_irqfd_allowed.
>>
>> This was tested on XGene, on top of Christoffer's series,
>> [PATCH 0/3] Add support for for GICv2m and MSIs to arm-virt
>> (https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00881.html)
>>
>> Best Regards
>>
>> Eric
>>
>> v1 -> v2:
>> - abort on i386/mips/s390x since those archs do not support
>>   kvm_gsi_direct_mapping
>
> Patch 1 is okay.  I guess this series will go through some ARM tree.

Now that I've applied the gicv2m patches I've also applied this
series to target-arm.next.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-06-01 18:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10  7:48 [Qemu-devel] [PATCH v2 0/2] ARM adaptations for vhost irqfd setup Eric Auger
2015-04-10  7:48 ` Eric Auger
2015-04-10  7:48 ` [Qemu-devel] [PATCH v2 1/2] kvm: introduce kvm_arch_msi_data_to_gsi Eric Auger
2015-04-10  7:48   ` Eric Auger
2015-04-10  9:10   ` [Qemu-devel] " Christoffer Dall
2015-04-10  9:10     ` Christoffer Dall
2015-04-10 10:50   ` [Qemu-devel] " Cornelia Huck
2015-04-10 10:50     ` Cornelia Huck
2015-04-10  7:48 ` [Qemu-devel] [PATCH v2 2/2] arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed Eric Auger
2015-04-10  7:48   ` Eric Auger
2015-04-10  8:15 ` [Qemu-devel] [PATCH v2 0/2] ARM adaptations for vhost irqfd setup Paolo Bonzini
2015-04-10  8:15   ` Paolo Bonzini
2015-06-01 18:28   ` [Qemu-devel] " Peter Maydell
2015-06-01 18:28     ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.