<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/kvm/aarch64/arch_timer.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/kvm/aarch64/arch_timer.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/kvm/aarch64/arch_timer.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-04-07T07:46:13Z</updated>
<entry>
<title>selftests: KVM: Free the GIC FD when cleaning up in arch_timer</title>
<updated>2022-04-07T07:46:13Z</updated>
<author>
<name>Oliver Upton</name>
<email>oupton@google.com</email>
</author>
<published>2022-04-06T23:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=21db83846683d3987666505a3ec38f367708199a'/>
<id>urn:sha1:21db83846683d3987666505a3ec38f367708199a</id>
<content type='text'>
In order to correctly destroy a VM, all references to the VM must be
freed. The arch_timer selftest creates a VGIC for the guest, which
itself holds a reference to the VM.

Close the GIC FD when cleaning up a VM.

Signed-off-by: Oliver Upton &lt;oupton@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20220406235615.1447180-4-oupton@google.com
</content>
</entry>
<entry>
<title>KVM: selftests: aarch64: Skip tests if we can't create a vgic-v3</title>
<updated>2022-02-25T13:02:28Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2022-02-23T13:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=456f89e0928ab938122a40e9f094a6524cc158b4'/>
<id>urn:sha1:456f89e0928ab938122a40e9f094a6524cc158b4</id>
<content type='text'>
The arch_timer and vgic_irq kselftests assume that they can create a
vgic-v3, using the library function vgic_v3_setup() which aborts with a
test failure if it is not possible to do so. Since vgic-v3 can only be
instantiated on systems where the host has GICv3 this leads to false
positives on older systems where that is not the case.

Fix this by changing vgic_v3_setup() to return an error if the vgic can't
be instantiated and have the callers skip if this happens. We could also
exit flagging a skip in vgic_v3_setup() but this would prevent future test
cases conditionally deciding which GIC to use or generally doing more
complex output.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Tested-by: Ricardo Koller &lt;ricarkol@google.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20220223131624.1830351-1-broonie@kernel.org
</content>
</entry>
<entry>
<title>KVM: selftests: aarch64: Cmdline arg to set number of IRQs in vgic_irq test</title>
<updated>2021-12-28T19:24:06Z</updated>
<author>
<name>Ricardo Koller</name>
<email>ricarkol@google.com</email>
</author>
<published>2021-11-09T02:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e5410ee2806d74a749fa39ca6fdb73be2f88611f'/>
<id>urn:sha1:e5410ee2806d74a749fa39ca6fdb73be2f88611f</id>
<content type='text'>
Add the ability to specify the number of vIRQs exposed by KVM (arg
defaults to 64). Then extend the KVM_IRQ_LINE test by injecting all
available SPIs at once (specified by the nr-irqs arg). As a bonus,
inject all SGIs at once as well.

Signed-off-by: Ricardo Koller &lt;ricarkol@google.com&gt;
Acked-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20211109023906.1091208-9-ricarkol@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: arch_timer: Support vCPU migration</title>
<updated>2021-10-17T10:17:22Z</updated>
<author>
<name>Raghavendra Rao Ananta</name>
<email>rananta@google.com</email>
</author>
<published>2021-10-07T23:34:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=61f6fadbf9bd6694c72e40d9fa186ceff730ef33'/>
<id>urn:sha1:61f6fadbf9bd6694c72e40d9fa186ceff730ef33</id>
<content type='text'>
Since the timer stack (hardware and KVM) is per-CPU, there
are potential chances for races to occur when the scheduler
decides to migrate a vCPU thread to a different physical CPU.
Hence, include an option to stress-test this part as well by
forcing the vCPUs to migrate across physical CPUs in the
system at a particular rate.

Originally, the bug for the fix with commit 3134cc8beb69d0d
("KVM: arm64: vgic: Resample HW pending state on deactivation")
was discovered using arch_timer test with vCPU migrations and
can be easily reproduced.

Signed-off-by: Raghavendra Rao Ananta &lt;rananta@google.com&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20211007233439.1826892-16-rananta@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: Add arch_timer test</title>
<updated>2021-10-17T10:17:21Z</updated>
<author>
<name>Raghavendra Rao Ananta</name>
<email>rananta@google.com</email>
</author>
<published>2021-10-07T23:34:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4959d8650e9f4095a5df6e578377d850f1b94d2f'/>
<id>urn:sha1:4959d8650e9f4095a5df6e578377d850f1b94d2f</id>
<content type='text'>
Add a KVM selftest to validate the arch_timer functionality.
Primarily, the test sets up periodic timer interrupts and
validates the basic architectural expectations upon its receipt.

The test provides command-line options to configure the period
of the timer, number of iterations, and number of vCPUs.

Signed-off-by: Raghavendra Rao Ananta &lt;rananta@google.com&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Link: https://lore.kernel.org/r/20211007233439.1826892-15-rananta@google.com
</content>
</entry>
</feed>
