Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-27 Thread Tejun Heo
Hello, On Tue, Jan 26, 2021 at 05:11:59PM -0800, Vipin Sharma wrote: > Sounds good, we can have a single top level stat file > > misc.stat > Shows how many are supported on the host: > $ cat misc.stat > sev 500 > sev_es 10 > > If total value of some resource is 0 then it will be

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-26 Thread David Rientjes
On Thu, 21 Jan 2021, Sean Christopherson wrote: > True, but the expected dual-usage is more about backwards compatibility than > anything else. Running an SEV-ES VM requires a heavily enlightened guest > vBIOS > and kernel, which means that a VM that was created as an SEV guest cannot > easily

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-26 Thread Vipin Sharma
On Tue, Jan 26, 2021 at 05:01:04PM -0500, Tejun Heo wrote: > The whole thing seems pretty immature to me and I agree with you that coming > up with an abstraction at this stage feels risky. > > I'm leaning towards creating a misc controller to shove these things into: > > * misc.max and

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-26 Thread Tejun Heo
On Tue, Jan 26, 2021 at 05:01:04PM -0500, Tejun Heo wrote: > * misc.max and misc.current: nested keyed files listing max and current > usage for the cgroup. Keyed files, not nested keyed files. Thanks. -- tejun

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-26 Thread Tejun Heo
Hello, On Tue, Jan 26, 2021 at 12:49:14PM -0800, David Rientjes wrote: > > SEV-SNP, another incremental enhancement (on SEV-ES), further strengthens > > the > > argument for SEV and SEV-* coexistenence. SEV-SNP and SEV-ES will share the > > same ASID range, so the question is really, "do we

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-21 Thread Sean Christopherson
On Thu, Jan 21, 2021, Tom Lendacky wrote: > On 1/21/21 9:55 AM, Tejun Heo wrote: > > Hello, > > > > On Thu, Jan 21, 2021 at 08:55:07AM -0600, Tom Lendacky wrote: > > > The hardware will allow any SEV capable ASID to be run as SEV-ES, however, > > > the SEV firmware will not allow the activation

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-21 Thread Vipin Sharma
On Wed, Jan 20, 2021 at 06:32:56PM -0500, Tejun Heo wrote: > I don't know how many times I have to repeat the same point to get it > across. For any question about actual abstraction, you haven't provided any > kind of actual research or analysis and just keep pushing the same thing > over and

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-21 Thread Tom Lendacky
On 1/21/21 9:55 AM, Tejun Heo wrote: Hello, On Thu, Jan 21, 2021 at 08:55:07AM -0600, Tom Lendacky wrote: The hardware will allow any SEV capable ASID to be run as SEV-ES, however, the SEV firmware will not allow the activation of an SEV-ES VM to be assigned to an ASID greater than or equal to

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-21 Thread Tejun Heo
Hello, On Thu, Jan 21, 2021 at 08:55:07AM -0600, Tom Lendacky wrote: > The hardware will allow any SEV capable ASID to be run as SEV-ES, however, > the SEV firmware will not allow the activation of an SEV-ES VM to be > assigned to an ASID greater than or equal to the SEV minimum ASID value. The >

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-21 Thread Tom Lendacky
On 1/20/21 10:40 AM, Tejun Heo wrote: Hello, On Tue, Jan 19, 2021 at 11:13:51PM -0800, Vipin Sharma wrote: Can you please elaborate? I skimmed through the amd manual and it seemed to say that SEV-ES ASIDs are superset of SEV but !SEV-ES ASIDs. What's the use case for mixing those two? For

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-20 Thread Vipin Sharma
On Wed, Jan 20, 2021 at 11:40:18AM -0500, Tejun Heo wrote: > Hello, > > On Tue, Jan 19, 2021 at 11:13:51PM -0800, Vipin Sharma wrote: > > > Can you please elaborate? I skimmed through the amd manual and it seemed > > > to > > > say that SEV-ES ASIDs are superset of SEV but !SEV-ES ASIDs. What's

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-20 Thread Tejun Heo
Hello, On Wed, Jan 20, 2021 at 03:18:29PM -0800, Vipin Sharma wrote: > RDMA cgroup expose hardware details to users. In rdma.{max, current} > interface files we can see actual hardware names. Only difference No, what's shown is the device name followed by resources which are commonly defined for

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-20 Thread Tejun Heo
Hello, On Tue, Jan 19, 2021 at 11:13:51PM -0800, Vipin Sharma wrote: > > Can you please elaborate? I skimmed through the amd manual and it seemed to > > say that SEV-ES ASIDs are superset of SEV but !SEV-ES ASIDs. What's the use > > case for mixing those two? > > For example, customers can be

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-19 Thread Vipin Sharma
On Tue, Jan 19, 2021 at 10:51:24AM -0500, Tejun Heo wrote: > Hello, > > On Fri, Jan 15, 2021 at 08:32:19PM -0800, Vipin Sharma wrote: > > SEV-ES has stronger memory encryption gurantees compared to SEV, apart > > from encrypting the application memory it also encrypts register state > > among

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-19 Thread Tejun Heo
Hello, On Fri, Jan 15, 2021 at 08:32:19PM -0800, Vipin Sharma wrote: > SEV-ES has stronger memory encryption gurantees compared to SEV, apart > from encrypting the application memory it also encrypts register state > among other things. In a single host ASIDs can be distributed between > these

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-15 Thread Vipin Sharma
On Fri, Jan 15, 2021 at 10:43:32PM -0500, Tejun Heo wrote: > On Fri, Jan 15, 2021 at 02:18:40PM -0800, Vipin Sharma wrote: > > > * Why is .sev a separate namespace? Isn't the controller supposed to cover > > > encryption ids across different implementations? It's not like multiple > > > types

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-15 Thread Tejun Heo
On Fri, Jan 15, 2021 at 02:18:40PM -0800, Vipin Sharma wrote: > > * Why is .sev a separate namespace? Isn't the controller supposed to cover > > encryption ids across different implementations? It's not like multiple > > types of IDs can be in use on the same machine, right? > > > > On AMD

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-15 Thread Vipin Sharma
On Fri, Jan 15, 2021 at 03:59:25PM -0500, Tejun Heo wrote: > Hello, > > On Thu, Jan 07, 2021 at 05:28:45PM -0800, Vipin Sharma wrote: > > 1. encrpytion_ids.sev.max > > Sets the maximum usage of SEV IDs in the cgroup. > > 2. encryption_ids.sev.current > > Current usage of SEV IDs in the

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-15 Thread Tejun Heo
Hello, On Thu, Jan 07, 2021 at 05:28:45PM -0800, Vipin Sharma wrote: > 1. encrpytion_ids.sev.max > Sets the maximum usage of SEV IDs in the cgroup. > 2. encryption_ids.sev.current > Current usage of SEV IDs in the cgroup and its children. > 3. encryption_ids.sev.stat > Shown

Re: [Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-13 Thread Brijesh Singh
On 1/7/2021 7:28 PM, Vipin Sharma wrote: Hardware memory encryption is available on multiple generic CPUs. For example AMD has Secure Encrypted Virtualization (SEV) and SEV - Encrypted State (SEV-ES). These memory encryptions are useful in creating encrypted virtual machines (VMs) and user

[Patch v4 1/2] cgroup: svm: Add Encryption ID controller

2021-01-07 Thread Vipin Sharma
Hardware memory encryption is available on multiple generic CPUs. For example AMD has Secure Encrypted Virtualization (SEV) and SEV - Encrypted State (SEV-ES). These memory encryptions are useful in creating encrypted virtual machines (VMs) and user space programs. There are limited number of