diff mbox series

[1/2] KVM: arm64: Add undocumented return values for PMU device control group

Message ID 20200921130838.37296-2-alexandru.elisei@arm.com (mailing list archive)
State New, archived
Headers show
Series KVM: arm64: Documentation updates | expand

Commit Message

Alexandru Elisei Sept. 21, 2020, 1:08 p.m. UTC
KVM_ARM_VCPU_PMU_V3_IRQ returns -EFAULT if get_user() fails when reading
the interrupt number from kvm_device_attr.addr.

KVM_ARM_VCPU_PMU_V3_INIT returns the error value from kvm_vgic_set_owner().
kvm_arm_pmu_v3_init() checks that the vgic has been initialized and the
interrupt number is valid, but kvm_vgic_set_owner() can still return the
error code -EEXIST if another device has already claimed the interrupt.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 Documentation/virt/kvm/devices/vcpu.rst | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andrew Jones Sept. 21, 2020, 2:15 p.m. UTC | #1
On Mon, Sep 21, 2020 at 02:08:37PM +0100, Alexandru Elisei wrote:
> KVM_ARM_VCPU_PMU_V3_IRQ returns -EFAULT if get_user() fails when reading
> the interrupt number from kvm_device_attr.addr.
> 
> KVM_ARM_VCPU_PMU_V3_INIT returns the error value from kvm_vgic_set_owner().
> kvm_arm_pmu_v3_init() checks that the vgic has been initialized and the
> interrupt number is valid, but kvm_vgic_set_owner() can still return the
> error code -EEXIST if another device has already claimed the interrupt.
> 
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
>  Documentation/virt/kvm/devices/vcpu.rst | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/virt/kvm/devices/vcpu.rst b/Documentation/virt/kvm/devices/vcpu.rst
> index ca374d3fe085..96d6cf77cb1e 100644
> --- a/Documentation/virt/kvm/devices/vcpu.rst
> +++ b/Documentation/virt/kvm/devices/vcpu.rst
> @@ -25,6 +25,7 @@ Returns:
>  
>  	 =======  ========================================================
>  	 -EBUSY   The PMU overflow interrupt is already set
> +	 -EFAULT  Error reading interrupt number
>  	 -ENXIO   The overflow interrupt not set when attempting to get it
>  	 -ENODEV  PMUv3 not supported
>  	 -EINVAL  Invalid PMU overflow interrupt number supplied or
> @@ -45,6 +46,7 @@ all vcpus, while as an SPI it must be a separate number per vcpu.
>  Returns:
>  
>  	 =======  ======================================================
> +	 -EEXIST  Interrupt number already used
>  	 -ENODEV  PMUv3 not supported or GIC not initialized
>  	 -ENXIO   PMUv3 not properly configured or in-kernel irqchip not
>  		  configured as required prior to calling this attribute
> -- 
> 2.28.0
>

Reviewed-by: Andrew Jones <drjones@redhat.com>
diff mbox series

Patch

diff --git a/Documentation/virt/kvm/devices/vcpu.rst b/Documentation/virt/kvm/devices/vcpu.rst
index ca374d3fe085..96d6cf77cb1e 100644
--- a/Documentation/virt/kvm/devices/vcpu.rst
+++ b/Documentation/virt/kvm/devices/vcpu.rst
@@ -25,6 +25,7 @@  Returns:
 
 	 =======  ========================================================
 	 -EBUSY   The PMU overflow interrupt is already set
+	 -EFAULT  Error reading interrupt number
 	 -ENXIO   The overflow interrupt not set when attempting to get it
 	 -ENODEV  PMUv3 not supported
 	 -EINVAL  Invalid PMU overflow interrupt number supplied or
@@ -45,6 +46,7 @@  all vcpus, while as an SPI it must be a separate number per vcpu.
 Returns:
 
 	 =======  ======================================================
+	 -EEXIST  Interrupt number already used
 	 -ENODEV  PMUv3 not supported or GIC not initialized
 	 -ENXIO   PMUv3 not properly configured or in-kernel irqchip not
 		  configured as required prior to calling this attribute