[PATCH v3 1/2] Documentation: KVM: Document KVM_GUESTDBG_USE_HW control flag for arm64

Marc Zyngier maz at kernel.org
Wed Apr 7 16:50:23 BST 2021


On Wed, 07 Apr 2021 15:48:56 +0100,
Alexandru Elisei <alexandru.elisei at arm.com> wrote:
> 
> Commit 21b6f32f9471 ("KVM: arm64: guest debug, define API headers") added
> the arm64 KVM_GUESTDBG_USE_HW flag for the KVM_SET_GUEST_DEBUG ioctl and
> commit 834bf88726f0 ("KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG")
> documented and implemented the flag functionality. Since its introduction,
> at no point was the flag known by any name other than KVM_GUESTDBG_USE_HW
> for the arm64 architecture, so refer to it as such in the documentation.
> 
> CC: Paolo Bonzini <pbonzini at redhat.com>
> Signed-off-by: Alexandru Elisei <alexandru.elisei at arm.com>
> ---
>  Documentation/virt/kvm/api.rst | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 307f2fcf1b02..ffe15e02caca 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -3335,7 +3335,8 @@ The top 16 bits of the control field are architecture specific control
>  flags which can include the following:
>  
>    - KVM_GUESTDBG_USE_SW_BP:     using software breakpoints [x86, arm64]
> -  - KVM_GUESTDBG_USE_HW_BP:     using hardware breakpoints [x86, s390, arm64]
> +  - KVM_GUESTDBG_USE_HW_BP:     using hardware breakpoints [x86, s390]
> +  - KVM_GUESTDBG_USE_HW:        using hardware debug events [arm64]
>    - KVM_GUESTDBG_INJECT_DB:     inject DB type exception [x86]
>    - KVM_GUESTDBG_INJECT_BP:     inject BP type exception [x86]
>    - KVM_GUESTDBG_EXIT_PENDING:  trigger an immediate guest exit [s390]

Huh, nice catch. I wonder why we had that difference. It clearly
wasn't intentional. Eventually, we probably should introduce the same
definition for arm64, and keep the old one as an unfortunate legacy.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list