<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/kvm/include, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-06-03T07:09:35Z</updated>
<entry>
<title>KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()</title>
<updated>2021-06-03T07:09:35Z</updated>
<author>
<name>David Matlack</name>
</author>
<published>2021-05-21T17:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=068ecf1c3f1816758906c58365d0c2718a453d36'/>
<id>urn:sha1:068ecf1c3f1816758906c58365d0c2718a453d36</id>
<content type='text'>
commit ef4c9f4f654622fa15b7a94a9bd1f19e76bb7feb upstream.

vm_get_max_gfn() casts vm-&gt;max_gfn from a uint64_t to an unsigned int,
which causes the upper 32-bits of the max_gfn to get truncated.

Nobody noticed until now likely because vm_get_max_gfn() is only used
as a mechanism to create a memslot in an unused region of the guest
physical address space (the top), and the top of the 32-bit physical
address space was always good enough.

This fix reveals a bug in memslot_modification_stress_test which was
trying to create a dummy memslot past the end of guest physical memory.
Fix that by moving the dummy memslot lower.

Fixes: 52200d0d944e ("KVM: selftests: Remove duplicate guest mode handling")
Reviewed-by: Venkatesh Srinivas &lt;venkateshs@chromium.org&gt;
Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Message-Id: &lt;20210521173828.1180619-1-dmatlack@google.com&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: add _vm_ioctl</title>
<updated>2021-03-18T17:55:14Z</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2021-03-18T15:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2c12909ae5f5181d9e0b0c536e26c6877daec48'/>
<id>urn:sha1:e2c12909ae5f5181d9e0b0c536e26c6877daec48</id>
<content type='text'>
As in kvm_ioctl and _kvm_ioctl, add
the respective _vm_ioctl for vm_ioctl.

_vm_ioctl invokes an ioctl using the vm fd,
leaving the caller to test the result.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20210318151624.490861-1-eesposit@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: add get_msr_index_features</title>
<updated>2021-03-18T17:30:49Z</updated>
<author>
<name>Emanuele Giuseppe Esposito</name>
</author>
<published>2021-03-18T14:56:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77a3aa26a00fe55325ae2a51d80a56836d1edce8'/>
<id>urn:sha1:77a3aa26a00fe55325ae2a51d80a56836d1edce8</id>
<content type='text'>
Test the KVM_GET_MSR_FEATURE_INDEX_LIST
and KVM_GET_MSR_INDEX_LIST ioctls.

Signed-off-by: Emanuele Giuseppe Esposito &lt;eesposit@redhat.com&gt;
Message-Id: &lt;20210318145629.486450-1-eesposit@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add missing header file needed by xAPIC IPI tests</title>
<updated>2021-02-11T13:02:08Z</updated>
<author>
<name>Peter Shier</name>
</author>
<published>2021-02-10T01:17:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=346b59f220a200f15e8d4ba7581347f6e058b69a'/>
<id>urn:sha1:346b59f220a200f15e8d4ba7581347f6e058b69a</id>
<content type='text'>
Fixes: 678e90a349a4 ("KVM: selftests: Test IPI to halted vCPU in xAPIC while backing page moves")
Cc: Andrew Jones &lt;drjones@redhat.com&gt;
Cc: Jim Mattson &lt;jmattson@google.com&gt;
Signed-off-by: Peter Shier &lt;pshier@google.com&gt;
Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Message-Id: &lt;20210210011747.240913-1-seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: x86: hyper-v: Make Hyper-V emulation enablement conditional</title>
<updated>2021-02-09T13:39:56Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2021-01-26T13:48:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f014550dfb114cc7f42a517d20d2cf887a0b771'/>
<id>urn:sha1:8f014550dfb114cc7f42a517d20d2cf887a0b771</id>
<content type='text'>
Hyper-V emulation is enabled in KVM unconditionally. This is bad at least
from security standpoint as it is an extra attack surface. Ideally, there
should be a per-VM capability explicitly enabled by VMM but currently it
is not the case and we can't mandate one without breaking backwards
compatibility. We can, however, check guest visible CPUIDs and only enable
Hyper-V emulation when "Hv#1" interface was exposed in
HYPERV_CPUID_INTERFACE.

Note, VMMs are free to act in any sequence they like, e.g. they can try
to set MSRs first and CPUIDs later so we still need to allow the host
to read/write Hyper-V specific MSRs unconditionally.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Message-Id: &lt;20210126134816.1880136-14-vkuznets@redhat.com&gt;
[Add selftest vcpu_set_hv_cpuid API to avoid breaking xen_vmcall_test. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: Move kvm_get_supported_hv_cpuid() to common code</title>
<updated>2021-02-09T13:17:09Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2021-01-26T13:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32f00fd9ef39d8bd32ed7a365fc9a134ebbc646f'/>
<id>urn:sha1:32f00fd9ef39d8bd32ed7a365fc9a134ebbc646f</id>
<content type='text'>
kvm_get_supported_hv_cpuid() may come handy in all Hyper-V related tests.
Split it off hyperv_cpuid test, create system-wide and vcpu versions.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Message-Id: &lt;20210126134816.1880136-2-vkuznets@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftest: kvm: x86: test KVM_GET_CPUID2 and guest visible CPUIDs against KVM_GET_SUPPORTED_CPUID</title>
<updated>2021-02-04T10:27:36Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
</author>
<published>2021-01-29T16:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb18d053b7f823e6a9acf62d1be5b986ca614253'/>
<id>urn:sha1:fb18d053b7f823e6a9acf62d1be5b986ca614253</id>
<content type='text'>
Commit 181f494888d5 ("KVM: x86: fix CPUID entries returned by
KVM_GET_CPUID2 ioctl") revealed that we're not testing KVM_GET_CPUID2
ioctl at all. Add a test for it and also check that from inside the guest
visible CPUIDs are equal to it's output.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Message-Id: &lt;20210129161821.74635-1-vkuznets@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: kvm/x86: add test for pmu msr MSR_IA32_PERF_CAPABILITIES</title>
<updated>2021-02-04T10:27:27Z</updated>
<author>
<name>Like Xu</name>
</author>
<published>2021-02-01T05:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f88d4f2f287ec062e985b60cbe60f04bd5a8e659'/>
<id>urn:sha1:f88d4f2f287ec062e985b60cbe60f04bd5a8e659</id>
<content type='text'>
This test will check the effect of various CPUID settings on the
MSR_IA32_PERF_CAPABILITIES MSR, check that whatever user space writes
with KVM_SET_MSR is _not_ modified from the guest and can be retrieved
with KVM_GET_MSR, and check that invalid LBR formats are rejected.

Signed-off-by: Like Xu &lt;like.xu@linux.intel.com&gt;
Message-Id: &lt;20210201051039.255478-12-like.xu@linux.intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add backing src parameter to dirty_log_perf_test</title>
<updated>2021-02-04T10:27:19Z</updated>
<author>
<name>Ben Gardon</name>
</author>
<published>2021-02-02T18:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e965bb75aaec28a9537e35871106367fe88b702'/>
<id>urn:sha1:9e965bb75aaec28a9537e35871106367fe88b702</id>
<content type='text'>
Add a parameter to control the backing memory type for
dirty_log_perf_test so that the test can be run with hugepages.

To: linux-kselftest@vger.kernel.org
CC: Peter Xu &lt;peterx@redhat.com&gt;
CC: Andrew Jones &lt;drjones@redhat.com&gt;
CC: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Ben Gardon &lt;bgardon@google.com&gt;
Message-Id: &lt;20210202185734.1680553-28-bgardon@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add option to overlap vCPU memory access</title>
<updated>2021-02-04T10:27:19Z</updated>
<author>
<name>Ben Gardon</name>
</author>
<published>2021-01-12T21:42:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82f91337ddde22eaa2e9e0aca248f5e6f336fa91'/>
<id>urn:sha1:82f91337ddde22eaa2e9e0aca248f5e6f336fa91</id>
<content type='text'>
Add an option to overlap the ranges of memory each vCPU accesses instead
of partitioning them. This option will increase the probability of
multiple vCPUs faulting on the same page at the same time, and causing
interesting races, if there are bugs in the page fault handler or
elsewhere in the kernel.

Reviewed-by: Jacob Xu &lt;jacobhxu@google.com&gt;
Reviewed-by: Makarand Sonare &lt;makarandsonare@google.com&gt;

Signed-off-by: Ben Gardon &lt;bgardon@google.com&gt;
Message-Id: &lt;20210112214253.463999-6-bgardon@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
