<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/kvm/lib/guest_modes.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-02-06T13:35:23Z</updated>
<entry>
<title>KVM: riscv: selftests: Add riscv vm satp modes</title>
<updated>2026-02-06T13:35:23Z</updated>
<author>
<name>Wu Fei</name>
</author>
<published>2025-11-05T15:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=39ad809dd2579d9b7400bbc50a5b95d84527b75e'/>
<id>urn:sha1:39ad809dd2579d9b7400bbc50a5b95d84527b75e</id>
<content type='text'>
Current vm modes cannot represent riscv guest modes precisely, here add
all 9 combinations of P(56,40,41) x V(57,48,39). Also the default vm
mode is detected on runtime instead of hardcoded one, which might not be
supported on specific machine.

Signed-off-by: Wu Fei &lt;wu.fei9@sanechips.com.cn&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Nutty Liu &lt;nutty.liu@hotmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251105151442.28767-1-wu.fei9@sanechips.com.cn
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Support P52V48 4K and 16K guest_modes</title>
<updated>2023-11-27T15:03:50Z</updated>
<author>
<name>Ryan Roberts</name>
</author>
<published>2023-11-27T11:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10a0cc3b688fcf753ff3f6518bb15e7a6809e908'/>
<id>urn:sha1:10a0cc3b688fcf753ff3f6518bb15e7a6809e908</id>
<content type='text'>
Add support for VM_MODE_P52V48_4K and VM_MODE_P52V48_16K guest modes by
using the FEAT_LPA2 pte format for stage1, when FEAT_LPA2 is available.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Ryan Roberts &lt;ryan.roberts@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231127111737.1897081-13-ryan.roberts@arm.com
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Determine max ipa size per-page size</title>
<updated>2023-11-27T15:03:50Z</updated>
<author>
<name>Ryan Roberts</name>
</author>
<published>2023-11-27T11:17:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72324ac52ddddb168d8008e36d6a617b9b74f6c1'/>
<id>urn:sha1:72324ac52ddddb168d8008e36d6a617b9b74f6c1</id>
<content type='text'>
We are about to add 52 bit PA guest modes for 4K and 16K pages when the
system supports LPA2. In preparation beef up the logic that parses mmfr0
to also tell us what the maximum supported PA size is for each page
size. Max PA size = 0 implies the page size is not supported at all.

Reviewed-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Ryan Roberts &lt;ryan.roberts@arm.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20231127111737.1897081-12-ryan.roberts@arm.com
</content>
</entry>
<entry>
<title>selftests: KVM: Replace optarg with arg in guest_modes_cmdline</title>
<updated>2023-02-08T14:38:47Z</updated>
<author>
<name>Shaoqin Huang</name>
</author>
<published>2023-02-02T02:57:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ae69d7087a9a4d014e11b5328a49091cc1682f8'/>
<id>urn:sha1:7ae69d7087a9a4d014e11b5328a49091cc1682f8</id>
<content type='text'>
The parameter arg in guest_modes_cmdline not being used now, and the
optarg should be replaced with arg in guest_modes_cmdline.

And this is the chance to change strtoul() to atoi_non_negative(), since
guest mode ID will never be negative.

Signed-off-by: Shaoqin Huang &lt;shahuang@redhat.com&gt;
Fixes: e42ac777d661 ("KVM: selftests: Factor out guest mode code")
Reviewed-by: Andrew Jones &lt;andrew.jones@linux.dev&gt;
Reviewed-by: Vipin Sharma &lt;vipinsh@google.com&gt;
Link: https://lore.kernel.org/r/20230202025716.216323-1-shahuang@redhat.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Sanity check input to ioctls() at build time</title>
<updated>2022-06-11T15:48:09Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2022-06-01T18:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fcba483e82462830dd368951c0df03a95676f34d'/>
<id>urn:sha1:fcba483e82462830dd368951c0df03a95676f34d</id>
<content type='text'>
Add a static assert to the KVM/VM/vCPU ioctl() helpers to verify that the
size of the argument provided matches the expected size of the IOCTL.
Because ioctl() ultimately takes a "void *", it's all too easy to pass in
garbage and not detect the error until runtime.  E.g. while working on a
CPUID rework, selftests happily compiled when vcpu_set_cpuid()
unintentionally passed the cpuid() function as the parameter to ioctl()
(a local "cpuid" parameter was removed, but its use was not replaced with
"vcpu-&gt;cpuid" as intended).

Tweak a variety of benign issues that aren't compatible with the sanity
check, e.g. passing a non-pointer for ioctls().

Note, static_assert() requires a string on older versions of GCC.  Feed
it an empty string to make the compiler happy.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Split get/set device_attr helpers</title>
<updated>2022-06-11T15:46:23Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2022-06-09T20:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4091818426d98f4e7093808264caf86ad90287c8'/>
<id>urn:sha1:4091818426d98f4e7093808264caf86ad90287c8</id>
<content type='text'>
Split the get/set device_attr helpers instead of using a boolean param to
select between get and set.  Duplicating upper level wrappers is a very,
very small price to pay for improved readability, and having constant (at
compile time) inputs will allow the selftests framework to sanity check
ioctl() invocations.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Use kvm_ioctl() helpers</title>
<updated>2022-06-11T14:20:09Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2022-02-15T20:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9725f89dc5027c7d94f8fdfbac8bbad846a0891'/>
<id>urn:sha1:f9725f89dc5027c7d94f8fdfbac8bbad846a0891</id>
<content type='text'>
Use the recently introduced KVM-specific ioctl() helpers instead of open
coding calls to ioctl() just to pretty print the ioctl name.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-riscv-5.17-1' of https://github.com/kvm-riscv/linux into HEAD</title>
<updated>2022-01-07T15:43:02Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2022-01-07T15:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b0c9d00aa2cf93dd26760dc9e4cf4725fc5ec03'/>
<id>urn:sha1:1b0c9d00aa2cf93dd26760dc9e4cf4725fc5ec03</id>
<content type='text'>
KVM/riscv changes for 5.17, take #1

- Use common KVM implementation of MMU memory caches
- SBI v0.2 support for Guest
- Initial KVM selftests support
- Fix to avoid spurious virtual interrupts after clearing hideleg CSR
- Update email address for Anup and Atish
</content>
</entry>
<entry>
<title>KVM: selftests: Add initial support for RISC-V 64-bit</title>
<updated>2022-01-06T09:47:50Z</updated>
<author>
<name>Anup Patel</name>
</author>
<published>2021-10-05T12:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e06cdf10520e629e711b76b21070d6e67ae7d06'/>
<id>urn:sha1:3e06cdf10520e629e711b76b21070d6e67ae7d06</id>
<content type='text'>
We add initial support for RISC-V 64-bit in KVM selftests using
which we can cross-compile and run arch independent tests such as:
demand_paging_test
dirty_log_test
kvm_create_max_vcpus,
kvm_page_table_test
set_memory_region_test
kvm_binary_stats_test

All VM guest modes defined in kvm_util.h require at least 48-bit
guest virtual address so to use KVM RISC-V selftests hardware
need to support at least Sv48 MMU for guest (i.e. VS-mode).

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-and-tested-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Add support for various modes with 16kB page size</title>
<updated>2021-12-28T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2021-12-27T12:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa674de1dc3d2bdf2c67ad195dc81977972323c6'/>
<id>urn:sha1:aa674de1dc3d2bdf2c67ad195dc81977972323c6</id>
<content type='text'>
The 16kB page size is not a popular choice, due to only a few CPUs
actually implementing support for it. However, it can lead to some
interesting performance improvements given the right uarch choices.

Add support for this page size for various PA/VA combinations.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Link: https://lore.kernel.org/r/20211227124809.1335409-7-maz@kernel.org
</content>
</entry>
</feed>
