<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kvm/guest.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-08T18:40:48Z</updated>
<entry>
<title>KVM: Remove subtle "struct kvm_stats_desc" pseudo-overlay</title>
<updated>2026-01-08T18:40:48Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2025-12-05T23:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da142f3d373a6ddaca0119615a8db2175ddc4121'/>
<id>urn:sha1:da142f3d373a6ddaca0119615a8db2175ddc4121</id>
<content type='text'>
Remove KVM's internal pseudo-overlay of kvm_stats_desc, which subtly
aliases the flexible name[] in the uAPI definition with a fixed-size array
of the same name.  The unusual embedded structure results in compiler
warnings due to -Wflex-array-member-not-at-end, and also necessitates an
extra level of dereferencing in KVM.  To avoid the "overlay", define the
uAPI structure to have a fixed-size name when building for the kernel.

Opportunistically clean up the indentation for the stats macros, and
replace spaces with tabs.

No functional change intended.

Reported-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Closes: https://lore.kernel.org/all/aPfNKRpLfhmhYqfP@kspp
Acked-by: Marc Zyngier &lt;maz@kernel.org&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
[..]
Acked-by: Anup Patel &lt;anup@brainfault.org&gt;
Reviewed-by: Bibo Mao &lt;maobibo@loongson.cn&gt;
Acked-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://patch.msgid.link/20251205232655.445294-1-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Kill leftovers of ad-hoc timer userspace access</title>
<updated>2025-10-13T13:42:41Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-09-29T16:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=386aac77da112651a5cdadc4a6b29181592f5aa0'/>
<id>urn:sha1:386aac77da112651a5cdadc4a6b29181592f5aa0</id>
<content type='text'>
Now that the whole timer infrastructure is handled as system register
accesses, get rid of the now unused ad-hoc infrastructure.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Move CNT*CT_EL0 userspace accessors to generic infrastructure</title>
<updated>2025-10-13T13:42:41Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-09-29T16:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3be3a48fb18f9d243fac452e0be41469bb246b4'/>
<id>urn:sha1:c3be3a48fb18f9d243fac452e0be41469bb246b4</id>
<content type='text'>
Moving the counter registers is a bit more involved than for the control
and comparator (there is no shadow data for the counter), but still
pretty manageable.

Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Move CNT*_CVAL_EL0 userspace accessors to generic infrastructure</title>
<updated>2025-10-13T13:42:41Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-09-29T16:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8af198980eff2ed2a5df3d2ee39f8c9d61f40559'/>
<id>urn:sha1:8af198980eff2ed2a5df3d2ee39f8c9d61f40559</id>
<content type='text'>
As for the control registers, move the comparator registers to
the common infrastructure.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Move CNT*_CTL_EL0 userspace accessors to generic infrastructure</title>
<updated>2025-10-13T13:42:40Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-09-29T16:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09424d5d7d4e8b427ee4a737fb7765103789e08a'/>
<id>urn:sha1:09424d5d7d4e8b427ee4a737fb7765103789e08a</id>
<content type='text'>
Remove the handling of CNT*_CTL_EL0 from guest.c, and move it to
sys_regs.c, using a new TIMER_REG() definition to encapsulate it.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Commit exceptions from KVM_SET_VCPU_EVENTS immediately</title>
<updated>2025-07-16T03:12:03Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-07-15T06:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efa1368ba9f4b6e081c0fdd73245b0ba6ef75bda'/>
<id>urn:sha1:efa1368ba9f4b6e081c0fdd73245b0ba6ef75bda</id>
<content type='text'>
syzkaller has found that it can trip a warning in KVM's exception
emulation infrastructure by repeatedly injecting exceptions into the
guest.

While it's unlikely that a reasonable VMM will do this, further
investigation of the issue reveals that KVM can potentially discard the
"pending" SEA state. While the handling of KVM_GET_VCPU_EVENTS presumes
that userspace-injected SEAs are realized immediately, in reality the
emulated exception entry is deferred until the next call to KVM_RUN.

Hack-a-fix the immediate issues by committing the pending exceptions to
the vCPU's architectural state immediately in KVM_SET_VCPU_EVENTS. This
is no different to the way KVM-injected exceptions are handled in
KVM_RUN where we potentially call __kvm_adjust_pc() before returning to
userspace.

Reported-by: syzbot+4e09b1432de3774b86ae@syzkaller.appspotmail.com
Reported-by: syzbot+1f6f096afda6f4f8f565@syzkaller.appspotmail.com
Reviewed-by: Marc Zyngier &lt;maz@kernel.org&gt;
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Honor SError exception routing / masking</title>
<updated>2025-07-08T18:36:31Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-07-08T17:25:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77ee70a073575977b403e9add25f185d614217d8'/>
<id>urn:sha1:77ee70a073575977b403e9add25f185d614217d8</id>
<content type='text'>
To date KVM has used HCR_EL2.VSE to track the state of a pending SError
for the guest. With this bit set, hardware respects the EL1 exception
routing / masking rules and injects the vSError when appropriate.

This isn't correct for NV guests as hardware is oblivious to vEL2's
intentions for SErrors. Better yet, with FEAT_NV2 the guest can change
the routing behind our back as HCR_EL2 is redirected to memory. Cope
with this mess by:

 - Using a flag (instead of HCR_EL2.VSE) to track the pending SError
   state when SErrors are unconditionally masked for the current context

 - Resampling the routing / masking of a pending SError on every guest
   entry/exit

 - Emulating exception entry when SError routing implies a translation
   regime change

Reviewed-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20250708172532.1699409-7-oliver.upton@linux.dev
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Respect exception routing rules for SEAs</title>
<updated>2025-07-08T18:35:54Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-07-08T17:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9aba641b9ec2a9f443a6c666c054c5e98ef550b5'/>
<id>urn:sha1:9aba641b9ec2a9f443a6c666c054c5e98ef550b5</id>
<content type='text'>
Synchronous external aborts are taken to EL2 if ELIsInHost() or
HCR_EL2.TEA=1. Rework the SEA injection plumbing to respect the imposed
routing of the guest hypervisor and opportunistically rephrase things to
make their function a bit more obvious.

Reviewed-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20250708172532.1699409-6-oliver.upton@linux.dev
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Manage software step state at load/put</title>
<updated>2024-12-20T09:04:06Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-12-20T08:59:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ca3f03bf524c98afa421c479689f1e7dc030bf0'/>
<id>urn:sha1:2ca3f03bf524c98afa421c479689f1e7dc030bf0</id>
<content type='text'>
KVM takes over the guest's software step state machine if the VMM is
debugging the guest, but it does the save/restore fiddling for every
guest entry.

Note that the only constraint on host usage of software step is that the
guest's configuration remains visible to userspace via the ONE_REG
ioctls. So, we can cut down on the amount of fiddling by doing this at
load/put instead.

Tested-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20241219224116.3941496-16-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Clean up KVM_SET_GUEST_DEBUG handler</title>
<updated>2024-12-20T09:01:25Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-12-19T22:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4cefbec97d80247083b84ccc86e32a78c119f705'/>
<id>urn:sha1:4cefbec97d80247083b84ccc86e32a78c119f705</id>
<content type='text'>
No particular reason other than it isn't nice to look at.

Tested-by: James Clark &lt;james.clark@linaro.org&gt;
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20241219224116.3941496-8-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
</feed>
