Re: [PATCH v4 27/34] KVM: arm64: Always zero invalid PTEs

2021-03-12 Thread Quentin Perret
On Thursday 11 Mar 2021 at 17:33:38 (+), Will Deacon wrote: > On Wed, Mar 10, 2021 at 05:57:44PM +, Quentin Perret wrote: > > kvm_set_invalid_pte() currently only clears bit 0 from a PTE because > > stage2_map_walk_table_post() needs to be able to follow the anchor. In > > preparation for r

Re: [PATCH v4 27/34] KVM: arm64: Always zero invalid PTEs

2021-03-11 Thread Will Deacon
On Wed, Mar 10, 2021 at 05:57:44PM +, Quentin Perret wrote: > kvm_set_invalid_pte() currently only clears bit 0 from a PTE because > stage2_map_walk_table_post() needs to be able to follow the anchor. In > preparation for re-using bits 63-02 from invalid PTEs, make sure to zero Why do you excl

[PATCH v4 27/34] KVM: arm64: Always zero invalid PTEs

2021-03-10 Thread Quentin Perret
kvm_set_invalid_pte() currently only clears bit 0 from a PTE because stage2_map_walk_table_post() needs to be able to follow the anchor. In preparation for re-using bits 63-02 from invalid PTEs, make sure to zero it entirely by ensuring to cache the anchor's child upfront. Suggested-by: Will Deaco