As noted in a jailhouse thread a short while ago [1,2], the presence of the
virtualization extensions implies that page table walks are coherent, and do
not require that updates are cleaned to the PoU.
These patches remove the redundant maintenance and related infrastructure.
As I do not have a suitably configured ARMv7 board, I have not been able to
test the patches myself, and any testing would be appreciated.
Thanks,
Mark.
[1] https://groups.google.com/d/msg/jailhouse-dev/c9Ier7mUNoI/JWUJGyxfAQAJ
[2] https://groups.google.com/d/msg/jailhouse-dev/c9Ier7mUNoI/qagpektgAQAJ
Mark Rutland (2):
arm/kvm: excise redundant cache maintenance
arm64/kvm: remove unused stub functions
arch/arm/include/asm/kvm_mmu.h | 28 ++--------------------------
arch/arm/kvm/mmu.c | 2 --
arch/arm64/include/asm/kvm_mmu.h | 6 ------
3 files changed, 2 insertions(+), 34 deletions(-)
--
1.9.1
When modifying Stage-2 page tables, we perform cache maintenance to
account for non-coherent page table walks. However, this is unnecessary,
as page table walks are guaranteed to be coherent in the presence of the
virtualization extensions.
Per ARM DDI 0406C.c, section B1.7 ("The Virtualization Extensions"), the
virtualization extensions mandate the multiprocessing extensions.
Per ARM DDI 0406C.c, section B3.10.1 ("General TLB maintenance
requirements"), as described in the sub-section titled "TLB maintenance
operations and the memory order model", this maintenance is not required
in the presence of the multiprocessing extensions.
Hence, we need not perform this cache maintenance when modifying Stage-2
entries.
This patch removes the logic for performing the redundant maintenance.
To ensure visibility and ordering of updates, a dsb(ishst) that was
otherwise implicit in the maintenance is folded into kvm_set_pmd() and
kvm_set_pte().
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <redacted>
Cc: Marc Zyngier <redacted>
Cc: kvmarm at lists.cs.columbia.edu
---
arch/arm/include/asm/kvm_mmu.h | 28 ++--------------------------
arch/arm/kvm/mmu.c | 2 --
2 files changed, 2 insertions(+), 28 deletions(-)
Now that 32-bit KVM no longer performs cache maintenance for page table
updates, we no longer need empty stubs for arm64. Remove them.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <redacted>
Cc: Marc Zyngier <redacted>
Cc: kvmarm at lists.cs.columbia.edu
---
arch/arm64/include/asm/kvm_mmu.h | 6 ------
1 file changed, 6 deletions(-)
On Tue, Aug 30, 2016 at 05:05:54PM +0100, Mark Rutland wrote:
As noted in a jailhouse thread a short while ago [1,2], the presence of the
virtualization extensions implies that page table walks are coherent, and do
not require that updates are cleaned to the PoU.
These patches remove the redundant maintenance and related infrastructure.
As I do not have a suitably configured ARMv7 board, I have not been able to
test the patches myself, and any testing would be appreciated.
Having been lent a TC2 booting in Hyp mode, I've now given this a spin
with a few VMs, which I left running hackbench to fault in guest memory.
All of that ran happily.
Thanks,
Mark.
From: Christoffer Dall <hidden> Date: 2016-09-01 11:15:45
On Tue, Aug 30, 2016 at 07:00:20PM +0100, Mark Rutland wrote:
On Tue, Aug 30, 2016 at 05:05:54PM +0100, Mark Rutland wrote:
quoted
As noted in a jailhouse thread a short while ago [1,2], the presence of the
virtualization extensions implies that page table walks are coherent, and do
not require that updates are cleaned to the PoU.
These patches remove the redundant maintenance and related infrastructure.
As I do not have a suitably configured ARMv7 board, I have not been able to
test the patches myself, and any testing would be appreciated.
Having been lent a TC2 booting in Hyp mode, I've now given this a spin
with a few VMs, which I left running hackbench to fault in guest memory.
All of that ran happily.
I've tested this on TC2 and CubieTruck as well, no problems as far as I
can see.
Applied.
Thanks,
-Christoffer