From: Marc Zyngier <maz@kernel.org>
To: Kunkun Jiang <jiangkunkun@huawei.com>
Cc: Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
<eric.auger@redhat.com>, <linux-arm-kernel@lists.infradead.org>,
<kvmarm@lists.linux.dev>, <wanghaibin.wang@huawei.com>
Subject: Re: [PATCH] KVM: arm/arm64: GICv4: Do not perform an map to a mapped vLPI
Date: Thu, 16 Nov 2023 14:10:26 +0000 [thread overview]
Message-ID: <864jhl23hp.wl-maz@kernel.org> (raw)
In-Reply-To: <20231116125215.1812-1-jiangkunkun@huawei.com>
On Thu, 16 Nov 2023 12:52:15 +0000,
Kunkun Jiang <jiangkunkun@huawei.com> wrote:
>
> Before performing an unmap, let's check whether the vLPI has been
> mapped. This corresponds to checking whether a vLPI is valid before
> unmap it.
>
> Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
> ---
> arch/arm64/kvm/vgic/vgic-v4.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/kvm/vgic/vgic-v4.c b/arch/arm64/kvm/vgic/vgic-v4.c
> index 339a55194b2c..824f4baf50ee 100644
> --- a/arch/arm64/kvm/vgic/vgic-v4.c
> +++ b/arch/arm64/kvm/vgic/vgic-v4.c
> @@ -436,6 +436,11 @@ int kvm_vgic_v4_set_forwarding(struct kvm *kvm, int virq,
> if (ret)
> goto out;
>
> + if (irq->hw) {
> + ret = -EBUSY;
> + goto out;
> + }
> +
So this code affects the mapping side, not the unmapping. Even more
confusingly, the subject of the patch doesn't match the commit
message.
Furthermore, I'm not sure we want to return an error here. Userspace
has no knowledge of GICv4, and there are numerous other cases where we
don't return any error. This is certainly a userspace visible change.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-16 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 12:52 [PATCH] KVM: arm/arm64: GICv4: Do not perform an map to a mapped vLPI Kunkun Jiang
2023-11-16 14:10 ` Marc Zyngier [this message]
2023-11-17 9:54 ` Kunkun Jiang
2023-11-17 11:47 ` Marc Zyngier
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=864jhl23hp.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=eric.auger@redhat.com \
--cc=james.morse@arm.com \
--cc=jean-philippe@linaro.org \
--cc=jiangkunkun@huawei.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=wanghaibin.wang@huawei.com \
--cc=will@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).