Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-12 Thread Quentin Perret
On Friday 12 Mar 2021 at 11:18:05 (+), Will Deacon wrote: > On Fri, Mar 12, 2021 at 10:13:26AM +, Quentin Perret wrote: > > On Friday 12 Mar 2021 at 09:32:06 (+), Will Deacon wrote: > > > I'm not saying to use the VMID directly, just that allocating half of the > > > pte feels a bit OTT

Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-12 Thread Will Deacon
On Fri, Mar 12, 2021 at 10:13:26AM +, Quentin Perret wrote: > On Friday 12 Mar 2021 at 09:32:06 (+), Will Deacon wrote: > > I'm not saying to use the VMID directly, just that allocating half of the > > pte feels a bit OTT given that the state of things after this patch series > > is that we

Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-12 Thread Quentin Perret
On Friday 12 Mar 2021 at 09:32:06 (+), Will Deacon wrote: > I'm not saying to use the VMID directly, just that allocating half of the > pte feels a bit OTT given that the state of things after this patch series > is that we're using exactly 1 bit. Right, and that was the reason for the PROT_NO

Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-12 Thread Will Deacon
On Fri, Mar 12, 2021 at 06:23:00AM +, Quentin Perret wrote: > On Thursday 11 Mar 2021 at 18:38:36 (+), Will Deacon wrote: > > On Wed, Mar 10, 2021 at 05:57:45PM +, Quentin Perret wrote: > > > As the host stage 2 will be identity mapped, all the .hyp memory regions > > > and/or memory pa

Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-11 Thread Quentin Perret
On Thursday 11 Mar 2021 at 18:38:36 (+), Will Deacon wrote: > On Wed, Mar 10, 2021 at 05:57:45PM +, Quentin Perret wrote: > > As the host stage 2 will be identity mapped, all the .hyp memory regions > > and/or memory pages donated to protected guestis will have to marked > > invalid in the

Re: [PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-11 Thread Will Deacon
On Wed, Mar 10, 2021 at 05:57:45PM +, Quentin Perret wrote: > As the host stage 2 will be identity mapped, all the .hyp memory regions > and/or memory pages donated to protected guestis will have to marked > invalid in the host stage 2 page-table. At the same time, the hypervisor > will need a

[PATCH v4 28/34] KVM: arm64: Use page-table to track page ownership

2021-03-10 Thread Quentin Perret
As the host stage 2 will be identity mapped, all the .hyp memory regions and/or memory pages donated to protected guestis will have to marked invalid in the host stage 2 page-table. At the same time, the hypervisor will need a way to track the ownership of each physical page to ensure memory sharin