All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Maximilian Dittgen <mdittgen@amazon.de>
Cc: <oliver.upton@linux.dev>, <pbonzini@redhat.com>,
	<shuah@kernel.org>, <linux-arm-kernel@lists.infradead.org>,
	<kvmarm@lists.linux.dev>, <linux-kselftest@vger.kernel.org>,
	<kvm@vger.kernel.org>, <epetron@amazon.de>,
	<nh-open-source@amazon.com>,
	Maximilian Dittgen <mdittgen@amazon.com>
Subject: Re: [PATCH] KVM: selftests: fix ITS collection target addresses in vgic_lpi_stress
Date: Fri, 17 Oct 2025 18:06:25 +0100	[thread overview]
Message-ID: <86v7kdwj8u.wl-maz@kernel.org> (raw)
In-Reply-To: <20251017161918.40711-1-mdittgen@amazon.de>

On Fri, 17 Oct 2025 17:19:18 +0100,
Maximilian Dittgen <mdittgen@amazon.de> wrote:
> 
> When mapping guest ITS collections, vgic_lpi_stress iterates over
> integers in the range [0, nr_cpus), passing them as the target_addr
> parameter to its_send_mapc_cmd(). These integers correspond to the
> selftest userspace vCPU IDs that we intend to map each ITS collection
> to.
> 
> However, its_encode_target() within its_send_mapc_cmd() expects a
> vCPU's redistributor address--not the vCPU ID--as the target_addr
> parameter. This is evident from how its_encode_target() encodes the
> target_addr parameter as:
> 
>         its_mask_encode(&cmd->raw_cmd[2], target_addr >> 16, 51, 16)
> 
> This shows that we right-shift the input target_addr parameter by 16
> bits before encoding it. This makes sense when the parameter refers to
> redistributor addresses (e.g., 0x20000, 0x30000) but not vCPU IDs
> (e.g., 0x2, 0x3).

From the KVM ITS emulation code:

	 * We use linear CPU numbers for redistributor addressing,
	 * so GITS_TYPER.PTA is 0.

It is not an address.

	M.

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

  reply	other threads:[~2025-10-17 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 16:19 [PATCH] KVM: selftests: fix ITS collection target addresses in vgic_lpi_stress Maximilian Dittgen
2025-10-17 17:06 ` Marc Zyngier [this message]
2025-10-20 12:12   ` Maximilian Dittgen
2025-10-20 13:01     ` Marc Zyngier
2025-10-20 15:13       ` Maximilian Dittgen

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=86v7kdwj8u.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=epetron@amazon.de \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mdittgen@amazon.com \
    --cc=mdittgen@amazon.de \
    --cc=nh-open-source@amazon.com \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    /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.