<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/kvm/include, branch v5.13.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.13.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.13.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-06-08T17:29:10+00:00</updated>
<entry>
<title>selftests: kvm: Add support for customized slot0 memory size</title>
<updated>2021-06-08T17:29:10+00:00</updated>
<author>
<name>Zhenzhong Duan</name>
<email>zhenzhong.duan@intel.com</email>
</author>
<published>2021-06-08T23:38:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f53b16ad64408b5376836708f8cf42dbf1cf6098'/>
<id>urn:sha1:f53b16ad64408b5376836708f8cf42dbf1cf6098</id>
<content type='text'>
Until commit 39fe2fc96694 ("selftests: kvm: make allocation of extra
memory take effect", 2021-05-27), parameter extra_mem_pages was used
only to calculate the page table size for all the memory chunks,
because real memory allocation happened with calls of
vm_userspace_mem_region_add() after vm_create_default().

Commit 39fe2fc96694 however changed the meaning of extra_mem_pages to
the size of memory slot 0.  This makes the memory allocation more
flexible, but makes it harder to account for the number of
pages needed for the page tables.  For example, memslot_perf_test
has a small amount of memory in slot 0 but a lot in other slots,
and adding that memory twice (both in slot 0 and with later
calls to vm_userspace_mem_region_add()) causes an error that
was fixed in commit 000ac4295339 ("selftests: kvm: fix overlapping
addresses in memslot_perf_test", 2021-05-29)

Since both uses are sensible, add a new parameter slot0_mem_pages
to vm_create_with_vcpus() and some comments to clarify the meaning of
slot0_mem_pages and extra_mem_pages.  With this change,
memslot_perf_test can go back to passing the number of memory
pages as extra_mem_pages.

Signed-off-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
Message-Id: &lt;20210608233816.423958-4-zhenzhong.duan@intel.com&gt;
[Squashed in a single patch and rewrote the commit message. - Paolo]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: introduce P47V64 for s390x</title>
<updated>2021-06-08T17:19:19+00:00</updated>
<author>
<name>Christian Borntraeger</name>
<email>borntraeger@de.ibm.com</email>
</author>
<published>2021-06-08T12:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bc603af73dd8fb2934306e861009c54f973dcc2'/>
<id>urn:sha1:1bc603af73dd8fb2934306e861009c54f973dcc2</id>
<content type='text'>
s390x can have up to 47bits of physical guest and 64bits of virtual
address  bits. Add a new address mode to avoid errors of testcases
going beyond 47bits.

Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Message-Id: &lt;20210608123954.10991-1-borntraeger@de.ibm.com&gt;
Fixes: ef4c9f4f6546 ("KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()")
Cc: stable@vger.kernel.org
Reviewed-by: David Matlack &lt;dmatlack@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: add shared hugetlbfs backing source type</title>
<updated>2021-05-27T11:45:57+00:00</updated>
<author>
<name>Axel Rasmussen</name>
<email>axelrasmussen@google.com</email>
</author>
<published>2021-05-19T20:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33090a884da5e9760f11441ac269f754375f80f5'/>
<id>urn:sha1:33090a884da5e9760f11441ac269f754375f80f5</id>
<content type='text'>
This lets us run the demand paging test on top of a shared
hugetlbfs-backed area. The "shared" is key, as this allows us to
exercise userfaultfd minor faults on hugetlbfs.

Signed-off-by: Axel Rasmussen &lt;axelrasmussen@google.com&gt;
Message-Id: &lt;20210519200339.829146-11-axelrasmussen@google.com&gt;
Reviewed-by: Ben Gardon &lt;bgardon@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: create alias mappings when using shared memory</title>
<updated>2021-05-27T11:45:56+00:00</updated>
<author>
<name>Axel Rasmussen</name>
<email>axelrasmussen@google.com</email>
</author>
<published>2021-05-19T20:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94f3f2b31a8a9e8bd30bf6f4903ff84acc612e0e'/>
<id>urn:sha1:94f3f2b31a8a9e8bd30bf6f4903ff84acc612e0e</id>
<content type='text'>
When a memory region is added with a src_type specifying that it should
use some kind of shared memory, also create an alias mapping to the same
underlying physical pages.

And, add an API so tests can get access to these alias addresses.
Basically, for a guest physical address, let us look up the analogous
host *alias* address.

In a future commit, we'll modify the demand paging test to take
advantage of this to exercise UFFD minor faults. The idea is, we
pre-fault the underlying pages *via the alias*. When the *guest*
faults, it gets a "minor" fault (PTEs don't exist yet, but a page is
already in the page cache). Then, the userfaultfd theads can handle the
fault: they could potentially modify the underlying memory *via the
alias* if they wanted to, and then they install the PTEs and let the
guest carry on via a UFFDIO_CONTINUE ioctl.

Reviewed-by: Ben Gardon &lt;bgardon@google.com&gt;
Signed-off-by: Axel Rasmussen &lt;axelrasmussen@google.com&gt;
Message-Id: &lt;20210519200339.829146-9-axelrasmussen@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: add shmem backing source type</title>
<updated>2021-05-27T11:45:56+00:00</updated>
<author>
<name>Axel Rasmussen</name>
<email>axelrasmussen@google.com</email>
</author>
<published>2021-05-19T20:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9befd5958fdf8913db69049d47b6ac1d970af03'/>
<id>urn:sha1:c9befd5958fdf8913db69049d47b6ac1d970af03</id>
<content type='text'>
This lets us run the demand paging test on top of a shmem-backed area.
In follow-up commits, we'll 1) leverage this new capability to create an
alias mapping, and then 2) use the alias mapping to exercise UFFD minor
faults.

Signed-off-by: Axel Rasmussen &lt;axelrasmussen@google.com&gt;
Message-Id: &lt;20210519200339.829146-8-axelrasmussen@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Print a message if /dev/kvm is missing</title>
<updated>2021-05-27T11:45:55+00:00</updated>
<author>
<name>David Matlack</name>
<email>dmatlack@google.com</email>
</author>
<published>2021-05-11T20:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2aab4b355cbbe1deacfd9349729c43509042b557'/>
<id>urn:sha1:2aab4b355cbbe1deacfd9349729c43509042b557</id>
<content type='text'>
If a KVM selftest is run on a machine without /dev/kvm, it will exit
silently. Make it easy to tell what's happening by printing an error
message.

Opportunistically consolidate all codepaths that open /dev/kvm into a
single function so they all print the same message.

This slightly changes the semantics of vm_is_unrestricted_guest() by
changing a TEST_ASSERT() to exit(KSFT_SKIP). However
vm_is_unrestricted_guest() is only called in one place
(x86_64/mmio_warning_test.c) and that is to determine if the test should
be skipped or not.

Signed-off-by: David Matlack &lt;dmatlack@google.com&gt;
Message-Id: &lt;20210511202120.1371800-1-dmatlack@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()</title>
<updated>2021-05-27T11:45:54+00:00</updated>
<author>
<name>David Matlack</name>
<email>dmatlack@google.com</email>
</author>
<published>2021-05-21T17:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef4c9f4f654622fa15b7a94a9bd1f19e76bb7feb'/>
<id>urn:sha1:ef4c9f4f654622fa15b7a94a9bd1f19e76bb7feb</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>Merge tag 'kvmarm-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD</title>
<updated>2021-04-23T11:41:17+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2021-04-23T11:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c4f71901d53b6d8a4703389459d9f99fbd80ffd2'/>
<id>urn:sha1:c4f71901d53b6d8a4703389459d9f99fbd80ffd2</id>
<content type='text'>
KVM/arm64 updates for Linux 5.13

New features:

- Stage-2 isolation for the host kernel when running in protected mode
- Guest SVE support when running in nVHE mode
- Force W^X hypervisor mappings in nVHE mode
- ITS save/restore for guests using direct injection with GICv4.1
- nVHE panics now produce readable backtraces
- Guest support for PTP using the ptp_kvm driver
- Performance improvements in the S2 fault handler
- Alexandru is now a reviewer (not really a new feature...)

Fixes:
- Proper emulation of the GICR_TYPER register
- Handle the complete set of relocation in the nVHE EL2 object
- Get rid of the oprofile dependency in the PMU code (and of the
  oprofile body parts at the same time)
- Debug and SPE fixes
- Fix vcpu reset
</content>
</entry>
<entry>
<title>Merge branch 'kvm-sev-cgroup' into HEAD</title>
<updated>2021-04-22T17:19:01+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2021-04-22T06:39:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd49e8ee70b306a003323a17bbcc0633f322c135'/>
<id>urn:sha1:fd49e8ee70b306a003323a17bbcc0633f322c135</id>
<content type='text'>
</content>
</entry>
<entry>
<title>KVM: selftests: List all hugetlb src types specified with page sizes</title>
<updated>2021-04-20T08:18:53+00:00</updated>
<author>
<name>Yanan Wang</name>
<email>wangyanan55@huawei.com</email>
</author>
<published>2021-03-30T08:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=623653b7d4622cb7d016e9a81e6a9d0d9b1326df'/>
<id>urn:sha1:623653b7d4622cb7d016e9a81e6a9d0d9b1326df</id>
<content type='text'>
With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system
default hugetlb pages to back the testing guest memory. In order to
add flexibility, now list all the known hugetlb backing src types with
different page sizes, so that we can specify use of hugetlb pages of the
exact granularity that we want. And as all the known hugetlb page sizes
are listed, it's appropriate for all architectures.

Besides, the helper get_backing_src_pagesz() is added to get the
granularity of different backing src types(anonumous, thp, hugetlb).

Suggested-by: Ben Gardon &lt;bgardon@google.com&gt;
Signed-off-by: Yanan Wang &lt;wangyanan55@huawei.com&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Message-Id: &lt;20210330080856.14940-9-wangyanan55@huawei.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
