<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/include/asm/kvm_nested.h, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-02-24T19:28:43Z</updated>
<entry>
<title>KVM: arm64: Move NV-specific capping to idreg sanitisation</title>
<updated>2025-02-24T19:28:43Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-02-20T13:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94f296dcd6d937371dd83df048b9a2d723d357c9'/>
<id>urn:sha1:94f296dcd6d937371dd83df048b9a2d723d357c9</id>
<content type='text'>
Instead of applying the NV idreg limits at run time, switch to
doing it at the same time as the reset of the VM initialisation.

This will make things much simpler once we introduce vcpu-driven
variants of NV.

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-10-maz@kernel.org
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
</content>
</entry>
<entry>
<title>Merge branch kvm-arm64/nv-resx-fixes-6.14 into kvmarm-master/next</title>
<updated>2025-01-17T11:06:33Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-01-17T11:06:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3643b334aa8f02ddcedc093d7de623378192da06'/>
<id>urn:sha1:3643b334aa8f02ddcedc093d7de623378192da06</id>
<content type='text'>
* kvm-arm64/nv-resx-fixes-6.14:
  : .
  : Fixes for NV sysreg accessors. From the cover letter:
  :
  : "Joey recently reported that some rather basic tests were failing on
  : NV, and managed to track it down to critical register fields (such as
  : HCR_EL2.E2H) not having their expect value.
  :
  : Further investigation has outlined a couple of critical issues:
  :
  : - Evaluating HCR_EL2.E2H must always be done with a sanitising
  :   accessor, no ifs, no buts. Given that KVM assumes a fixed value for
  :   this bit, we cannot leave it to the guest to mess with.
  :
  : - Resetting the sysreg file must result in the RESx bits taking
  :   effect. Otherwise, we may end-up making the wrong decision (see
  :   above), and we definitely expose invalid values to the guest. Note
  :   that because we compute the RESx masks very late in the VM setup, we
  :   need to apply these masks at that particular point as well.
  : [...]"
  : .
  KVM: arm64: nv: Apply RESx settings to sysreg reset values
  KVM: arm64: nv: Always evaluate HCR_EL2 using sanitising accessors

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;

# Conflicts:
#	arch/arm64/kvm/nested.c
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Apply RESx settings to sysreg reset values</title>
<updated>2025-01-14T11:33:09Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-01-12T16:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36f998de853cfad60508dfdfb41c9c40a2245f19'/>
<id>urn:sha1:36f998de853cfad60508dfdfb41c9c40a2245f19</id>
<content type='text'>
While we have sanitisation in place for the guest sysregs, we lack
that sanitisation out of reset. So some of the fields could be
evaluated and not reflect their RESx status, which sounds like
a very bad idea.

Apply the RESx masks to the the sysreg file in two situations:

- when going via a reset of the sysregs

- after having computed the RESx masks

Having this separate reset phase from the actual reset handling is
a bit grotty, but we need to apply this after the ID registers are
final.

Tested-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Reviewed-by: Joey Gouly &lt;joey.gouly@arm.com&gt;
Link: https://lore.kernel.org/r/20250112165029.1181056-3-maz@kernel.org
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch kvm-arm64/pkvm-fixed-features-6.14 into kvmarm-master/next</title>
<updated>2025-01-12T10:40:10Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2025-01-12T10:40:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e880b16efb78f9c7449239a76814aeb015daf2a1'/>
<id>urn:sha1:e880b16efb78f9c7449239a76814aeb015daf2a1</id>
<content type='text'>
* kvm-arm64/pkvm-fixed-features-6.14: (24 commits)
  : .
  : Complete rework of the pKVM handling of features, catching up
  : with the rest of the code deals with it these days.
  : Patches courtesy of Fuad Tabba. From the cover letter:
  :
  : "This patch series uses the vm's feature id registers to track the
  : supported features, a framework similar to nested virt to set the
  : trap values, and removes the need to store cptr_el2 per vcpu in
  : favor of setting its value when traps are activated, as VHE mode
  : does."
  :
  : This branch drags the arm64/for-next/cpufeature branch to solve
  : ugly conflicts in -next.
  : .
  KVM: arm64: Fix FEAT_MTE in pKVM
  KVM: arm64: Use kvm_vcpu_has_feature() directly for struct kvm
  KVM: arm64: Convert the SVE guest vcpu flag to a vm flag
  KVM: arm64: Remove PtrAuth guest vcpu flag
  KVM: arm64: Fix the value of the CPTR_EL2 RES1 bitmask for nVHE
  KVM: arm64: Refactor kvm_reset_cptr_el2()
  KVM: arm64: Calculate cptr_el2 traps on activating traps
  KVM: arm64: Remove redundant setting of HCR_EL2 trap bit
  KVM: arm64: Remove fixed_config.h header
  KVM: arm64: Rework specifying restricted features for protected VMs
  KVM: arm64: Set protected VM traps based on its view of feature registers
  KVM: arm64: Fix RAS trapping in pKVM for protected VMs
  KVM: arm64: Initialize feature id registers for protected VMs
  KVM: arm64: Use KVM extension checks for allowed protected VM capabilities
  KVM: arm64: Remove KVM_ARM_VCPU_POWER_OFF from protected VMs allowed features in pKVM
  KVM: arm64: Move checking protected vcpu features to a separate function
  KVM: arm64: Group setting traps for protected VMs by control register
  KVM: arm64: Consolidate allowed and restricted VM feature checks
  arm64/sysreg: Get rid of CPACR_ELx SysregFields
  arm64/sysreg: Convert *_EL12 accessors to Mapping
  ...

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;

# Conflicts:
#	arch/arm64/kvm/fpsimd.c
#	arch/arm64/kvm/hyp/nvhe/pkvm.c
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Honor MDCR_EL2.TDE routing for debug exceptions</title>
<updated>2024-12-20T09:04:11Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-12-19T22:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0ee51033ae35461ae98c465426f0002b8370679'/>
<id>urn:sha1:b0ee51033ae35461ae98c465426f0002b8370679</id>
<content type='text'>
Inject debug exceptions into vEL2 if MDCR_EL2.TDE is set.

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-17-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64/sysreg: Get rid of CPACR_ELx SysregFields</title>
<updated>2024-12-19T18:00:58Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-12-19T17:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5ecedcd7cc231a115c11cfed79635583ef4f882'/>
<id>urn:sha1:e5ecedcd7cc231a115c11cfed79635583ef4f882</id>
<content type='text'>
There is no such thing as CPACR_ELx in the architecture.
What we have is CPACR_EL1, for which CPTR_EL12 is an accessor.

Rename CPACR_ELx_* to CPACR_EL1_*, and fix the bit of code using
these names.

Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20241219173351.1123087-5-maz@kernel.org
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Punt stage-2 recycling to a vCPU request</title>
<updated>2024-10-08T09:40:27Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-10-07T23:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c268f204f7c5784e84583c1c44d427bac09f517a'/>
<id>urn:sha1:c268f204f7c5784e84583c1c44d427bac09f517a</id>
<content type='text'>
Currently, when a nested MMU is repurposed for some other MMU context,
KVM unmaps everything during vcpu_load() while holding the MMU lock for
write. This is quite a performance bottleneck for large nested VMs, as
all vCPU scheduling will spin until the unmap completes.

Start punting the MMU cleanup to a vCPU request, where it is then
possible to periodically release the MMU lock and CPU in the presence of
contention.

Ensure that no vCPU winds up using a stale MMU by tracking the pending
unmap on the S2 MMU itself and requesting an unmap on every vCPU that
finds it.

Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20241007233028.2236133-4-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Do not block when unmapping stage-2 if disallowed</title>
<updated>2024-10-08T09:40:27Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2024-10-07T23:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c164eb9464d39ba339c1487dcac0dc9508e03f0'/>
<id>urn:sha1:3c164eb9464d39ba339c1487dcac0dc9508e03f0</id>
<content type='text'>
Right now the nested code allows unmap operations on a shadow stage-2 to
block unconditionally. This is wrong in a couple places, such as a
non-blocking MMU notifier or on the back of a sched_in() notifier as
part of shadow MMU recycling.

Carry through whether or not blocking is allowed to
kvm_pgtable_stage2_unmap(). This 'fixes' an issue where stage-2 MMU
reclaim would precipitate a stack overflow from a pile of kvm_sched_in()
callbacks, all trying to recycle a stage-2 MMU.

Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Link: https://lore.kernel.org/r/20241007233028.2236133-3-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Make ps_to_output_size() generally available</title>
<updated>2024-08-30T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-06-18T09:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97634dac1974d28e5ffc067d257f0b0f79b5ed2e'/>
<id>urn:sha1:97634dac1974d28e5ffc067d257f0b0f79b5ed2e</id>
<content type='text'>
Make this helper visible to at.c, we are going to need it.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: nv: Turn upper_attr for S2 walk into the full descriptor</title>
<updated>2024-08-30T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2024-06-21T13:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a0f25b71ca544388717f8bf4a54ba324e234e7a'/>
<id>urn:sha1:0a0f25b71ca544388717f8bf4a54ba324e234e7a</id>
<content type='text'>
The upper_attr attribute has been badly named, as it most of the
time carries the full "last walked descriptor".

Rename it to "desc" and make ti contain the full 64bit descriptor.
This will be used by the S1 PTW.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
</feed>
