<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/arm64/kvm/sys_regs.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-10-13T13:42:40Z</updated>
<entry>
<title>KVM: arm64: Add timer UAPI workaround to sysreg infrastructure</title>
<updated>2025-10-13T13:42:40Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2025-09-29T16:04:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=77a0c42eaf03c66936429d190bb2ea1a214bd528'/>
<id>urn:sha1:77a0c42eaf03c66936429d190bb2ea1a214bd528</id>
<content type='text'>
Amongst the numerous bugs that plague the KVM/arm64 UAPI, one of
the most annoying thing is that the userspace view of the virtual
timer has its CVAL and CNT encodings swapped.

In order to reduce the amount of code that has to know about this,
start by adding handling for this bug in the sys_reg code.

Nothing is making use of it yet, as the code responsible for userspace
interaction is catching the accesses early.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: kvm: sys_regs: use string choices helper</title>
<updated>2025-07-24T06:36:37Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-07-18T01:50:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=30a597e19f24dc5264954456fe749e26ac67478a'/>
<id>urn:sha1:30a597e19f24dc5264954456fe749e26ac67478a</id>
<content type='text'>
We can use string choices helper, let's use it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87pldy5ktb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Add assignment-specific sysreg accessor</title>
<updated>2025-06-05T13:17:32Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2025-06-03T07:08:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6678791ee3da0b78c28fe7d77814097f53cbb8df'/>
<id>urn:sha1:6678791ee3da0b78c28fe7d77814097f53cbb8df</id>
<content type='text'>
Assigning a value to a system register doesn't do what it is
supposed to be doing if that register is one that has RESx bits.

The main problem is that we use __vcpu_sys_reg(), which can be used
both as a lvalue and rvalue. When used as a lvalue, the bit masking
occurs *before* the new value is assigned, meaning that we (1) do
pointless work on the old cvalue, and (2) potentially assign an
invalid value as we fail to apply the masks to it.

Fix this by providing a new __vcpu_assign_sys_reg() that does
what it says on the tin, and sanitises the *new* value instead of
the old one. This comes with a significant amount of churn.

Reviewed-by: Miguel Luis &lt;miguel.luis@oracle.com&gt;
Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20250603070824.1192795-2-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Make ID_REG_LIMIT_FIELD_ENUM() more widely available</title>
<updated>2025-02-24T19:06:55Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2025-02-20T13:49:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=179fd7e30f0455249fd9d1fd0041da4d141a2b97'/>
<id>urn:sha1:179fd7e30f0455249fd9d1fd0041da4d141a2b97</id>
<content type='text'>
ID_REG_LIMIT_FIELD_ENUM() is a useful macro to limit the idreg
features exposed to guest and userspace, and the NV code can
make use of it.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Link: https://lore.kernel.org/r/20250220134907.554085-8-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>Merge branch kvm-arm64/visibility-cleanups into kvmarm-master/next</title>
<updated>2024-09-12T07:38:17Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2024-09-12T07:38:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=17a0005644994087794f6552d7a5e105d6976184'/>
<id>urn:sha1:17a0005644994087794f6552d7a5e105d6976184</id>
<content type='text'>
* kvm-arm64/visibility-cleanups:
  : .
  : Remove REG_HIDDEN_USER from the sysreg infrastructure, making things
  : a little more simple. From the cover letter:
  :
  : "Since 4d4f52052ba8 ("KVM: arm64: nv: Drop EL12 register traps that are
  : redirected to VNCR") and the admission that KVM would never be supporting
  : the original FEAT_NV, REG_HIDDEN_USER only had a few users, all of which
  : could either be replaced by a more ad-hoc mechanism, or removed altogether."
  : .
  KVM: arm64: Get rid of REG_HIDDEN_USER visibility qualifier
  KVM: arm64: Simplify visibility handling of AArch32 SPSR_*
  KVM: arm64: Simplify handling of CNTKCTL_EL12

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Get rid of REG_HIDDEN_USER visibility qualifier</title>
<updated>2024-09-11T18:50:43Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2024-09-04T08:24:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0746096faca01823021f662282e1f067a69b965b'/>
<id>urn:sha1:0746096faca01823021f662282e1f067a69b965b</id>
<content type='text'>
Now that REG_HIDDEN_USER has no direct user anymore, remove it
entirely and update all users of sysreg_hidden_user() to call
sysreg_hidden() instead.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240904082419.1982402-4-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Make most GICv3 accesses UNDEF if they trap</title>
<updated>2024-08-27T17:32:56Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2024-08-27T15:25:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4a999a1d7ae52592723a9a219aaa7a3406d66dd6'/>
<id>urn:sha1:4a999a1d7ae52592723a9a219aaa7a3406d66dd6</id>
<content type='text'>
We don't expect to trap any GICv3 register for host handling,
apart from ICC_SRE_EL1 and the SGI registers. If they trap,
that's because the guest is playing with us despite being
told it doesn't have a GICv3.

If it does, UNDEF is what it will get.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240827152517.3909653-10-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Add helper for last ditch idreg adjustments</title>
<updated>2024-08-27T17:32:55Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2024-08-27T15:25:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=795a0bbaeee2aa993338166bc063fe3c89373d2a'/>
<id>urn:sha1:795a0bbaeee2aa993338166bc063fe3c89373d2a</id>
<content type='text'>
We already have to perform a set of last-chance adjustments for
NV purposes. We will soon have to do the same for the GIC, so
introduce a helper for that exact purpose.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240827152517.3909653-5-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Rename __check_nv_sr_forward() to triage_sysreg_trap()</title>
<updated>2024-02-19T17:13:01Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2024-02-14T13:18:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=085eabaa74a12345b7dd083b160519fe3a52f2ce'/>
<id>urn:sha1:085eabaa74a12345b7dd083b160519fe3a52f2ce</id>
<content type='text'>
__check_nv_sr_forward() is not specific to NV anymore, and does
a lot more. Rename it to triage_sysreg_trap(), making it plain
that its role is to handle where an exception is to be handled.

Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20240214131827.2856277-17-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Save ID registers' sanitized value per guest</title>
<updated>2023-06-15T12:55:08Z</updated>
<author>
<name>Jing Zhang</name>
<email>jingzhangos@google.com</email>
</author>
<published>2023-06-09T19:00:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=473341469042b39535ee800a19c45110ebc46346'/>
<id>urn:sha1:473341469042b39535ee800a19c45110ebc46346</id>
<content type='text'>
Initialize the default ID register values upon the first call to
KVM_ARM_VCPU_INIT. The vCPU feature flags are finalized at that point,
so it is possible to determine the maximum feature set supported by a
particular VM configuration. Do nothing with these values for now, as we
need to rework the plumbing of what's already writable to be compatible
with the generic infrastructure.

Co-developed-by: Reiji Watanabe &lt;reijiw@google.com&gt;
Signed-off-by: Reiji Watanabe &lt;reijiw@google.com&gt;
Signed-off-by: Jing Zhang &lt;jingzhangos@google.com&gt;
Link: https://lore.kernel.org/r/20230609190054.1542113-7-oliver.upton@linux.dev
[Oliver: Hoist everything into KVM_ARM_VCPU_INIT time, so the features
 are final]
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
</feed>
