Re: [PATCH v8 7/8] KVM: Handle page fault for private memory

2022-10-17 Thread Chao Peng
On Fri, Oct 14, 2022 at 06:57:20PM +, Sean Christopherson wrote: > On Thu, Sep 15, 2022, Chao Peng wrote: > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > > index a0f198cede3d..81ab20003824 100644 > > --- a/arch/x86/kvm/mmu/mmu.c > > +++ b/arch/x86/kvm/mmu/mmu.c > > @@

Re: [PATCH v8 7/8] KVM: Handle page fault for private memory

2022-10-14 Thread Sean Christopherson
On Thu, Sep 15, 2022, Chao Peng wrote: > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > index a0f198cede3d..81ab20003824 100644 > --- a/arch/x86/kvm/mmu/mmu.c > +++ b/arch/x86/kvm/mmu/mmu.c > @@ -3028,6 +3028,9 @@ int kvm_mmu_max_mapping_level(struct kvm *kvm, >

[PATCH v8 7/8] KVM: Handle page fault for private memory

2022-09-15 Thread Chao Peng
A memslot with KVM_MEM_PRIVATE being set can include both fd-based private memory and hva-based shared memory. Architecture code (like TDX code) can tell whether the on-going fault is private or not. This patch adds a 'is_private' field to kvm_page_fault to indicate this and architecture code is