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

2022-11-17 Thread Chao Peng
On Wed, Nov 16, 2022 at 10:13:07PM +, Sean Christopherson wrote: > On Wed, Nov 16, 2022, Ackerley Tng wrote: > > >@@ -4173,6 +4203,22 @@ static int kvm_faultin_pfn(struct kvm_vcpu *vcpu, > > >struct kvm_page_fault *fault) > > > return RET_PF_EMULATE; > > > } > > > > > >+ i

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

2022-11-16 Thread Sean Christopherson
On Wed, Nov 16, 2022, Ackerley Tng wrote: > >@@ -4173,6 +4203,22 @@ static int kvm_faultin_pfn(struct kvm_vcpu *vcpu, > >struct kvm_page_fault *fault) > > return RET_PF_EMULATE; > > } > > > >+if (kvm_slot_can_be_private(slot) && > >+fault->is_private != kvm_mem_

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

2022-11-16 Thread Ackerley Tng
> 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

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

2022-11-01 Thread Chao Peng
On Mon, Oct 31, 2022 at 05:02:50PM -0700, Isaku Yamahata wrote: > On Fri, Oct 28, 2022 at 02:55:45PM +0800, > Chao Peng wrote: > > > On Wed, Oct 26, 2022 at 02:54:25PM -0700, Isaku Yamahata wrote: > > > On Tue, Oct 25, 2022 at 11:13:43PM +0800, > > > Chao Peng wrote: > > > > > > > A memslot wit

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

2022-10-31 Thread Isaku Yamahata
On Fri, Oct 28, 2022 at 02:55:45PM +0800, Chao Peng wrote: > On Wed, Oct 26, 2022 at 02:54:25PM -0700, Isaku Yamahata wrote: > > On Tue, Oct 25, 2022 at 11:13:43PM +0800, > > Chao Peng wrote: > > > > > A memslot with KVM_MEM_PRIVATE being set can include both fd-based > > > private memory and h

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

2022-10-28 Thread Chao Peng
On Wed, Oct 26, 2022 at 02:54:25PM -0700, Isaku Yamahata wrote: > On Tue, Oct 25, 2022 at 11:13:43PM +0800, > Chao Peng wrote: > > > 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 wh

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

2022-10-26 Thread Isaku Yamahata
On Tue, Oct 25, 2022 at 11:13:43PM +0800, Chao Peng wrote: > 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'

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

2022-10-25 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 ex