<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/kvm/lib, branch v5.1.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.1.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.1.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-06-19T06:00:12+00:00</updated>
<entry>
<title>kvm: selftests: aarch64: fix default vm mode</title>
<updated>2019-06-19T06:00:12+00:00</updated>
<author>
<name>Andrew Jones</name>
<email>drjones@redhat.com</email>
</author>
<published>2019-05-23T11:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14be6a9888534e9671ae5a91abfead030bd64a2b'/>
<id>urn:sha1:14be6a9888534e9671ae5a91abfead030bd64a2b</id>
<content type='text'>
[ Upstream commit 55eda003f02f075bab0223a188e548dbf3ac8dfe ]

VM_MODE_P52V48_4K is not a valid mode for AArch64. Replace its
use in vm_create_default() with a mode that works and represents
a good AArch64 default. (We didn't ever see a problem with this
because we don't have any unit tests using vm_create_default(),
but it's good to get it fixed in advance.)

Reported-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: add a selftest for SMM</title>
<updated>2019-04-16T13:38:06+00:00</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2019-04-10T09:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=79904c9de0d1a6cd66853b3af802343b0ba3720c'/>
<id>urn:sha1:79904c9de0d1a6cd66853b3af802343b0ba3720c</id>
<content type='text'>
Add a simple test for SMM, based on VMX.  The test implements its own
sync between the guest and the host as using our ucall library seems to
be too cumbersome: SMI handler is happening in real-address mode.

This patch also fixes KVM_SET_NESTED_STATE to happen after
KVM_SET_VCPU_EVENTS, in fact it places it last.  This is because
KVM needs to know whether the processor is in SMM or not.

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: kvm/evmcs_test: complete I/O before migrating guest state</title>
<updated>2019-04-16T13:37:39+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2019-04-11T13:57:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c68c21ca929771a1f128d886359f9229d31cf80c'/>
<id>urn:sha1:c68c21ca929771a1f128d886359f9229d31cf80c</id>
<content type='text'>
Starting state migration after an IO exit without first completing IO
may result in test failures.  We already have two tests that need this
(this patch in fact fixes evmcs_test, similar to what was fixed for
state_test in commit 0f73bbc851ed, "KVM: selftests: complete IO before
migrating guest state", 2019-03-13) and a third is coming.  So, move the
code to vcpu_save_state, and while at it do not access register state
until after I/O is complete.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: complete IO before migrating guest state</title>
<updated>2019-03-28T16:29:09+00:00</updated>
<author>
<name>Sean Christopherson</name>
<email>sean.j.christopherson@intel.com</email>
</author>
<published>2019-03-13T23:49:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f73bbc851ed32d22bbd86be09e0365c460bcd2e'/>
<id>urn:sha1:0f73bbc851ed32d22bbd86be09e0365c460bcd2e</id>
<content type='text'>
Documentation/virtual/kvm/api.txt states:

  NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR and
        KVM_EXIT_EPR the corresponding operations are complete (and guest
        state is consistent) only after userspace has re-entered the
        kernel with KVM_RUN.  The kernel side will first finish incomplete
        operations and then check for pending signals.  Userspace can
        re-enter the guest with an unmasked signal pending to complete
        pending operations.

Because guest state may be inconsistent, starting state migration after
an IO exit without first completing IO may result in test failures, e.g.
a proposed change to KVM's handling of %rip in its fast PIO handling[1]
will cause the new VM, i.e. the post-migration VM, to have its %rip set
to the IN instruction that triggered KVM_EXIT_IO, leading to a test
assertion due to a stage mismatch.

For simplicitly, require KVM_CAP_IMMEDIATE_EXIT to complete IO and skip
the test if it's not available.  The addition of KVM_CAP_IMMEDIATE_EXIT
predates the state selftest by more than a year.

[1] https://patchwork.kernel.org/patch/10848545/

Fixes: fa3899add1056 ("kvm: selftests: add basic test for state save and restore")
Reported-by: Jim Mattson &lt;jmattson@google.com&gt;
Signed-off-by: Sean Christopherson &lt;sean.j.christopherson@intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>kvm: selftests: Fix region overlap check in kvm_util</title>
<updated>2019-01-25T18:11:36+00:00</updated>
<author>
<name>Ben Gardon</name>
<email>bgardon@google.com</email>
</author>
<published>2019-01-16T17:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94a980c39c8e3f8abaff5d3b5bbcd4ccf1c02c4f'/>
<id>urn:sha1:94a980c39c8e3f8abaff5d3b5bbcd4ccf1c02c4f</id>
<content type='text'>
Fix a call to userspace_mem_region_find to conform to its spec of
taking an inclusive, inclusive range. It was previously being called
with an inclusive, exclusive range. Also remove a redundant region bounds
check in vm_userspace_mem_region_add. Region overlap checking is already
performed by the call to userspace_mem_region_find.

Tested: Compiled tools/testing/selftests/kvm with -static
	Ran all resulting test binaries on an Intel Haswell test machine
	All tests passed

Signed-off-by: Ben Gardon &lt;bgardon@google.com&gt;
Reviewed-by: Jim Mattson &lt;jmattson@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>kvm: selftests: ucall: fix exit mmio address guessing</title>
<updated>2018-12-21T12:58:46+00:00</updated>
<author>
<name>Andrew Jones</name>
<email>drjones@redhat.com</email>
</author>
<published>2018-12-21T11:22:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57d5edfe640edaaece9208cdbd7f464d255785cd'/>
<id>urn:sha1:57d5edfe640edaaece9208cdbd7f464d255785cd</id>
<content type='text'>
Fix two more bugs in the exit_mmio address guessing.
The first bug was that the start and step calculations were
wrong since they were dividing the number of address bits instead
of the address space. The second other bug was that the guessing
algorithm wasn't considering the valid physical and virtual address
ranges correctly for an identity map.

Signed-off-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>kvm: selftests: aarch64: dirty_log_test: support greater than 40-bit IPAs</title>
<updated>2018-12-21T10:28:30+00:00</updated>
<author>
<name>Andrew Jones</name>
<email>drjones@redhat.com</email>
</author>
<published>2018-11-06T13:57:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8cee58161efffcb5ba691c33fe4de3eb75cf46cb'/>
<id>urn:sha1:8cee58161efffcb5ba691c33fe4de3eb75cf46cb</id>
<content type='text'>
When KVM has KVM_CAP_ARM_VM_IPA_SIZE we can test with &gt; 40-bit IPAs by
using the 'type' field of KVM_CREATE_VM.

Signed-off-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>kvm: selftests: add pa-48/va-48 VM modes</title>
<updated>2018-12-21T10:28:30+00:00</updated>
<author>
<name>Andrew Jones</name>
<email>drjones@redhat.com</email>
</author>
<published>2018-11-06T13:57:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdbd2428482486bcb2ab86dd7d99e8adec2b7c39'/>
<id>urn:sha1:cdbd2428482486bcb2ab86dd7d99e8adec2b7c39</id>
<content type='text'>
Signed-off-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>kvm: selftests: ucall: improve ucall placement in memory, fix unsigned comparison</title>
<updated>2018-12-14T17:00:08+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2018-12-14T11:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5132411985e14b8dda69173abee8ea9ba942698f'/>
<id>urn:sha1:5132411985e14b8dda69173abee8ea9ba942698f</id>
<content type='text'>
Based on a patch by Andrew Jones.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: implement an unchecked version of vcpu_ioctl()</title>
<updated>2018-12-14T16:59:55+00:00</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2018-12-10T17:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e50c424f8e2315182540a32edb6f19024d26c8b'/>
<id>urn:sha1:7e50c424f8e2315182540a32edb6f19024d26c8b</id>
<content type='text'>
In case we want to test failing ioctls we need an option to not
fail. Following _vcpu_run() precedent implement _vcpu_ioctl().

Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
