Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-20 Thread Jarkko Sakkinen
On Tue, Jan 10, 2023 at 05:14:32PM +0800, Chao Peng wrote: > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > > On Fri, Jan 06, 2023, Chao Peng wrote: > > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-20 Thread Jarkko Sakkinen
On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > On Fri, Jan 06, 2023, Chao Peng wrote: > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > > > To make future maintenance easy, internally

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-17 Thread Chao Peng
On Fri, Jan 13, 2023 at 10:37:39PM +, Sean Christopherson wrote: > On Tue, Jan 10, 2023, Chao Peng wrote: > > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > > > On Fri, Jan 06, 2023, Chao Peng wrote: > > > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-13 Thread Sean Christopherson
On Tue, Jan 10, 2023, Chao Peng wrote: > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > > On Fri, Jan 06, 2023, Chao Peng wrote: > > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > > >

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-10 Thread Vishal Annapurve
On Tue, Jan 10, 2023 at 1:19 AM Chao Peng wrote: > > > > Regarding the userspace side of things, please include Vishal's selftests > > in v11, > > it's impossible to properly review the uAPI changes without seeing the > > userspace > > side of things. I'm in the process of reviewing Vishal's

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-10 Thread Chao Peng
On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote: > On Fri, Jan 06, 2023, Chao Peng wrote: > > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > > > To make future maintenance easy, internally

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-09 Thread Sean Christopherson
On Fri, Jan 06, 2023, Chao Peng wrote: > On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > > To make future maintenance easy, internally use a binary compatible > > > alias struct kvm_user_mem_region to handle both

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-06 Thread Chao Peng
On Thu, Jan 05, 2023 at 11:23:01AM +, Jarkko Sakkinen wrote: > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > > key and can be accessed only by the guest itself. We call such memory > > private memory.

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2023-01-05 Thread Jarkko Sakkinen
On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-21 Thread Chao Peng
On Tue, Dec 20, 2022 at 10:55:44AM +0100, Borislav Petkov wrote: > On Tue, Dec 20, 2022 at 03:43:18PM +0800, Chao Peng wrote: > > RESTRICTEDMEM is needed by TDX_HOST, not TDX_GUEST. > > Which basically means that RESTRICTEDMEM should simply depend on KVM. > Because you can't know upfront whether

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-20 Thread Borislav Petkov
On Tue, Dec 20, 2022 at 03:43:18PM +0800, Chao Peng wrote: > RESTRICTEDMEM is needed by TDX_HOST, not TDX_GUEST. Which basically means that RESTRICTEDMEM should simply depend on KVM. Because you can't know upfront whether KVM will run a TDX guest or a SNP guest and so on. Which then means that

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-19 Thread Chao Peng
On Mon, Dec 19, 2022 at 03:36:28PM +0100, Borislav Petkov wrote: > On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > > key and can be accessed only by the guest itself. We call such memory > > private memory.

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-19 Thread Borislav Petkov
On Fri, Dec 02, 2022 at 02:13:41PM +0800, Chao Peng wrote: > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow valueless? I can't

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-19 Thread Chao Peng
On Tue, Dec 13, 2022 at 08:04:14PM +0800, Xiaoyao Li wrote: > On 12/8/2022 7:30 PM, Chao Peng wrote: > > On Thu, Dec 08, 2022 at 04:37:03PM +0800, Xiaoyao Li wrote: > > > On 12/2/2022 2:13 PM, Chao Peng wrote: > > > > > > .. > > > > > > > Together with the change, a new config

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-13 Thread Xiaoyao Li
On 12/8/2022 7:30 PM, Chao Peng wrote: On Thu, Dec 08, 2022 at 04:37:03PM +0800, Xiaoyao Li wrote: On 12/2/2022 2:13 PM, Chao Peng wrote: .. Together with the change, a new config HAVE_KVM_RESTRICTED_MEM is added and right now it is selected on X86_64 only. From the patch implementation,

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-08 Thread Chao Peng
On Thu, Dec 08, 2022 at 04:37:03PM +0800, Xiaoyao Li wrote: > On 12/2/2022 2:13 PM, Chao Peng wrote: > > .. > > > Together with the change, a new config HAVE_KVM_RESTRICTED_MEM is added > > and right now it is selected on X86_64 only. > > > > From the patch implementation, I have no idea why

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-08 Thread Xiaoyao Li
On 12/2/2022 2:13 PM, Chao Peng wrote: .. Together with the change, a new config HAVE_KVM_RESTRICTED_MEM is added and right now it is selected on X86_64 only. From the patch implementation, I have no idea why HAVE_KVM_RESTRICTED_MEM is needed.

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-07 Thread Chao Peng
On Tue, Dec 06, 2022 at 12:39:18PM +, Fuad Tabba wrote: > Hi Chao, > > On Tue, Dec 6, 2022 at 11:58 AM Chao Peng wrote: > > > > On Mon, Dec 05, 2022 at 09:03:11AM +, Fuad Tabba wrote: > > > Hi Chao, > > > > > > On Fri, Dec 2, 2022 at 6:18 AM Chao Peng > > > wrote: > > > > > > > > In

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-06 Thread Fuad Tabba
Hi Chao, On Tue, Dec 6, 2022 at 11:58 AM Chao Peng wrote: > > On Mon, Dec 05, 2022 at 09:03:11AM +, Fuad Tabba wrote: > > Hi Chao, > > > > On Fri, Dec 2, 2022 at 6:18 AM Chao Peng > > wrote: > > > > > > In memory encryption usage, guest memory may be encrypted with special > > > key and

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-06 Thread Chao Peng
On Mon, Dec 05, 2022 at 09:03:11AM +, Fuad Tabba wrote: > Hi Chao, > > On Fri, Dec 2, 2022 at 6:18 AM Chao Peng wrote: > > > > In memory encryption usage, guest memory may be encrypted with special > > key and can be accessed only by the guest itself. We call such memory > > private memory.

Re: [PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-05 Thread Fuad Tabba
Hi Chao, On Fri, Dec 2, 2022 at 6:18 AM Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the guest itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to

[PATCH v10 3/9] KVM: Extend the memslot to support fd-based private memory

2022-12-01 Thread Chao Peng
In memory encryption usage, guest memory may be encrypted with special key and can be accessed only by the guest itself. We call such memory private memory. It's valueless and sometimes can cause problem to allow userspace to access guest private memory. This new KVM memslot extension allows guest