<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/kvm/lib, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2026-04-13T17:01:15Z</updated>
<entry>
<title>Merge tag 'kvm-s390-next-7.1-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD</title>
<updated>2026-04-13T17:01:15Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-04-13T17:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b802031877a995456c528095c41d1948546bf45'/>
<id>urn:sha1:6b802031877a995456c528095c41d1948546bf45</id>
<content type='text'>
- ESA nesting support
- 4k memslots
- LPSW/E fix
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-nested-7.1' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2026-04-13T11:01:50Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-04-13T11:01:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea8bc95fbb75da215b7533c7c46f63423e84ff5e'/>
<id>urn:sha1:ea8bc95fbb75da215b7533c7c46f63423e84ff5e</id>
<content type='text'>
KVM nested SVM changes for 7.1 (with one common x86 fix)

 - To minimize the probability of corrupting guest state, defer KVM's
   non-architectural delivery of exception payloads (e.g. CR2 and DR6) until
   consumption of the payload is imminent, and force delivery of the payload
   in all paths where userspace saves relevant state.

 - Use vcpu-&gt;arch.cr2 when updating vmcb12's CR2 on nested #VMEXIT to fix a
   bug where L2's CR2 can get corrupted after a save/restore, e.g. if the VM
   is migrated while L2 is faulting in memory.

 - Fix a class of nSVM bugs where some fields written by the CPU are not
   synchronized from vmcb02 to cached vmcb12 after VMRUN, and so are not
   up-to-date when saved by KVM_GET_NESTED_STATE.

 - Fix a class of bugs where the ordering between KVM_SET_NESTED_STATE and
   KVM_SET_{S}REGS could cause vmcb02 to be incorrectly initialized after
   save+restore.

 - Add a variety of missing nSVM consistency checks.

 - Fix several bugs where KVM failed to correctly update VMCB fields on nested
   #VMEXIT.

 - Fix several bugs where KVM failed to correctly synthesize #UD or #GP for
   SVM-related instructions.

 - Add support for save+restore of virtualized LBRs (on SVM).

 - Refactor various helpers and macros to improve clarity and (hopefully) make
   the code easier to maintain.

 - Aggressively sanitize fields when copying from vmcb12 to guard against
   unintentionally allowing L1 to utilize yet-to-be-defined features.

 - Fix several bugs where KVM botched rAX legality checks when emulating SVM
   instructions.  Note, KVM is still flawed in that KVM doesn't address size
   prefix overrides for 64-bit guests; this should probably be documented as a
   KVM erratum.

 - Fail emulation of VMRUN/VMLOAD/VMSAVE if mapping vmcb12 fails instead of
   somewhat arbitrarily synthesizing #GP (i.e. don't bastardize AMD's already-
   sketchy behavior of generating #GP if for "unsupported" addresses).

 - Cache all used vmcb12 fields to further harden against TOCTOU bugs.
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-selftests-7.1' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2026-04-13T09:53:46Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-04-13T09:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c13008ed3d76142a001ebc56d8e391431cac2411'/>
<id>urn:sha1:c13008ed3d76142a001ebc56d8e391431cac2411</id>
<content type='text'>
KVM selftests changes for 7.1

 - Add support for Hygon CPUs in KVM selftests.

 - Fix a bug in the MSR test where it would get false failures on AMD/Hygon
   CPUs with exactly one of RDPID or RDTSCP.

 - Add an MADV_COLLAPSE testcase for guest_memfd as a regression test for a
   bug where the kernel would attempt to collapse guest_memfd folios against
   KVM's will.
</content>
</entry>
<entry>
<title>Merge tag 'loongarch-kvm-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD</title>
<updated>2026-04-13T09:46:11Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-04-13T09:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=05578316ca7246b45fb7d9eaf81308c0e0f3ee10'/>
<id>urn:sha1:05578316ca7246b45fb7d9eaf81308c0e0f3ee10</id>
<content type='text'>
LoongArch KVM changes for v7.1

1. Use CSR_CRMD_PLV in kvm_arch_vcpu_in_kernel().
2. Let vcpu_is_preempted() a macro &amp; some enhanments.
3. Add DMSINTC irqchip in kernel support.
4. Add KVM PMU test cases for tools/selftests.
</content>
</entry>
<entry>
<title>KVM: LoongArch: selftests: Add basic PMU event counting test</title>
<updated>2026-04-09T10:56:37Z</updated>
<author>
<name>Song Gao</name>
<email>gaosong@loongson.cn</email>
</author>
<published>2026-04-09T10:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11c840192768a5a63b6aed75273c5e8e416230ee'/>
<id>urn:sha1:11c840192768a5a63b6aed75273c5e8e416230ee</id>
<content type='text'>
Introduce a basic PMU test that verifies hardware event counting for
four performance counters. The test enables the events for CPU cycles,
instructions retired, branch instructions, and branch misses, runs a
fixed number of loops, and checks that the counter values fall within
expected ranges. It also validates that the host supports PMU and that
the VM feature is enabled.

Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>KVM: LoongArch: selftests: Add cpucfg read/write helpers</title>
<updated>2026-04-09T10:56:37Z</updated>
<author>
<name>Song Gao</name>
<email>gaosong@loongson.cn</email>
</author>
<published>2026-04-09T10:56:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa19ea9a7bdb97575e05d72305a4c40a3a631357'/>
<id>urn:sha1:fa19ea9a7bdb97575e05d72305a4c40a3a631357</id>
<content type='text'>
Add helper macros and functions to read and write CPU configuration
registers (cpucfg) from the guest and from the VMM. This interface is
required in upcoming selftests for querying and setting CPU features,
such as PMU capabilities.

Signed-off-by: Song Gao &lt;gaosong@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Remove 1M alignment requirement for s390</title>
<updated>2026-04-07T15:07:27Z</updated>
<author>
<name>Claudio Imbrenda</name>
<email>imbrenda@linux.ibm.com</email>
</author>
<published>2026-04-02T15:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c10e2771c745a206a2642cb03eec40ace2e0a7b5'/>
<id>urn:sha1:c10e2771c745a206a2642cb03eec40ace2e0a7b5</id>
<content type='text'>
Remove the 1M memslot alignment requirement for s390, since it is not
needed anymore.

Reviewed-by: Steffen Eiden &lt;seiden@linux.ibm.com&gt;
Signed-off-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: riscv: selftests: Implement kvm_arch_has_default_irqchip</title>
<updated>2026-04-02T16:01:15Z</updated>
<author>
<name>Mayuresh Chitale</name>
<email>mayuresh.chitale@oss.qualcomm.com</email>
</author>
<published>2026-04-02T10:18:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ec8bea903f439acca927144570e1e419d2f9c9a'/>
<id>urn:sha1:1ec8bea903f439acca927144570e1e419d2f9c9a</id>
<content type='text'>
kvm_arch_has_default_irqchip is required for irqfd_test and returns
true if an in-kernel interrupt controller is supported.

Fixes: a133052666bed ("KVM: selftests: Fix irqfd_test for non-x86 architectures")
Signed-off-by: Mayuresh Chitale &lt;mayuresh.chitale@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20260402101818.2982071-1-mayuresh.chitale@oss.qualcomm.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: extract common functionality out of smm_test.c</title>
<updated>2026-03-11T17:41:12Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2026-03-09T12:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c52b534f26574ddf2f67cf07992ae2c25e8932c8'/>
<id>urn:sha1:c52b534f26574ddf2f67cf07992ae2c25e8932c8</id>
<content type='text'>
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: SVM: Rename vmcb-&gt;nested_ctl to vmcb-&gt;misc_ctl</title>
<updated>2026-03-05T00:09:03Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2026-03-03T16:58:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1aea80dd42cf46d11af5ff7874a4f4dae77efd6a'/>
<id>urn:sha1:1aea80dd42cf46d11af5ff7874a4f4dae77efd6a</id>
<content type='text'>
The 'nested_ctl' field is misnamed. Although the first bit is for nested
paging, the other defined bits are for SEV/SEV-ES. Other bits in the
same field according to the APM (but not defined by KVM) include "Guest
Mode Execution Trap", "Enable INVLPGB/TLBSYNC", and other control bits
unrelated to 'nested'.

There is nothing common among these bits, so just name the field
misc_ctl. Also rename the flags accordingly.

Signed-off-by: Yosry Ahmed &lt;yosry@kernel.org&gt;
Link: https://patch.msgid.link/20260303003421.2185681-19-yosry@kernel.org
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
</feed>
