<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include/asm/kvm_nested.h, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-04-20T11:42:51Z</updated>
<entry>
<title>KVM: arm64: nv: Add emulation for ERETAx instructions</title>
<updated>2024-04-20T11:42:51Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-04-19T10:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ccc971ee2c61a1ffb487e46bf6184f7df6aacfb'/>
<id>urn:sha1:6ccc971ee2c61a1ffb487e46bf6184f7df6aacfb</id>
<content type='text'>
FEAT_NV has the interesting property of relying on ERET being
trapped. An added complexity is that it also traps ERETAA and
ERETAB, meaning that the Pointer Authentication aspect of these
instruction must be emulated.

Add an emulation of Pointer Authentication, limited to ERETAx
(always using SP_EL2 as the modifier and ELR_EL2 as the pointer),
using the Generic Authentication instructions.

The emulation, however small, is placed in its own compilation
unit so that it can be avoided if the configuration doesn't
include it (or the toolchan in not up to the task).

Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240419102935.1935571-13-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Add trap forwarding for ERET and SMC</title>
<updated>2024-04-20T11:42:50Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-04-19T10:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95537f06b9e826766f32e513d714e1cda468ef15'/>
<id>urn:sha1:95537f06b9e826766f32e513d714e1cda468ef15</id>
<content type='text'>
Honor the trap forwarding bits for both ERET and SMC, using a new
helper that checks for common conditions.

Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Co-developed-by: Jintack Lim &lt;jintack.lim@linaro.org&gt;
Signed-off-by: Jintack Lim &lt;jintack.lim@linaro.org&gt;
Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20240419102935.1935571-7-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>
</author>
<published>2024-02-14T13:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: Use the xarray as the primary sysreg/sysinsn walker</title>
<updated>2024-02-19T17:13:01Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-02-14T13:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc5f84fbb008ff0904e0a8c0fb207cee2eb99bc9'/>
<id>urn:sha1:cc5f84fbb008ff0904e0a8c0fb207cee2eb99bc9</id>
<content type='text'>
Since we always start sysreg/sysinsn handling by searching the
xarray, use it as the source of the index in the correct sys_reg_desc
array.

This allows some cleanup, such as moving the handling of unknown
sysregs in a single location.

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-16-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Add non-VHE-EL2-&gt;EL1 translation helpers</title>
<updated>2023-12-19T09:51:11Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2016-12-25T15:49:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3606e0b2e462164bced151dbb54ccfe42ac6c35b'/>
<id>urn:sha1:3606e0b2e462164bced151dbb54ccfe42ac6c35b</id>
<content type='text'>
Some EL2 system registers immediately affect the current execution
of the system, so we need to use their respective EL1 counterparts.
For this we need to define a mapping between the two. In general,
this only affects non-VHE guest hypervisors, as VHE system registers
are compatible with the EL1 counterparts.

These helpers will get used in subsequent patches.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Co-developed-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Compute NV view of idregs as a one-off</title>
<updated>2023-12-19T09:51:00Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-11-12T21:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ed0b5123cd5a2a4f1fe4e594e7bf319e9eaf1da'/>
<id>urn:sha1:3ed0b5123cd5a2a4f1fe4e594e7bf319e9eaf1da</id>
<content type='text'>
Now that we have a full copy of the idregs for each VM, there is
no point in repainting the sysregs on each access. Instead, we
can simply perform the transmation as a one-off and be done
with it.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Get rid of vCPU-scoped feature bitmap</title>
<updated>2023-09-21T18:13:29Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2023-09-20T19:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1de10b7d13a971f9ab90c5ed300b76d6e0c0db38'/>
<id>urn:sha1:1de10b7d13a971f9ab90c5ed300b76d6e0c0db38</id>
<content type='text'>
The vCPU-scoped feature bitmap was left in place a couple of releases
ago in case the change to VM-scoped vCPU features broke anyone. Nobody
has complained and the interop between VM and vCPU bitmaps is pretty
gross. Throw it out.

Link: https://lore.kernel.org/r/20230920195036.1169791-9-oliver.upton@linux.dev
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Add trap forwarding infrastructure</title>
<updated>2023-08-17T09:00:27Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-08-15T18:38:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e58ec47bf68d2bcaaa97d80cc13aca4bc4abe07b'/>
<id>urn:sha1:e58ec47bf68d2bcaaa97d80cc13aca4bc4abe07b</id>
<content type='text'>
A significant part of what a NV hypervisor needs to do is to decide
whether a trap from a L2+ guest has to be forwarded to a L1 guest
or handled locally. This is done by checking for the trap bits that
the guest hypervisor has set and acting accordingly, as described by
the architecture.

A previous approach was to sprinkle a bunch of checks in all the
system register accessors, but this is pretty error prone and doesn't
help getting an overview of what is happening.

Instead, implement a set of global tables that describe a trap bit,
combinations of trap bits, behaviours on trap, and what bits must
be evaluated on a system register trap.

Although this is painful to describe, this allows to specify each
and every control bit in a static manner. To make it efficient,
the table is inserted in an xarray that is global to the system,
and checked each time we trap a system register while running
a L2 guest.

Add the basic infrastructure for now, while additional patches will
implement configuration registers.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Jing Zhang &lt;jingzhangos@google.com&gt;
Reviewed-by: Miguel Luis &lt;miguel.luis@oracle.com&gt;
Link: https://lore.kernel.org/r/20230815183903.2735724-15-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Filter out unsupported features from ID regs</title>
<updated>2023-02-11T10:13:30Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2023-02-09T17:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f75b6d447d712b6ed9abc869eedf456fe7f5e9b'/>
<id>urn:sha1:9f75b6d447d712b6ed9abc869eedf456fe7f5e9b</id>
<content type='text'>
As there is a number of features that we either can't support,
or don't want to support right away with NV, let's add some
basic filtering so that we don't advertize silly things to the
EL2 guest.

Whilst we are at it, advertize FEAT_TTL as well as FEAT_GTG, which
the NV implementation will implement.

Reviewed-by: Ganapatrao Kulkarni &lt;gankulkarni@os.amperecomputing.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20230209175820.1939006-18-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Introduce nested virtualization VCPU feature</title>
<updated>2023-02-11T09:16:11Z</updated>
<author>
<name>Christoffer Dall</name>
</author>
<published>2023-02-09T17:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89b0e7de3451a17f23bc1c39bc40eee1811f1669'/>
<id>urn:sha1:89b0e7de3451a17f23bc1c39bc40eee1811f1669</id>
<content type='text'>
Introduce the feature bit and a primitive that checks if the feature is
set behind a static key check based on the cpus_have_const_cap check.

Checking vcpu_has_nv() on systems without nested virt enabled
should have negligible overhead.

We don't yet allow userspace to actually set this feature.

Reviewed-by: Ganapatrao Kulkarni &lt;gankulkarni@os.amperecomputing.com&gt;
Reviewed-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Christoffer Dall &lt;christoffer.dall@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20230209175820.1939006-4-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
</feed>
