<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/kvm/include/kvm_util.h, branch linux-rolling-lts</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-lts'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-18T08:25:43Z</updated>
<entry>
<title>Merge tag 'kvm-x86-fixes-6.18-rc2' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2025-10-18T08:25:43Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2025-10-18T08:25:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4361f5aa8bfcecbab3fc8db987482b9e08115a6a'/>
<id>urn:sha1:4361f5aa8bfcecbab3fc8db987482b9e08115a6a</id>
<content type='text'>
KVM x86 fixes for 6.18:

 - Expand the KVM_PRE_FAULT_MEMORY selftest to add a regression test for the
   bug fixed by commit 3ccbf6f47098 ("KVM: x86/mmu: Return -EAGAIN if userspace
   deletes/moves memslot during prefault")

 - Don't try to get PMU capabbilities from perf when running a CPU with hybrid
   CPUs/PMUs, as perf will rightly WARN.

 - Rework KVM_CAP_GUEST_MEMFD_MMAP (newly introduced in 6.18) into a more
   generic KVM_CAP_GUEST_MEMFD_FLAGS

 - Add a guest_memfd INIT_SHARED flag and require userspace to explicitly set
   said flag to initialize memory as SHARED, irrespective of MMAP.  The
   behavior merged in 6.18 is that enabling mmap() implicitly initializes
   memory as SHARED, which would result in an ABI collision for x86 CoCo VMs
   as their memory is currently always initialized PRIVATE.

 - Allow mmap() on guest_memfd for x86 CoCo VMs, i.e. on VMs with private
   memory, to enable testing such setups, i.e. to hopefully flush out any
   other lurking ABI issues before 6.18 is officially released.

 - Add testcases to the guest_memfd selftest to cover guest_memfd without MMAP,
   and host userspace accesses to mmap()'d private memory.
</content>
</entry>
<entry>
<title>KVM: selftests: Fix irqfd_test for non-x86 architectures</title>
<updated>2025-10-13T13:17:03Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-09-30T19:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a133052666bed0dc0b169952e9d3f9e6b2125f9a'/>
<id>urn:sha1:a133052666bed0dc0b169952e9d3f9e6b2125f9a</id>
<content type='text'>
The KVM_IRQFD ioctl fails if no irqchip is present in-kernel, which
isn't too surprising as there's not much KVM can do for an IRQ if it
cannot resolve a destination.

As written the irqfd_test assumes that a 'default' VM created in
selftests has an in-kernel irqchip created implicitly. That may be the
case on x86 but it isn't necessarily true on other architectures.

Add an arch predicate indicating if 'default' VMs get an irqchip and
make the irqfd_test depend on it. Work around arm64 VGIC initialization
requirements by using vm_create_with_one_vcpu(), ignoring the created
vCPU as it isn't used for the test.

Reported-by: Sebastian Ott &lt;sebott@redhat.com&gt;
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Acked-by: Sean Christopherson &lt;seanjc@google.com&gt;
Fixes: 7e9b231c402a ("KVM: selftests: Add a KVM_IRQFD test to verify uniqueness requirements")
Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add wrappers for mmap() and munmap() to assert success</title>
<updated>2025-10-10T21:25:28Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2025-10-03T23:26:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61cee97f40180312dcca9580a5be0b0aa2217f6e'/>
<id>urn:sha1:61cee97f40180312dcca9580a5be0b0aa2217f6e</id>
<content type='text'>
Add and use wrappers for mmap() and munmap() that assert success to reduce
a significant amount of boilerplate code, to ensure all tests assert on
failure, and to provide consistent error messages on failure.

No functional change intended.

Reviewed-by: Fuad Tabba &lt;tabba@google.com&gt;
Tested-by: Fuad Tabba &lt;tabba@google.com&gt;
Reviewed-by: David Hildenbrand &lt;david@redhat.com&gt;
Reviewed-by: Ackerley Tng &lt;ackerleytng@google.com&gt;
Link: https://lore.kernel.org/r/20251003232606.4070510-10-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-selftests-6.18' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2025-09-30T17:23:54Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2025-09-30T17:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=473badf5c478174754580bfa9d3207cf9b8d412e'/>
<id>urn:sha1:473badf5c478174754580bfa9d3207cf9b8d412e</id>
<content type='text'>
KVM selftests changes for 6.18

 - Add #DE coverage in the fastops test (the only exception that's guest-
   triggerable in fastop-emulated instructions).

 - Fix PMU selftests errors encountered on Granite Rapids (GNR), Sierra
   Forest (SRF) and Clearwater Forest (CWF).

 - Minor cleanups and improvements
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: Alias EL1 registers to EL2 counterparts</title>
<updated>2025-09-24T18:23:32Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-09-17T21:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c9604ba234711ca759f1147f2fbc7a94a5a486d'/>
<id>urn:sha1:1c9604ba234711ca759f1147f2fbc7a94a5a486d</id>
<content type='text'>
FEAT_VHE has the somewhat nice property of implicitly redirecting EL1
register aliases to their corresponding EL2 representations when E2H=1.
Unfortunately, there's no such abstraction for userspace and EL2
registers are always accessed by their canonical encoding.

Introduce a helper that applies EL2 redirections to sysregs and use
aggressive inlining to catch misuse at compile time. Go a little past
the architectural definition for ease of use for test authors (e.g. the
stack pointer).

Signed-off-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: selftests: Create a VGICv3 for 'default' VMs</title>
<updated>2025-09-24T18:23:32Z</updated>
<author>
<name>Oliver Upton</name>
</author>
<published>2025-09-17T21:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8911c7dbc607212bf3dfc963004b062588c0ab38'/>
<id>urn:sha1:8911c7dbc607212bf3dfc963004b062588c0ab38</id>
<content type='text'>
Start creating a VGICv3 by default unless explicitly opted-out by the
test. While having an interrupt controller is nice, the real benefit
here is clearing a hurdle for EL2 VMs which mandate the presence of a
VGIC.

Signed-off-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Move Intel and AMD module param helpers to x86/processor.h</title>
<updated>2025-08-19T15:00:29Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2025-08-06T22:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2bcf62a2e78f8d7e95485c0347bccfba3c5e459'/>
<id>urn:sha1:e2bcf62a2e78f8d7e95485c0347bccfba3c5e459</id>
<content type='text'>
Move the x86 specific helpers for getting kvm_{amd,intel} module params to
x86 where they belong.  Expose the module-agnostic helpers globally, there
is nothing secret about the logic.

Link: https://lore.kernel.org/r/20250806225159.1687326-1-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-selftests-6.17' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2025-07-29T12:36:44Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2025-07-28T15:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4733cd5be1a284cd92840f3126e4165ab34460c'/>
<id>urn:sha1:b4733cd5be1a284cd92840f3126e4165ab34460c</id>
<content type='text'>
KVM selftests changes for 6.17

 - Fix a comment typo.

 - Verify KVM is loaded when getting any KVM module param so that attempting to
   run a selftest without kvm.ko loaded results in a SKIP message about KVM not
   being loaded/enabled, versus some random parameter not existing.

 - SKIP tests that hit EACCES when attempting to access a file, with a "Root
   required?" help message.  In most cases, the test just needs to be run with
   elevated permissions.
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-misc-6.17' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2025-07-29T12:36:43Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2025-07-28T15:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a14928e2e91a098c6117ba52b06327e3fc5072c'/>
<id>urn:sha1:1a14928e2e91a098c6117ba52b06327e3fc5072c</id>
<content type='text'>
KVM x86 misc changes for 6.17

 - Prevert the host's DEBUGCTL.FREEZE_IN_SMM (Intel only) when running the
   guest.  Failure to honor FREEZE_IN_SMM can bleed host state into the guest.

 - Explicitly check vmcs12.GUEST_DEBUGCTL on nested VM-Enter (Intel only) to
   prevent L1 from running L2 with features that KVM doesn't support, e.g. BTF.

 - Intercept SPEC_CTRL on AMD if the MSR shouldn't exist according to the
   vCPU's CPUID model.

 - Rework the MSR interception code so that the SVM and VMX APIs are more or
   less identical.

 - Recalculate all MSR intercepts from the "source" on MSR filter changes, and
   drop the dedicated "shadow" bitmaps (and their awful "max" size defines).

 - WARN and reject loading kvm-amd.ko instead of panicking the kernel if the
   nested SVM MSRPM offsets tracker can't handle an MSR.

 - Advertise support for LKGS (Load Kernel GS base), a new instruction that's
   loosely related to FRED, but is supported and enumerated independently.

 - Fix a user-triggerable WARN that syzkaller found by stuffing INIT_RECEIVED,
   a.k.a. WFS, and then putting the vCPU into VMX Root Mode (post-VMXON).  Use
   the same approach KVM uses for dealing with "impossible" emulation when
   running a !URG guest, and simply wait until KVM_RUN to detect that the vCPU
   has architecturally impossible state.

 - Add KVM_X86_DISABLE_EXITS_APERFMPERF to allow disabling interception of
   APERF/MPERF reads, so that a "properly" configured VM can "virtualize"
   APERF/MPERF (with many caveats).

 - Reject KVM_SET_TSC_KHZ if vCPUs have been created, as changing the "default"
   frequency is unsupported for VMs with a "secure" TSC, and there's no known
   use case for changing the default frequency for other VM types.
</content>
</entry>
<entry>
<title>KVM: selftests: Expand set of APIs for pinning tasks to a single CPU</title>
<updated>2025-07-09T16:33:40Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2025-06-26T00:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e83ee6f76c33de80d5fe4cec523e2b95bfc5e3ea'/>
<id>urn:sha1:e83ee6f76c33de80d5fe4cec523e2b95bfc5e3ea</id>
<content type='text'>
Expand kvm_pin_this_task_to_pcpu() into a set of APIs to allow pinning a
task (or self) to a CPU (any or specific).  This will allow deduplicating
code throughout a variety of selftests.

Opportunistically use "self" instead of "this_task" as it is both more
concise and less ambiguous.

Link: https://lore.kernel.org/r/20250626001225.744268-4-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
</feed>
