All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Sebastian Ott <sebott@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2 5/6] KVM: arm64: show writable masks for feature registers
Date: Wed, 1 May 2024 07:31:35 +0000	[thread overview]
Message-ID: <ZjHv14-GBafptt-m@linux.dev> (raw)
In-Reply-To: <20240426104950.7382-6-sebott@redhat.com>

On Fri, Apr 26, 2024 at 12:49:49PM +0200, Sebastian Ott wrote:
> Instead of using ~0UL provide the actual writable mask for
> non-id feature registers in the output of the
> KVM_ARM_GET_REG_WRITABLE_MASKS ioctl.

Urgh, yeah in retrospect I think we should've constrained this to the
registers KVM considers "id regs" (the space occupied by known registers
or otherwise RAZ).

> Explicitely set the mask for CLIDR_EL1 to make sure we present
> the same value to userspace than before.

typo: explicitly

Also, we know the set of mutable bits for CLIDR_EL1 as it is handled in
set_clidr(). The mask really should match that, since the UAPI is
documented as "allowing userspace to know what fields can be changed for
the system register"

-- 
Thanks,
Oliver

WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oliver.upton@linux.dev>
To: Sebastian Ott <sebott@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH v2 5/6] KVM: arm64: show writable masks for feature registers
Date: Wed, 1 May 2024 07:31:35 +0000	[thread overview]
Message-ID: <ZjHv14-GBafptt-m@linux.dev> (raw)
In-Reply-To: <20240426104950.7382-6-sebott@redhat.com>

On Fri, Apr 26, 2024 at 12:49:49PM +0200, Sebastian Ott wrote:
> Instead of using ~0UL provide the actual writable mask for
> non-id feature registers in the output of the
> KVM_ARM_GET_REG_WRITABLE_MASKS ioctl.

Urgh, yeah in retrospect I think we should've constrained this to the
registers KVM considers "id regs" (the space occupied by known registers
or otherwise RAZ).

> Explicitely set the mask for CLIDR_EL1 to make sure we present
> the same value to userspace than before.

typo: explicitly

Also, we know the set of mutable bits for CLIDR_EL1 as it is handled in
set_clidr(). The mask really should match that, since the UAPI is
documented as "allowing userspace to know what fields can be changed for
the system register"

-- 
Thanks,
Oliver

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-01  7:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 10:49 [PATCH v2 0/6] KVM: arm64: emulation for CTR_EL0 Sebastian Ott
2024-04-26 10:49 ` Sebastian Ott
2024-04-26 10:49 ` [PATCH v2 1/6] KVM: arm64: change return value in arm64_check_features() Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-04-26 10:49 ` [PATCH v2 2/6] KVM: arm64: unify trap setup code Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-05-01  6:51   ` Oliver Upton
2024-05-01  6:51     ` Oliver Upton
2024-05-03 15:06     ` Sebastian Ott
2024-05-03 15:06       ` Sebastian Ott
2024-04-26 10:49 ` [PATCH v2 3/6] KVM: arm64: maintain per VM value for CTR_EL0 Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-04-26 10:49 ` [PATCH v2 4/6] KVM: arm64: add emulation for CTR_EL0 register Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-05-01  8:15   ` Oliver Upton
2024-05-01  8:15     ` Oliver Upton
2024-05-03 15:50     ` Marc Zyngier
2024-05-03 15:50       ` Marc Zyngier
2024-05-03 17:27       ` Oliver Upton
2024-05-03 17:27         ` Oliver Upton
2024-05-08 15:17     ` Sebastian Ott
2024-05-08 15:17       ` Sebastian Ott
2024-05-08 17:18       ` Oliver Upton
2024-05-08 17:18         ` Oliver Upton
2024-04-26 10:49 ` [PATCH v2 5/6] KVM: arm64: show writable masks for feature registers Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-05-01  7:31   ` Oliver Upton [this message]
2024-05-01  7:31     ` Oliver Upton
2024-05-03 11:03     ` Sebastian Ott
2024-05-03 11:03       ` Sebastian Ott
2024-04-26 10:49 ` [PATCH v2 6/6] KVM: arm64: rename functions for invariant sys regs Sebastian Ott
2024-04-26 10:49   ` Sebastian Ott
2024-05-01  8:17 ` [PATCH v2 0/6] KVM: arm64: emulation for CTR_EL0 Oliver Upton
2024-05-01  8:17   ` Oliver Upton
2024-05-03 11:01   ` Sebastian Ott
2024-05-03 11:01     ` Sebastian Ott

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=ZjHv14-GBafptt-m@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=sebott@redhat.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@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.