All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 11:10 ` Andre Przywara
  0 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2016-08-02 11:10 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier; +Cc: linux-arm-kernel, kvmarm, kvm

According to the KVM API documentation a successful MSI injection
should return a value > 0 on success.
Since we pass the return value of vgic_its_inject_msi() directly on
to upper layers and userland, we need to use the same semantics here.
Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Applies on top of next-20160728. Let me know if I should use a
different base.

Cheers,
Andre.

 virt/kvm/arm/vgic/vgic-its.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 07411cf..3268250 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
  * Queries the KVM IO bus framework to get the ITS pointer from the given
  * doorbell address.
  * We then call vgic_its_trigger_msi() with the decoded data.
+ * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
  */
 int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
 {
@@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
 	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
 	mutex_unlock(&iodev->its->its_lock);
 
-	return 0;
+	return 1;
 }
 
 /* Requires the its_lock to be held. */
-- 
2.9.0

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

* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 11:10 ` Andre Przywara
  0 siblings, 0 replies; 10+ messages in thread
From: Andre Przywara @ 2016-08-02 11:10 UTC (permalink / raw)
  To: linux-arm-kernel

According to the KVM API documentation a successful MSI injection
should return a value > 0 on success.
Since we pass the return value of vgic_its_inject_msi() directly on
to upper layers and userland, we need to use the same semantics here.
Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Applies on top of next-20160728. Let me know if I should use a
different base.

Cheers,
Andre.

 virt/kvm/arm/vgic/vgic-its.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 07411cf..3268250 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
  * Queries the KVM IO bus framework to get the ITS pointer from the given
  * doorbell address.
  * We then call vgic_its_trigger_msi() with the decoded data.
+ * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
  */
 int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
 {
@@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
 	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
 	mutex_unlock(&iodev->its->its_lock);
 
-	return 0;
+	return 1;
 }
 
 /* Requires the its_lock to be held. */
-- 
2.9.0

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

* Re: [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
  2016-08-02 11:10 ` Andre Przywara
@ 2016-08-02 11:45   ` Marc Zyngier
  -1 siblings, 0 replies; 10+ messages in thread
From: Marc Zyngier @ 2016-08-02 11:45 UTC (permalink / raw)
  To: Andre Przywara, Christoffer Dall; +Cc: linux-arm-kernel, kvmarm, kvm

On 02/08/16 12:10, Andre Przywara wrote:
> According to the KVM API documentation a successful MSI injection
> should return a value > 0 on success.
> Since we pass the return value of vgic_its_inject_msi() directly on
> to upper layers and userland, we need to use the same semantics here.
> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Applies on top of next-20160728. Let me know if I should use a
> different base.
> 
> Cheers,
> Andre.
> 
>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 07411cf..3268250 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>   * doorbell address.
>   * We then call vgic_its_trigger_msi() with the decoded data.
> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>   */
>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  {
> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>  	mutex_unlock(&iodev->its->its_lock);
>  
> -	return 0;
> +	return 1;

Really? And what if:
- ITS is not enabled?
- or no ITTE?
- or collection not mapped?
- or LPIs not enabled?

These are the tests performed by vgic_its_trigger_msi(), so maybe you
show make this function return something useful, and propagate the value
to userspace instead of blindly returning 1?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 11:45   ` Marc Zyngier
  0 siblings, 0 replies; 10+ messages in thread
From: Marc Zyngier @ 2016-08-02 11:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/08/16 12:10, Andre Przywara wrote:
> According to the KVM API documentation a successful MSI injection
> should return a value > 0 on success.
> Since we pass the return value of vgic_its_inject_msi() directly on
> to upper layers and userland, we need to use the same semantics here.
> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Applies on top of next-20160728. Let me know if I should use a
> different base.
> 
> Cheers,
> Andre.
> 
>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 07411cf..3268250 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>   * doorbell address.
>   * We then call vgic_its_trigger_msi() with the decoded data.
> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>   */
>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  {
> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>  	mutex_unlock(&iodev->its->its_lock);
>  
> -	return 0;
> +	return 1;

Really? And what if:
- ITS is not enabled?
- or no ITTE?
- or collection not mapped?
- or LPIs not enabled?

These are the tests performed by vgic_its_trigger_msi(), so maybe you
show make this function return something useful, and propagate the value
to userspace instead of blindly returning 1?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
  2016-08-02 11:10 ` Andre Przywara
@ 2016-08-02 12:23   ` Christoffer Dall
  -1 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2016-08-02 12:23 UTC (permalink / raw)
  To: Andre Przywara; +Cc: Marc Zyngier, kvmarm, kvm, linux-arm-kernel

On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
> According to the KVM API documentation a successful MSI injection
> should return a value > 0 on success.
> Since we pass the return value of vgic_its_inject_msi() directly on
> to upper layers and userland, we need to use the same semantics here.
> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Applies on top of next-20160728. Let me know if I should use a
> different base.
> 
> Cheers,
> Andre.
> 
>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 07411cf..3268250 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>   * doorbell address.
>   * We then call vgic_its_trigger_msi() with the decoded data.
> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>   */
>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  {
> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>  	mutex_unlock(&iodev->its->its_lock);
>  
> -	return 0;
> +	return 1;
>  }
>  
>  /* Requires the its_lock to be held. */

Do we have a clear understanding of what 'guest blocked the MSI'
constitutes in the ARM world?

Thanks,
-Christoffer

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

* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 12:23   ` Christoffer Dall
  0 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2016-08-02 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
> According to the KVM API documentation a successful MSI injection
> should return a value > 0 on success.
> Since we pass the return value of vgic_its_inject_msi() directly on
> to upper layers and userland, we need to use the same semantics here.
> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Applies on top of next-20160728. Let me know if I should use a
> different base.
> 
> Cheers,
> Andre.
> 
>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 07411cf..3268250 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>   * doorbell address.
>   * We then call vgic_its_trigger_msi() with the decoded data.
> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>   */
>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  {
> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>  	mutex_unlock(&iodev->its->its_lock);
>  
> -	return 0;
> +	return 1;
>  }
>  
>  /* Requires the its_lock to be held. */

Do we have a clear understanding of what 'guest blocked the MSI'
constitutes in the ARM world?

Thanks,
-Christoffer

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

* Re: [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
  2016-08-02 12:23   ` Christoffer Dall
@ 2016-08-02 12:28     ` Marc Zyngier
  -1 siblings, 0 replies; 10+ messages in thread
From: Marc Zyngier @ 2016-08-02 12:28 UTC (permalink / raw)
  To: Christoffer Dall, Andre Przywara; +Cc: linux-arm-kernel, kvmarm, kvm

On 02/08/16 13:23, Christoffer Dall wrote:
> On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
>> According to the KVM API documentation a successful MSI injection
>> should return a value > 0 on success.
>> Since we pass the return value of vgic_its_inject_msi() directly on
>> to upper layers and userland, we need to use the same semantics here.
>> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>> Applies on top of next-20160728. Let me know if I should use a
>> different base.
>>
>> Cheers,
>> Andre.
>>
>>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
>> index 07411cf..3268250 100644
>> --- a/virt/kvm/arm/vgic/vgic-its.c
>> +++ b/virt/kvm/arm/vgic/vgic-its.c
>> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>>   * doorbell address.
>>   * We then call vgic_its_trigger_msi() with the decoded data.
>> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>>   */
>>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>>  {
>> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>>  	mutex_unlock(&iodev->its->its_lock);
>>  
>> -	return 0;
>> +	return 1;
>>  }
>>  
>>  /* Requires the its_lock to be held. */
> 
> Do we have a clear understanding of what 'guest blocked the MSI'
> constitutes in the ARM world?

I would define it as "the guest has not configured the ITS so that the
corresponding LPI could be successfully delivered". Which is any of the
conditions where the interrupt cannot make it into the pending table,
and is dropped on the floor.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 12:28     ` Marc Zyngier
  0 siblings, 0 replies; 10+ messages in thread
From: Marc Zyngier @ 2016-08-02 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/08/16 13:23, Christoffer Dall wrote:
> On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
>> According to the KVM API documentation a successful MSI injection
>> should return a value > 0 on success.
>> Since we pass the return value of vgic_its_inject_msi() directly on
>> to upper layers and userland, we need to use the same semantics here.
>> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>> Applies on top of next-20160728. Let me know if I should use a
>> different base.
>>
>> Cheers,
>> Andre.
>>
>>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
>> index 07411cf..3268250 100644
>> --- a/virt/kvm/arm/vgic/vgic-its.c
>> +++ b/virt/kvm/arm/vgic/vgic-its.c
>> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
>>   * Queries the KVM IO bus framework to get the ITS pointer from the given
>>   * doorbell address.
>>   * We then call vgic_its_trigger_msi() with the decoded data.
>> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
>>   */
>>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>>  {
>> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
>>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
>>  	mutex_unlock(&iodev->its->its_lock);
>>  
>> -	return 0;
>> +	return 1;
>>  }
>>  
>>  /* Requires the its_lock to be held. */
> 
> Do we have a clear understanding of what 'guest blocked the MSI'
> constitutes in the ARM world?

I would define it as "the guest has not configured the ITS so that the
corresponding LPI could be successfully delivered". Which is any of the
conditions where the interrupt cannot make it into the pending table,
and is dropped on the floor.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
  2016-08-02 12:28     ` Marc Zyngier
@ 2016-08-02 13:57       ` Christoffer Dall
  -1 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2016-08-02 13:57 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, Andre Przywara, kvmarm, kvm

On Tue, Aug 02, 2016 at 01:28:44PM +0100, Marc Zyngier wrote:
> On 02/08/16 13:23, Christoffer Dall wrote:
> > On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
> >> According to the KVM API documentation a successful MSI injection
> >> should return a value > 0 on success.
> >> Since we pass the return value of vgic_its_inject_msi() directly on
> >> to upper layers and userland, we need to use the same semantics here.
> >> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >> Applies on top of next-20160728. Let me know if I should use a
> >> different base.
> >>
> >> Cheers,
> >> Andre.
> >>
> >>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> >> index 07411cf..3268250 100644
> >> --- a/virt/kvm/arm/vgic/vgic-its.c
> >> +++ b/virt/kvm/arm/vgic/vgic-its.c
> >> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
> >>   * Queries the KVM IO bus framework to get the ITS pointer from the given
> >>   * doorbell address.
> >>   * We then call vgic_its_trigger_msi() with the decoded data.
> >> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
> >>   */
> >>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
> >>  {
> >> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
> >>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
> >>  	mutex_unlock(&iodev->its->its_lock);
> >>  
> >> -	return 0;
> >> +	return 1;
> >>  }
> >>  
> >>  /* Requires the its_lock to be held. */
> > 
> > Do we have a clear understanding of what 'guest blocked the MSI'
> > constitutes in the ARM world?
> 
> I would define it as "the guest has not configured the ITS so that the
> corresponding LPI could be successfully delivered". Which is any of the
> conditions where the interrupt cannot make it into the pending table,
> and is dropped on the floor.
> 
sounds good to me.

-Christoffer

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

* [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection
@ 2016-08-02 13:57       ` Christoffer Dall
  0 siblings, 0 replies; 10+ messages in thread
From: Christoffer Dall @ 2016-08-02 13:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 02, 2016 at 01:28:44PM +0100, Marc Zyngier wrote:
> On 02/08/16 13:23, Christoffer Dall wrote:
> > On Tue, Aug 02, 2016 at 12:10:58PM +0100, Andre Przywara wrote:
> >> According to the KVM API documentation a successful MSI injection
> >> should return a value > 0 on success.
> >> Since we pass the return value of vgic_its_inject_msi() directly on
> >> to upper layers and userland, we need to use the same semantics here.
> >> Briefly tested with QEMU and kvmtool on GICv3 hardware and the model.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >> Applies on top of next-20160728. Let me know if I should use a
> >> different base.
> >>
> >> Cheers,
> >> Andre.
> >>
> >>  virt/kvm/arm/vgic/vgic-its.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> >> index 07411cf..3268250 100644
> >> --- a/virt/kvm/arm/vgic/vgic-its.c
> >> +++ b/virt/kvm/arm/vgic/vgic-its.c
> >> @@ -468,6 +468,7 @@ static void vgic_its_trigger_msi(struct kvm *kvm, struct vgic_its *its,
> >>   * Queries the KVM IO bus framework to get the ITS pointer from the given
> >>   * doorbell address.
> >>   * We then call vgic_its_trigger_msi() with the decoded data.
> >> + * According to the KVM_SIGNAL_MSI API description returns > 0 on success.
> >>   */
> >>  int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
> >>  {
> >> @@ -493,7 +494,7 @@ int vgic_its_inject_msi(struct kvm *kvm, struct kvm_msi *msi)
> >>  	vgic_its_trigger_msi(kvm, iodev->its, msi->devid, msi->data);
> >>  	mutex_unlock(&iodev->its->its_lock);
> >>  
> >> -	return 0;
> >> +	return 1;
> >>  }
> >>  
> >>  /* Requires the its_lock to be held. */
> > 
> > Do we have a clear understanding of what 'guest blocked the MSI'
> > constitutes in the ARM world?
> 
> I would define it as "the guest has not configured the ITS so that the
> corresponding LPI could be successfully delivered". Which is any of the
> conditions where the interrupt cannot make it into the pending table,
> and is dropped on the floor.
> 
sounds good to me.

-Christoffer

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

end of thread, other threads:[~2016-08-02 13:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 11:10 [PATCH] KVM: arm64: ITS: return 1 on successful MSI injection Andre Przywara
2016-08-02 11:10 ` Andre Przywara
2016-08-02 11:45 ` Marc Zyngier
2016-08-02 11:45   ` Marc Zyngier
2016-08-02 12:23 ` Christoffer Dall
2016-08-02 12:23   ` Christoffer Dall
2016-08-02 12:28   ` Marc Zyngier
2016-08-02 12:28     ` Marc Zyngier
2016-08-02 13:57     ` Christoffer Dall
2016-08-02 13:57       ` Christoffer Dall

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.