All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Zhiyuan Dai <daizhiyuan@phytium.com.cn>
Cc: oliver.upton@linux.dev, catalin.marinas@arm.com,
	joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com,
	kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: vgic: Update some comments to improve the code readability
Date: Wed, 08 Jan 2025 10:58:16 +0000	[thread overview]
Message-ID: <86y0zlwp13.wl-maz@kernel.org> (raw)
In-Reply-To: <20250108103919.66572-1-daizhiyuan@phytium.com.cn>

[Fixing Suzuki's address]
On Wed, 08 Jan 2025 10:39:19 +0000,
Zhiyuan Dai <daizhiyuan@phytium.com.cn> wrote:
> 
> This patch updates the comments in the vgic_v3_queue_sgi function
> to improve the readability of the code.
> 
> Signed-off-by: Zhiyuan Dai <daizhiyuan@phytium.com.cn>
> ---
>  arch/arm64/kvm/vgic/vgic-mmio-v3.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio-v3.c
> index ae4c0593d114..f3b328373869 100644
> --- a/arch/arm64/kvm/vgic/vgic-mmio-v3.c
> +++ b/arch/arm64/kvm/vgic/vgic-mmio-v3.c
> @@ -1040,8 +1040,13 @@ static void vgic_v3_queue_sgi(struct kvm_vcpu *vcpu, u32 sgi, bool allow_group1)
>  			irq->pending_latch = true;
>  			vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
>  		} else {
> -			/* HW SGI? Ask the GIC to inject it */
>  			int err;
> +
> +			/*
> +                        * With GICv4.1, vSGI can be directly injected.
> +                        * So let's pretend that they are HW interrupts,
> +                        * tied to a host IRQ.
> +                        */
>  			err = irq_set_irqchip_state(irq->host_irq,
>  						    IRQCHIP_STATE_PENDING,
>  						    true);

Do you really see this as an improvement? I don't think we need to
paraphrase the code, which is pretty obvious. If anything, I'd happily
remove the *existing* comment.

	M.

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

      reply	other threads:[~2025-01-08 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 10:39 [PATCH] KVM: arm64: vgic: Update some comments to improve the code readability Zhiyuan Dai
2025-01-08 10:58 ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86y0zlwp13.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=daizhiyuan@phytium.com.cn \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.