<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/kvm/set_memory_region_test.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>2025-10-10T21:25:28Z</updated>
<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>KVM: selftests: Add supported test cases for LoongArch</title>
<updated>2025-05-20T12:20:26Z</updated>
<author>
<name>Bibo Mao</name>
</author>
<published>2025-05-20T12:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a867688c8cbb1b83667a6665362d89e8c762e820'/>
<id>urn:sha1:a867688c8cbb1b83667a6665362d89e8c762e820</id>
<content type='text'>
Some common KVM test cases are supported on LoongArch now as following:
  coalesced_io_test
  demand_paging_test
  dirty_log_perf_test
  dirty_log_test
  guest_print_test
  hardware_disable_test
  kvm_binary_stats_test
  kvm_create_max_vcpus
  kvm_page_table_test
  memslot_modification_stress_test
  memslot_perf_test
  set_memory_region_test

And other test cases are not supported by LoongArch such as rseq_test,
since it is not supported on LoongArch physical machine either.

Signed-off-by: Bibo Mao &lt;maobibo@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add test case for MMIO during vectoring on x86</title>
<updated>2024-12-18T23:14:47Z</updated>
<author>
<name>Ivan Orlov</name>
</author>
<published>2024-12-17T18:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62e41f6b4f3697e5909cdf70d56e9a7ebd958732'/>
<id>urn:sha1:62e41f6b4f3697e5909cdf70d56e9a7ebd958732</id>
<content type='text'>
Extend the 'set_memory_region_test' with an x86-only test case which
covers emulated MMIO during event vectoring error handling. The test case

1) Sets an IDT descriptor base to point to an MMIO address
2) Generates a #GP in the guest
3) Verifies userspace gets the correct exit reason, suberror code, and
   GPA in internal.data[3]

Opportunistically add a definition for a non-canonical address to
processor.h so that the source of the #GP is somewhat self-documenting,
and so that future tests don't have to reinvent the wheel.

Signed-off-by: Ivan Orlov &lt;iorlov@amazon.com&gt;
Link: https://lore.kernel.org/r/20241217181458.68690-8-iorlov@amazon.com
[sean: massage changelog]
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add and use a helper function for x86's LIDT</title>
<updated>2024-12-18T23:14:46Z</updated>
<author>
<name>Ivan Orlov</name>
</author>
<published>2024-12-17T18:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e9427aeb9572a4023b42e64ca2cd2ca3cbf7e20'/>
<id>urn:sha1:4e9427aeb9572a4023b42e64ca2cd2ca3cbf7e20</id>
<content type='text'>
Implement a function for setting the IDT descriptor from the guest
code. Replace the existing lidt occurrences with calls to this function
as `lidt` is used in multiple places.

Signed-off-by: Ivan Orlov &lt;iorlov@amazon.com&gt;
Link: https://lore.kernel.org/r/20241217181458.68690-7-iorlov@amazon.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories</title>
<updated>2024-12-18T22:15:04Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2024-11-28T00:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67730e6c53d70fb31618230f81c4acee9f72eaa3'/>
<id>urn:sha1:67730e6c53d70fb31618230f81c4acee9f72eaa3</id>
<content type='text'>
Use the kernel's canonical $(ARCH) paths instead of the raw target triple
for KVM selftests directories.  KVM selftests are quite nearly the only
place in the entire kernel that using the target triple for directories,
tools/testing/selftests/drivers/s390x being the lone holdout.

Using the kernel's preferred nomenclature eliminates the minor, but
annoying, friction of having to translate to KVM's selftests directories,
e.g. for pattern matching, opening files, running selftests, etc.

Opportunsitically delete file comments that reference the full path of the
file, as they are obviously prone to becoming stale, and serve no known
purpose.

Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Acked-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Acked-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20241128005547.4077116-16-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Test slot move/delete with slot zap quirk enabled/disabled</title>
<updated>2024-08-14T16:29:11Z</updated>
<author>
<name>Yan Zhao</name>
</author>
<published>2024-07-03T02:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4ed2c67d275b85b2ab07d54f88bebd5998d61d8'/>
<id>urn:sha1:b4ed2c67d275b85b2ab07d54f88bebd5998d61d8</id>
<content type='text'>
Update set_memory_region_test to make sure memslot move and deletion
function correctly both when slot zap quirk KVM_X86_QUIRK_SLOT_ZAP_ALL is
enabled and disabled.

Signed-off-by: Yan Zhao &lt;yan.y.zhao@intel.com&gt;
Message-ID: &lt;20240703021119.13904-1-yan.y.zhao@intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-selftests_utils-6.10' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2024-05-12T07:18:11Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2024-05-12T07:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dee7ea42a1eba18bf4722a27b10773607c66e21d'/>
<id>urn:sha1:dee7ea42a1eba18bf4722a27b10773607c66e21d</id>
<content type='text'>
KVM selftests treewide updates for 6.10:

 - Define _GNU_SOURCE for all selftests to fix a warning that was introduced by
   a change to kselftest_harness.h late in the 6.9 cycle, and because forcing
   every test to #define _GNU_SOURCE is painful.

 - Provide a global psuedo-RNG instance for all tests, so that library code can
   generate random, but determinstic numbers.

 - Use the global pRNG to randomly force emulation of select writes from guest
   code on x86, e.g. to help validate KVM's emulation of locked accesses.

 - Rename kvm_util_base.h back to kvm_util.h, as the weird layer of indirection
   was added purely to avoid manually #including ucall_common.h in a handful of
   locations.

 - Allocate and initialize x86's GDT, IDT, TSS, segments, and default exception
   handlers at VM creation, instead of forcing tests to manually trigger the
   related setup.
</content>
</entry>
<entry>
<title>Merge tag 'loongarch-kvm-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD</title>
<updated>2024-05-10T17:20:18Z</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2024-05-10T14:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4232da23d75d173195c6766729e51947b64f83cd'/>
<id>urn:sha1:4232da23d75d173195c6766729e51947b64f83cd</id>
<content type='text'>
LoongArch KVM changes for v6.10

1. Add ParaVirt IPI support.
2. Add software breakpoint support.
3. Add mmio trace events support.
</content>
</entry>
<entry>
<title>KVM: selftests: Explicitly clobber the IDT in the "delete memslot" testcase</title>
<updated>2024-04-29T19:55:12Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2024-03-14T23:26:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61c3cffd4cbfe5c795d2eaf4a0341ec347fd0799'/>
<id>urn:sha1:61c3cffd4cbfe5c795d2eaf4a0341ec347fd0799</id>
<content type='text'>
Explicitly clobber the guest IDT in the "delete memslot" test, which
expects the deleted memslot to result in either a KVM emulation error, or
a triple fault shutdown.  A future change to the core selftests library
will configuring the guest IDT and exception handlers by default, i.e.
will install a guest #PF handler and put the guest into an infinite #NPF
loop (the guest hits a !PRESENT SPTE when trying to vector a #PF, and KVM
reinjects the #PF without fixing the #NPF, because there is no memslot).

Note, it's not clear whether or not KVM's behavior is reasonable in this
case, e.g. arguably KVM should try (and fail) to emulate in response to
the #NPF.  But barring a goofy/broken userspace, this scenario will likely
never happen in practice.  Punt the KVM investigation to the future.

Link: https://lore.kernel.org/r/20240314232637.2538648-8-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Define _GNU_SOURCE for all selftests code</title>
<updated>2024-04-29T19:49:10Z</updated>
<author>
<name>Sean Christopherson</name>
</author>
<published>2024-04-23T19:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=730cfa45b5f4f170095707b526dc7af99c9f0959'/>
<id>urn:sha1:730cfa45b5f4f170095707b526dc7af99c9f0959</id>
<content type='text'>
Define _GNU_SOURCE is the base CFLAGS instead of relying on selftests to
manually #define _GNU_SOURCE, which is repetitive and error prone.  E.g.
kselftest_harness.h requires _GNU_SOURCE for asprintf(), but if a selftest
includes kvm_test_harness.h after stdio.h, the include guards result in
the effective version of stdio.h consumed by kvm_test_harness.h not
defining asprintf():

  In file included from x86_64/fix_hypercall_test.c:12:
  In file included from include/kvm_test_harness.h:11:
 ../kselftest_harness.h:1169:2: error: call to undeclared function
  'asprintf'; ISO C99 and later do not support implicit function declarations
  [-Wimplicit-function-declaration]
   1169 |         asprintf(&amp;test_name, "%s%s%s.%s", f-&gt;name,
        |         ^

When including the rseq selftest's "library" code, #undef _GNU_SOURCE so
that rseq.c controls whether or not it wants to build with _GNU_SOURCE.

Reported-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Acked-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Acked-by: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Acked-by: Anup Patel &lt;anup@brainfault.org&gt;
Reviewed-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Link: https://lore.kernel.org/r/20240423190308.2883084-1-seanjc@google.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
</feed>
