<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/arm64/kvm/va_layout.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-14T10:40:11Z</updated>
<entry>
<title>KVM: arm64: Calculate hyp VA size only once</title>
<updated>2026-01-14T10:40:11Z</updated>
<author>
<name>Petteri Kangaslampi</name>
</author>
<published>2026-01-13T19:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e8eb10c107e67f22f87cd8c963d30ea73f04d5f'/>
<id>urn:sha1:8e8eb10c107e67f22f87cd8c963d30ea73f04d5f</id>
<content type='text'>
Calculate the hypervisor's VA size only once to maintain consistency
between the memory layout and MMU initialization logic. Previously the
two would be inconsistent when the kernel is configured for less than
IDMAP_VA_BITS of VA space.

Signed-off-by: Petteri Kangaslampi &lt;pekangas@google.com&gt;
Tested-by: Vincent Donnefort &lt;vdonnefort@google.com&gt;
Link: https://patch.msgid.link/20260113194409.2970324-2-pekangas@google.com
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>arm64: alternatives: kvm: prepare for cap changes</title>
<updated>2022-09-16T16:15:02Z</updated>
<author>
<name>Mark Rutland</name>
</author>
<published>2022-09-12T16:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34bbfdfb146be3ad485cbe526b2a1e9ce220649c'/>
<id>urn:sha1:34bbfdfb146be3ad485cbe526b2a1e9ce220649c</id>
<content type='text'>
The KVM patching callbacks use cpus_have_final_cap() internally within
has_vhe(), and subsequent patches will make it invalid to call
cpus_have_final_cap() before alternatives patching has completed, and
will mean that cpus_have_const_cap() will always fall back to dynamic
checks prior to alternatives patching.

In preparation for said change, this patch modifies the KVM patching
callbacks to use cpus_have_cap() directly. This is not subject to
patching, and will dynamically check the cpu_hwcaps array, which is
functionally equivalent to the existing behaviour.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: James Morse &lt;james.morse@arm.com&gt;
Cc: Joey Gouly &lt;joey.gouly@arm.com&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20220912162210.3626215-3-mark.rutland@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Generate final CTR_EL0 value when running in Protected mode</title>
<updated>2021-03-25T11:00:33Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2021-03-22T12:09:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=755db23420a1ce4b740186543432983e9bbe713e'/>
<id>urn:sha1:755db23420a1ce4b740186543432983e9bbe713e</id>
<content type='text'>
In protected mode, late CPUs are not allowed to boot (enforced by
the PSCI relay). We can thus specialise the read_ctr macro to
always return a pre-computed, sanitised value. Special care is
taken to prevent the use of this custome version outside of
the protected mode.

Reviewed-by: Quentin Perret &lt;qperret@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Remove patching of fn pointers in hyp</title>
<updated>2021-01-23T14:01:00Z</updated>
<author>
<name>David Brazdil</name>
</author>
<published>2021-01-05T18:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=537db4af26e3f2e0f304f2032bc593f7e2a54938'/>
<id>urn:sha1:537db4af26e3f2e0f304f2032bc593f7e2a54938</id>
<content type='text'>
Storing a function pointer in hyp now generates relocation information
used at early boot to convert the address to hyp VA. The existing
alternative-based conversion mechanism is therefore obsolete. Remove it
and simplify its users.

Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Signed-off-by: David Brazdil &lt;dbrazdil@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20210105180541.65031-8-dbrazdil@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Apply hyp relocations at runtime</title>
<updated>2021-01-23T14:01:00Z</updated>
<author>
<name>David Brazdil</name>
</author>
<published>2021-01-05T18:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ec6259d7084ed32e164c9f7b69049464dd90fa5'/>
<id>urn:sha1:6ec6259d7084ed32e164c9f7b69049464dd90fa5</id>
<content type='text'>
KVM nVHE code runs under a different VA mapping than the kernel, hence
so far it avoided using absolute addressing because the VA in a constant
pool is relocated by the linker to a kernel VA (see hyp_symbol_addr).

Now the kernel has access to a list of positions that contain a kimg VA
but will be accessed only in hyp execution context. These are generated
by the gen-hyprel build-time tool and stored in .hyp.reloc.

Add early boot pass over the entries and convert the kimg VAs to hyp VAs.
Note that this requires for .hyp* ELF sections to be mapped read-write
at that point.

Signed-off-by: David Brazdil &lt;dbrazdil@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20210105180541.65031-6-dbrazdil@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Minor cleanup of hyp variables used in host</title>
<updated>2020-12-22T10:49:01Z</updated>
<author>
<name>David Brazdil</name>
</author>
<published>2020-12-08T14:24:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61fe0c37af57ac35472a870581a7d0bb5ac2f63a'/>
<id>urn:sha1:61fe0c37af57ac35472a870581a7d0bb5ac2f63a</id>
<content type='text'>
Small cleanup moving declarations of hyp-exported variables to
kvm_host.h and using macros to avoid having to refer to them with
kvm_nvhe_sym() in host.

No functional change intended.

Signed-off-by: David Brazdil &lt;dbrazdil@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20201208142452.87237-5-dbrazdil@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: Use lm_alias in nVHE-only VA conversion</title>
<updated>2020-12-22T10:48:50Z</updated>
<author>
<name>David Brazdil</name>
</author>
<published>2020-12-08T14:24:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a96a0687b80a1870c689418d7b72012c8bdd53d'/>
<id>urn:sha1:7a96a0687b80a1870c689418d7b72012c8bdd53d</id>
<content type='text'>
init_hyp_physvirt_offset() computes PA from a kernel VA. Conversion to
kernel linear-map is required first but the code used kvm_ksym_ref() for
this purpose. Under VHE that is a NOP and resulted in a runtime warning.
Replace kvm_ksym_ref with lm_alias.

Reported-by: Qian Cai &lt;qcai@redhat.com&gt;
Signed-off-by: David Brazdil &lt;dbrazdil@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20201208142452.87237-3-dbrazdil@google.com
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next</title>
<updated>2020-12-09T10:00:24Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2020-12-09T10:00:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a514592b698588326924625b6948a10c35fadd5'/>
<id>urn:sha1:3a514592b698588326924625b6948a10c35fadd5</id>
<content type='text'>
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: arm64: Add offset for hyp VA &lt;-&gt; PA conversion</title>
<updated>2020-12-04T10:08:34Z</updated>
<author>
<name>David Brazdil</name>
</author>
<published>2020-12-02T18:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d084ecc5c72811e7231838f7c128bfcc7f8d2889'/>
<id>urn:sha1:d084ecc5c72811e7231838f7c128bfcc7f8d2889</id>
<content type='text'>
Add a host-initialized constant to KVM nVHE hyp code for converting
between EL2 linear map virtual addresses and physical addresses.
Also add `__hyp_pa` macro that performs the conversion.

Signed-off-by: David Brazdil &lt;dbrazdil@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20201202184122.26046-18-dbrazdil@google.com
</content>
</entry>
<entry>
<title>Merge branch 'kvm-arm64/vector-rework' into kvmarm-master/next</title>
<updated>2020-11-27T11:47:08Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2020-11-27T11:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc2286f397e69989c803abfdb0d75ae90b88c98c'/>
<id>urn:sha1:dc2286f397e69989c803abfdb0d75ae90b88c98c</id>
<content type='text'>
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
</feed>
