<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/kvm/lib, branch v6.3.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-05-24T16:30:10+00:00</updated>
<entry>
<title>KVM: selftests: Add 'malloc' failure check in vcpu_save_state</title>
<updated>2023-05-24T16:30:10+00:00</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-03-22T14:45:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b894457e7435eab87b21be87f7b8a43cd79d721'/>
<id>urn:sha1:4b894457e7435eab87b21be87f7b8a43cd79d721</id>
<content type='text'>
[ Upstream commit 735b0e0f2d001b7ed9486db84453fb860e764a4d ]

There is a 'malloc' call in vcpu_save_state function, which can
be unsuccessful. This patch will add the malloc failure checking
to avoid possible null dereference and give more information
about test fail reasons.

Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Link: https://lore.kernel.org/r/20230322144528.704077-1-ivan.orlov0322@gmail.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Sync KVM exit reasons in selftests</title>
<updated>2023-03-14T14:20:10+00:00</updated>
<author>
<name>Vipin Sharma</name>
<email>vipinsh@google.com</email>
</author>
<published>2023-02-04T01:45:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3e707413dbe3920a972d0c2b51175180e7de36b'/>
<id>urn:sha1:f3e707413dbe3920a972d0c2b51175180e7de36b</id>
<content type='text'>
Add missing KVM_EXIT_* reasons in KVM selftests from
include/uapi/linux/kvm.h

Signed-off-by: Vipin Sharma &lt;vipinsh@google.com&gt;
Message-Id: &lt;20230204014547.583711-5-vipinsh@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add macro to generate KVM exit reason strings</title>
<updated>2023-03-14T14:20:10+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2023-02-04T01:45:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b3d660e5d7b8b408a2b0988de65672199ebfaf2'/>
<id>urn:sha1:1b3d660e5d7b8b408a2b0988de65672199ebfaf2</id>
<content type='text'>
Add and use a macro to generate the KVM exit reason strings array
instead of relying on developers to correctly copy+paste+edit each
string.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Message-Id: &lt;20230204014547.583711-4-vipinsh@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Make vCPU exit reason test assertion common</title>
<updated>2023-03-14T14:20:09+00:00</updated>
<author>
<name>Vipin Sharma</name>
<email>vipinsh@google.com</email>
</author>
<published>2023-02-04T01:45:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c96f57b08012805da323c6bdf929bab1b88d250c'/>
<id>urn:sha1:c96f57b08012805da323c6bdf929bab1b88d250c</id>
<content type='text'>
Make TEST_ASSERT_KVM_EXIT_REASON() macro and replace all exit reason
test assert statements with it.

No functional changes intended.

Signed-off-by: Vipin Sharma &lt;vipinsh@google.com&gt;
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Message-Id: &lt;20230204014547.583711-2-vipinsh@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls</title>
<updated>2023-03-14T14:20:08+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2023-02-04T02:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02'/>
<id>urn:sha1:c0c76d99939cb4ac28cbc5ce542cff2b9e1e1b02</id>
<content type='text'>
Add wrappers to do hypercalls using VMCALL/VMMCALL and Xen's register ABI
(as opposed to full Xen-style hypercalls through a hypervisor provided
page).  Using the common helpers dedups a pile of code, and uses the
native hypercall instruction when running on AMD.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Message-Id: &lt;20230204024151.1373296-3-seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Move the guts of kvm_hypercall() to a separate macro</title>
<updated>2023-03-14T14:20:07+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2023-02-04T02:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4009e0bb7b83d967a14e108d271f003b378f9af9'/>
<id>urn:sha1:4009e0bb7b83d967a14e108d271f003b378f9af9</id>
<content type='text'>
Extract the guts of kvm_hypercall() to a macro so that Xen hypercalls,
which have a different register ABI, can reuse the VMCALL vs. VMMCALL
logic.

No functional change intended.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Message-Id: &lt;20230204024151.1373296-2-seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: KVM: skip hugetlb tests if huge pages are not available</title>
<updated>2023-03-14T14:20:06+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-03-14T12:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3dc40cf89b9b763910cb0540a35f9d66a067475d'/>
<id>urn:sha1:3dc40cf89b9b763910cb0540a35f9d66a067475d</id>
<content type='text'>
Right now, if KVM memory stress tests are run with hugetlb sources but hugetlb is
not available (either in the kernel or because /proc/sys/vm/nr_hugepages is 0)
the test will fail with a memory allocation error.

This makes it impossible to add tests that default to hugetlb-backed memory,
because on a machine with a default configuration they will fail.  Therefore,
check HugePages_Total as well and, if zero, direct the user to enable hugepages
in procfs.  Furthermore, return KSFT_SKIP whenever hugetlb is not available.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'kvm-x86-selftests-6.3' of https://github.com/kvm-x86/linux into HEAD</title>
<updated>2023-02-15T13:34:32+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2023-02-15T13:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e84183f68edb72e70e232b842d47058cba3476ec'/>
<id>urn:sha1:e84183f68edb72e70e232b842d47058cba3476ec</id>
<content type='text'>
KVM selftests changes for 6.3:

 - Cache the CPU vendor (AMD vs. Intel) and use the info to emit the correct
   hypercall instruction instead of relying on KVM to patch in VMMCALL

 - A variety of one-off cleanups and fixes
</content>
</entry>
<entry>
<title>KVM: selftests: Remove duplicate macro definition</title>
<updated>2023-02-08T14:53:14+00:00</updated>
<author>
<name>Shaoqin Huang</name>
<email>shahuang@redhat.com</email>
</author>
<published>2023-02-08T07:18:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=695fa5a64cf52ab1aa2c89c93bbb1fd08995304a'/>
<id>urn:sha1:695fa5a64cf52ab1aa2c89c93bbb1fd08995304a</id>
<content type='text'>
The KVM_GUEST_PAGE_TABLE_MIN_PADDR macro has been defined in
include/kvm_util_base.h. So remove the duplicate definition in
lib/kvm_util.c.

Fixes: cce0c23dd944 ("KVM: selftests: Add wrapper to allocate page table page")
Signed-off-by: Shaoqin Huang &lt;shahuang@redhat.com&gt;
Link: https://lore.kernel.org/r/20230208071801.68620-1-shahuang@redhat.com
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
</content>
</entry>
<entry>
<title>selftests: KVM: Replace optarg with arg in guest_modes_cmdline</title>
<updated>2023-02-08T14:38:47+00:00</updated>
<author>
<name>Shaoqin Huang</name>
<email>shahuang@redhat.com</email>
</author>
<published>2023-02-02T02:57:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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>
</feed>
