Re: [PATCH v3 6/9] KVM: arm/arm64: Limit icache invalidation to prefetch aborts

2017-11-02 Thread Andrew Jones
On Thu, Nov 02, 2017 at 10:36:35AM +, Marc Zyngier wrote: > On Wed, Nov 01 2017 at 11:17:27 am GMT, Andrew Jones > wrote: > > On Mon, Oct 23, 2017 at 05:11:19PM +0100, Marc Zyngier wrote: > >> diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c > >> index 2174244f6317..0417c8e2a81c 100644 >

Re: [PATCH v3 6/9] KVM: arm/arm64: Limit icache invalidation to prefetch aborts

2017-11-02 Thread Marc Zyngier
On Wed, Nov 01 2017 at 11:17:27 am GMT, Andrew Jones wrote: > On Mon, Oct 23, 2017 at 05:11:19PM +0100, Marc Zyngier wrote: >> diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c >> index 2174244f6317..0417c8e2a81c 100644 >> --- a/virt/kvm/arm/mmu.c >> +++ b/virt/kvm/arm/mmu.c >> @@ -1292,7 +1292

Re: [PATCH v3 6/9] KVM: arm/arm64: Limit icache invalidation to prefetch aborts

2017-11-01 Thread Andrew Jones
On Mon, Oct 23, 2017 at 05:11:19PM +0100, Marc Zyngier wrote: > diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c > index 2174244f6317..0417c8e2a81c 100644 > --- a/virt/kvm/arm/mmu.c > +++ b/virt/kvm/arm/mmu.c > @@ -1292,7 +1292,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, > phys_addr_

[PATCH v3 6/9] KVM: arm/arm64: Limit icache invalidation to prefetch aborts

2017-10-23 Thread Marc Zyngier
We've so far eagerly invalidated the icache, no matter how the page was faulted in (data or prefetch abort). But we can easily track execution by setting the XN bits in the S2 page tables, get the prefetch abort at HYP and perform the icache invalidation at that time only. As for most VMs, the in