All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: <kvmarm@lists.linux.dev>, <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <oliver.upton@linux.dev>,
	<james.morse@arm.com>, <suzuki.poulose@arm.com>,
	<wanghaibin.wang@huawei.com>
Subject: Re: [PATCH] KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI
Date: Wed, 07 Aug 2024 11:01:17 +0100	[thread overview]
Message-ID: <86cymk3b4i.wl-maz@kernel.org> (raw)
In-Reply-To: <20240807052024.2084-1-yuzenghui@huawei.com>

On Wed, 07 Aug 2024 06:20:24 +0100,
Zenghui Yu <yuzenghui@huawei.com> wrote:
> 
> In case the guest doesn't have any LPI, we previously relied on the
> iterator setting
> 
> 	'intid = nr_spis + VGIC_NR_PRIVATE_IRQS' && 'lpi_idx = 1'
> 
> to exit the iterator. But it was broken with commit 85d3ccc8b75b ("KVM:
> arm64: vgic-debug: Use an xarray mark for debug iterator") -- the intid
> remains at 'nr_spis + VGIC_NR_PRIVATE_IRQS - 1', and we end up endlessly
> printing the last SPI's state.
> 
> Consider that it's meaningless to search the LPI xarray and populate
> lpi_idx when there is no LPI, let's just skip the process for that case.
> 
> The result is that
> 
> * If there's no LPI, we focus on the intid and exit the iterator when it
>   runs out of the valid SPI range.
> * Otherwise we keep the current logic and let the xarray drive the
>   iterator.
> 
> Fixes: 85d3ccc8b75b ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator")
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

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

  reply	other threads:[~2024-08-07 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  5:20 [PATCH] KVM: arm64: vgic-debug: Exit the iterator properly w/o LPI Zenghui Yu
2024-08-07 10:01 ` Marc Zyngier [this message]
2024-08-08 17:07 ` Oliver Upton

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=86cymk3b4i.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=wanghaibin.wang@huawei.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.