Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2023-01-13 Thread Sean Christopherson
On Fri, Dec 02, 2022, Chao Peng wrote: > @@ -5599,6 +5652,9 @@ int noinline kvm_mmu_page_fault(struct kvm_vcpu *vcpu, > gpa_t cr2_or_gpa, u64 err > return -EIO; > } > > + if (r == RET_PF_USER) > + return 0; > + > if (r < 0) > return

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-11 Thread Chao Peng
On Fri, Dec 09, 2022 at 09:01:04AM +, Fuad Tabba wrote: > Hi, > > On Fri, Dec 2, 2022 at 6:19 AM Chao Peng wrote: > > > > A KVM_MEM_PRIVATE memslot can include both fd-based private memory and > > hva-based shared memory. Architecture code (like TDX code) can tell > > whether the on-going fau

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-09 Thread Fuad Tabba
Hi, On Fri, Dec 2, 2022 at 6:19 AM Chao Peng wrote: > > A KVM_MEM_PRIVATE memslot 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_f

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-08 Thread Yuan Yao
On Thu, Dec 08, 2022 at 07:23:46PM +0800, Chao Peng wrote: > On Thu, Dec 08, 2022 at 10:29:18AM +0800, Yuan Yao wrote: > > On Fri, Dec 02, 2022 at 02:13:46PM +0800, Chao Peng wrote: > > > A KVM_MEM_PRIVATE memslot can include both fd-based private memory and > > > hva-based shared memory. Architect

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-08 Thread Chao Peng
On Thu, Dec 08, 2022 at 10:29:18AM +0800, Yuan Yao wrote: > On Fri, Dec 02, 2022 at 02:13:46PM +0800, Chao Peng wrote: > > A KVM_MEM_PRIVATE memslot 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

Re: [PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-07 Thread Yuan Yao
On Fri, Dec 02, 2022 at 02:13:46PM +0800, Chao Peng wrote: > A KVM_MEM_PRIVATE memslot 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_pag

[PATCH v10 8/9] KVM: Handle page fault for private memory

2022-12-01 Thread Chao Peng
A KVM_MEM_PRIVATE memslot 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 expected to set i