<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/tools/testing/selftests/kvm/lib/aarch64/processor.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/lib/aarch64/processor.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/tools/testing/selftests/kvm/lib/aarch64/processor.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-03T20:30:20Z</updated>
<entry>
<title>selftests: KVM: Create helper for making SMCCC calls</title>
<updated>2022-05-03T20:30:20Z</updated>
<author>
<name>Oliver Upton</name>
<email>oupton@google.com</email>
</author>
<published>2022-04-09T18:45:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e918e2bc52c8ac1cccd6ef822ac23eded41761b6'/>
<id>urn:sha1:e918e2bc52c8ac1cccd6ef822ac23eded41761b6</id>
<content type='text'>
The PSCI and PV stolen time tests both need to make SMCCC calls within
the guest. Create a helper for making SMCCC calls and rework the
existing tests to use the library function.

Signed-off-by: Oliver Upton &lt;oupton@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/20220409184549.1681189-11-oupton@google.com
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Add support for various modes with 16kB page size</title>
<updated>2021-12-28T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-12-27T12:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aa674de1dc3d2bdf2c67ad195dc81977972323c6'/>
<id>urn:sha1:aa674de1dc3d2bdf2c67ad195dc81977972323c6</id>
<content type='text'>
The 16kB page size is not a popular choice, due to only a few CPUs
actually implementing support for it. However, it can lead to some
interesting performance improvements given the right uarch choices.

Add support for this page size for various PA/VA combinations.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Link: https://lore.kernel.org/r/20211227124809.1335409-7-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K}</title>
<updated>2021-12-28T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-12-27T12:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e7f58a6bd28bfd2e4f60312abf48f07de2c4121c'/>
<id>urn:sha1:e7f58a6bd28bfd2e4f60312abf48f07de2c4121c</id>
<content type='text'>
Some of the arm64 systems out there have an IPA space that is
positively tiny. Nonetheless, they make great KVM hosts.

Add support for 36bit IPA support with 4kB pages, which makes
some of the fruity machines happy. Whilst we're at it, add support
for 64kB pages as well, though these boxes have no support for it.

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/20211227124809.1335409-6-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Rework TCR_EL1 configuration</title>
<updated>2021-12-28T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-12-27T12:48:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f41a61c54fb6410202b2cc08be80ae9554d599d'/>
<id>urn:sha1:2f41a61c54fb6410202b2cc08be80ae9554d599d</id>
<content type='text'>
The current way we initialise TCR_EL1 is a bit cumbersome, as
we mix setting TG0 and IPS in the same swtch statement.

Split it into two statements (one for the base granule size, and
another for the IPA size), allowing new modes to be added in a
more elegant way.

No functional change intended.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Link: https://lore.kernel.org/r/20211227124809.1335409-5-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Check for supported page sizes</title>
<updated>2021-12-28T11:04:20Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-12-27T12:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0303ffdb9ecffac4654b16bbf69ba84d131eb8b7'/>
<id>urn:sha1:0303ffdb9ecffac4654b16bbf69ba84d131eb8b7</id>
<content type='text'>
Just as arm64 implemenations don't necessary support all IPA
ranges, they don't  all support the same page sizes either. Fun.

Create a dummy VM to snapshot the page sizes supported by the
host, and filter the supported modes.

Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Link: https://lore.kernel.org/r/20211227124809.1335409-4-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: selftests: arm64: Initialise default guest mode at test startup time</title>
<updated>2021-12-28T11:04:19Z</updated>
<author>
<name>Marc Zyngier</name>
<email>maz@kernel.org</email>
</author>
<published>2021-12-27T12:48:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cb7c4f364abd09abd1865fa049ef492fb43e6bf3'/>
<id>urn:sha1:cb7c4f364abd09abd1865fa049ef492fb43e6bf3</id>
<content type='text'>
As we are going to add support for a variable default mode on arm64,
let's make sure it is setup first by using a constructor that gets
called before the actual test runs.

Suggested-by: Andrew Jones &lt;drjones@redhat.com&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
Reviewed-by: Andrew Jones &lt;drjones@redhat.com&gt;
Link: https://lore.kernel.org/r/20211227124809.1335409-2-maz@kernel.org
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: Add guest support to get the vcpuid</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:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=17229bdc86c9e618e8832b5ca8451e367e07511b'/>
<id>urn:sha1:17229bdc86c9e618e8832b5ca8451e367e07511b</id>
<content type='text'>
At times, such as when in the interrupt handler, the guest wants
to get the vcpuid that it's running on to pull the per-cpu private
data. As a result, introduce guest_get_vcpuid() that returns the
vcpuid of the calling vcpu. The interface is architecture
independent, but defined only for arm64 as of now.

Suggested-by: Reiji Watanabe &lt;reijiw@google.com&gt;
Signed-off-by: Raghavendra Rao Ananta &lt;rananta@google.com&gt;
Reviewed-by: Ricardo Koller &lt;ricarkol@google.com&gt;
Reviewed-by: Reiji Watanabe &lt;reijiw@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-11-rananta@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: Maintain consistency for vcpuid type</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:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0226cd531c587e0cd51e5ce5622051d319182506'/>
<id>urn:sha1:0226cd531c587e0cd51e5ce5622051d319182506</id>
<content type='text'>
The prototype of aarch64_vcpu_setup() accepts vcpuid as
'int', while the rest of the aarch64 (and struct vcpu)
carries it as 'uint32_t'. Hence, change the prototype
to make it consistent throughout the board.

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-10-rananta@google.com
</content>
</entry>
<entry>
<title>KVM: arm64: selftests: Introduce ARM64_SYS_KVM_REG</title>
<updated>2021-10-17T10:17:20Z</updated>
<author>
<name>Raghavendra Rao Ananta</name>
<email>rananta@google.com</email>
</author>
<published>2021-10-07T23:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b3c79c6130bcfdb0ff3819077deaddce981a0718'/>
<id>urn:sha1:b3c79c6130bcfdb0ff3819077deaddce981a0718</id>
<content type='text'>
With the inclusion of sysreg.h, that brings in system register
encodings, it would be redundant to re-define register encodings
again in processor.h to use it with ARM64_SYS_REG for the KVM
functions such as set_reg() or get_reg(). Hence, add helper macro,
ARM64_SYS_KVM_REG, that converts SYS_* definitions in sysreg.h
into ARM64_SYS_REG definitions.

Also replace all the users of ARM64_SYS_REG, relying on
the encodings created in processor.h, with ARM64_SYS_KVM_REG and
remove the definitions.

Signed-off-by: Raghavendra Rao Ananta &lt;rananta@google.com&gt;
Reviewed-by: Ricardo Koller &lt;ricarkol@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-5-rananta@google.com
</content>
</entry>
<entry>
<title>KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc</title>
<updated>2021-07-15T14:19:41Z</updated>
<author>
<name>Ricardo Koller</name>
<email>ricarkol@google.com</email>
</author>
<published>2021-07-02T20:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6f2f86ec28fb68cf6a342767a35f7b13703aa96f'/>
<id>urn:sha1:6f2f86ec28fb68cf6a342767a35f7b13703aa96f</id>
<content type='text'>
Commit a75a895e6457 ("KVM: selftests: Unconditionally use memslot 0 for
vaddr allocations") removed the memslot parameters from vm_vaddr_alloc.
It addressed all callers except one under lib/aarch64/, due to a race
with commit e3db7579ef35 ("KVM: selftests: Add exception handling
support for aarch64")

Fix the vm_vaddr_alloc call in lib/aarch64/processor.c.

Reported-by: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
Signed-off-by: Ricardo Koller &lt;ricarkol@google.com&gt;
Message-Id: &lt;20210702201042.4036162-1-ricarkol@google.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
