Re: [PATCH RFC 4/5] KVM: x86: aggressively map PTEs in KVM_MEM_ALLONES slots

2020-05-15 Thread Sean Christopherson
On Fri, May 15, 2020 at 10:36:19AM +0200, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > IMO this is a waste of memory and TLB entries. Why not treat the access as > > the MMIO it is and emulate the access with a 0xff return value? I think > > it'd be a simple change to have

Re: [PATCH RFC 4/5] KVM: x86: aggressively map PTEs in KVM_MEM_ALLONES slots

2020-05-15 Thread Vitaly Kuznetsov
Sean Christopherson writes: > On Thu, May 14, 2020 at 08:05:39PM +0200, Vitaly Kuznetsov wrote: >> All PTEs in KVM_MEM_ALLONES slots point to the same read-only page >> in KVM so instead of mapping each page upon first access we can map >> everything aggressively. >> >> Suggested-by: Michael S.

Re: [PATCH RFC 4/5] KVM: x86: aggressively map PTEs in KVM_MEM_ALLONES slots

2020-05-14 Thread Sean Christopherson
On Thu, May 14, 2020 at 08:05:39PM +0200, Vitaly Kuznetsov wrote: > All PTEs in KVM_MEM_ALLONES slots point to the same read-only page > in KVM so instead of mapping each page upon first access we can map > everything aggressively. > > Suggested-by: Michael S. Tsirkin > Signed-off-by: Vitaly

[PATCH RFC 4/5] KVM: x86: aggressively map PTEs in KVM_MEM_ALLONES slots

2020-05-14 Thread Vitaly Kuznetsov
All PTEs in KVM_MEM_ALLONES slots point to the same read-only page in KVM so instead of mapping each page upon first access we can map everything aggressively. Suggested-by: Michael S. Tsirkin Signed-off-by: Vitaly Kuznetsov --- arch/x86/kvm/mmu/mmu.c | 20 ++--