<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/kvm/lib/riscv, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/kvm/lib/riscv?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/kvm/lib/riscv?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-06-11T15:47:22Z</updated>
<entry>
<title>KVM: selftests: Purge vm+vcpu_id == vcpu silliness</title>
<updated>2022-06-11T15:47:22Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-06-02T20:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=768e9a61856b75de08f5efa5813bb3e7f16ec271'/>
<id>urn:sha1:768e9a61856b75de08f5efa5813bb3e7f16ec271</id>
<content type='text'>
Take a vCPU directly instead of a VM+vcpu pair in all vCPU-scoped helpers
and ioctls.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Consolidate KVM_{G,S}ET_ONE_REG helpers</title>
<updated>2022-06-11T15:47:10Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-06-02T00:16:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bfff0f60db89f425920580900ba242df3bd3c652'/>
<id>urn:sha1:bfff0f60db89f425920580900ba242df3bd3c652</id>
<content type='text'>
Rework vcpu_{g,s}et_reg() to provide the APIs that tests actually want to
use, and drop the three "one-off" implementations that cropped up due to
the poor API.

Ignore the handful of direct KVM_{G,S}ET_ONE_REG calls that don't fit the
APIs for one reason or another.

No functional change intended.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Rename vm_vcpu_add* helpers to better show relationships</title>
<updated>2022-06-11T15:47:04Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-02-16T17:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f742d94ff4e5147e08b3bb7826f009eda7545124'/>
<id>urn:sha1:f742d94ff4e5147e08b3bb7826f009eda7545124</id>
<content type='text'>
Rename vm_vcpu_add() to __vm_vcpu_add(), and vm_vcpu_add_default() to
vm_vcpu_add() to show the relationship between the newly minted
vm_vcpu_add() and __vm_vcpu_add().

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Return created vcpu from vm_vcpu_add_default()</title>
<updated>2022-06-11T15:47:03Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-02-16T17:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1422efd6bb75e4ae038432449bf9229d6be8e0b4'/>
<id>urn:sha1:1422efd6bb75e4ae038432449bf9229d6be8e0b4</id>
<content type='text'>
Return the created 'struct kvm_vcpu' object from vm_vcpu_add_default(),
which cleans up a few tests and will eventually allow removing vcpu_get()
entirely.

Opportunistically rename @vcpuid to @vcpu_id to follow preferred kernel
style.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add "arch" to common utils that have arch implementations</title>
<updated>2022-06-11T15:47:03Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-02-16T17:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9931be3fc62edad381de074ad0db576eefed7fee'/>
<id>urn:sha1:9931be3fc62edad381de074ad0db576eefed7fee</id>
<content type='text'>
Add "arch" into the name of utility functions that are declared in common
code, but (surprise!) have arch-specific implementations.  Shuffle code
around so that all such helpers' declarations are bundled together.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Get rid of kvm_util_internal.h</title>
<updated>2022-06-11T15:46:19Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-02-15T21:21:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b530eba14c7001882ab517c8408878ef2de97863'/>
<id>urn:sha1:b530eba14c7001882ab517c8408878ef2de97863</id>
<content type='text'>
Fold kvm_util_internal.h into kvm_util_base.h, i.e. make all KVM utility
stuff "public".  Hiding struct implementations from tests has been a
massive failure, as it has led to pointless and poorly named wrappers,
unnecessarily opaque code, etc...

Not to mention that the approach was a complete failure as evidenced by
the non-zero number of tests that were including kvm_util_internal.h.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: Add another underscore to inner ioctl() helpers</title>
<updated>2022-06-11T14:14:58Z</updated>
<author>
<name>Sean Christopherson</name>
<email>seanjc@google.com</email>
</author>
<published>2022-02-15T18:27:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2b38a7398f20dbbfa88689819b21967489d284f5'/>
<id>urn:sha1:2b38a7398f20dbbfa88689819b21967489d284f5</id>
<content type='text'>
Add a second underscore to inner ioctl() helpers to better align with
commonly accepted kernel coding style, and to allow using a single
underscore variant in the future for macro shenanigans.

Signed-off-by: Sean Christopherson &lt;seanjc@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>selftests: kvm: replace ternary operator with min()</title>
<updated>2022-06-08T08:48:24Z</updated>
<author>
<name>Guo Zhengkui</name>
<email>guozhengkui@vivo.com</email>
</author>
<published>2022-05-11T12:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5d9cd8b55cdc0fa2260bebab590430c8f90ce955'/>
<id>urn:sha1:5d9cd8b55cdc0fa2260bebab590430c8f90ce955</id>
<content type='text'>
Fix the following coccicheck warnings:

tools/testing/selftests/kvm/lib/s390x/ucall.c:25:15-17: WARNING
opportunity for min()
tools/testing/selftests/kvm/lib/x86_64/ucall.c:27:15-17: WARNING
opportunity for min()
tools/testing/selftests/kvm/lib/riscv/ucall.c:56:15-17: WARNING
opportunity for min()
tools/testing/selftests/kvm/lib/aarch64/ucall.c:82:15-17: WARNING
opportunity for min()
tools/testing/selftests/kvm/lib/aarch64/ucall.c:55:20-21: WARNING
opportunity for min()

min() is defined in tools/include/linux/kernel.h.

Signed-off-by: Guo Zhengkui &lt;guozhengkui@vivo.com&gt;
Acked-by: Claudio Imbrenda &lt;imbrenda@linux.ibm.com&gt;
Acked-by: Anup Patel &lt;anup@brainfault.org&gt;
Message-Id: &lt;20220511120621.36956-1-guozhengkui@vivo.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: riscv: Remove unneeded semicolon</title>
<updated>2022-05-20T03:38:58Z</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2022-05-06T09:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dba90d6fb8b0657d45516bfe1eb8fe83d9e425f8'/>
<id>urn:sha1:dba90d6fb8b0657d45516bfe1eb8fe83d9e425f8</id>
<content type='text'>
Fix the following coccicheck warnings:

./tools/testing/selftests/kvm/lib/riscv/processor.c:353:3-4: Unneeded
semicolon.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>KVM: selftests: riscv: Improve unexpected guest trap handling</title>
<updated>2022-05-20T03:38:56Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-04-09T04:32:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ac6c85e962d4c009c499d93657f25f46fd8212b9'/>
<id>urn:sha1:ac6c85e962d4c009c499d93657f25f46fd8212b9</id>
<content type='text'>
Currently, we simply hang using "while (1) ;" upon any unexpected
guest traps because the default guest trap handler is guest_hang().

The above approach is not useful to anyone because KVM selftests
users will only see a hung application upon any unexpected guest
trap.

This patch improves unexpected guest trap handling for KVM RISC-V
selftests by doing the following:
1) Return to host user-space
2) Dump VCPU registers
3) Die using TEST_ASSERT(0, ...)

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Tested-by: Mayuresh Chitale &lt;mchitale@ventanamicro.com&gt;
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
