On Sun, Apr 4, 2021 at 10:35 AM Tejun Heo wrote:
>
> Applied to cgroup/for-5.13. If there are further issues, let's address them
> incrementally.
>
> Thanks.
>
> --
> tejun
Thanks Tejun for accepting and guiding through each version of this
patch series.
.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
arch/x86/kvm/svm/sev.c | 70 +++--
arch/x86/kvm/svm/svm.h | 1 +
include/linux/misc_cgroup.h | 6
kernel/cgroup/misc.c| 6
4 files changed, 73 insertions(+), 10 deletions
be set to max by::
# echo res_a max > misc.max
Limits can be set more than the capacity value in the misc.capacity
file.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
include/linux/cgroup_subsys.h | 4 +
include/linux/misc_cgroup.h | 126 +++
init/K
Documentation of miscellaneous cgroup controller. This new controller is
used to track and limit the usage of scalar resources.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4
://lore.kernel.org/lkml/20210304231946.2766648-1-vipi...@google.com/
Vipin Sharma (3):
cgroup: Add misc cgroup controller
cgroup: Miscellaneous cgroup documentation.
svm/sev: Register SEV and SEV-ES ASIDs to the misc controller
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
Documentation/admin
On Wed, Mar 24, 2021 at 09:17:01AM -0700, Jacob Pan wrote:
> I didn't mean the users of misc_cgroup will use css directly. I meant if I
> want to use misc cgruop in ioasid.c, I have to do the following to avoid
> undefined css:
> #include
> #include
>
> So it might be simpler if you do #include
On Fri, Mar 19, 2021 at 02:28:01PM -0700, Jacob Pan wrote:
> On Thu, 4 Mar 2021 15:19:45 -0800, Vipin Sharma wrote:
> > +#ifndef _MISC_CGROUP_H_
> > +#define _MISC_CGROUP_H_
> > +
> nit: should you do #include ?
> Otherwise, css may be undefined.
User
On Mon, Mar 15, 2021 at 08:10:09PM +0100, Michal Koutný wrote:
> On Fri, Mar 12, 2021 at 09:49:26AM -0800, Vipin Sharma
> wrote:
> > I will add some more information in the cover letter of the next version.
> Thanks.
>
> > Each one coming up with their own interacti
gt; Hello,
> >
> > On Wed, Mar 03, 2021 at 10:22:03PM -0800, Vipin Sharma wrote:
> > > > I am trying to see if IOASIDs cgroup can also fit in this misc
> > > > controller as yet another resource type.
> > > > https://lore.kernel.org/linux-iommu/2021030
On Thu, Mar 11, 2021 at 07:59:03PM +0100, Michal Koutný wrote:
> > +#ifndef CONFIG_KVM_AMD_SEV
> > +/*
> > + * When this config is not defined, SEV feature is not supported and APIs
> > in
> > + * this file are not used but this file still gets compiled into the KVM
> > AMD
> > + * module.
> > +
On Thu, Mar 11, 2021 at 07:59:03PM +0100, Michal Koutný wrote:
> Given different two-fold nature (SEV caller vs misc controller) of some
> remarks below, I think it makes sense to split this into two patches:
> a) generic controller implementation,
> b) hooking the controller into SEV ASIDs managem
On Thu, Mar 11, 2021 at 07:58:19PM +0100, Michal Koutný wrote:
> I admit, I didn't follow the past dicussions completely, however,
> (Vipin) could it be in the cover letter/commit messages shortly
> summarized why cgroups and a controller were chosen to implement
> restrictions of these resources,
Documentation of miscellaneous cgroup controller. This new controller is
used to track and limit the usage of scalar resources.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4
by::
# echo sev 1 > misc.max
Limit can be set to max by::
# echo sev max > misc.max
Limits can be set more than the capacity value in the misc.capacity
file.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
arch/x86/kvm/svm/sev.c| 65 +-
messages.
3. Changed charge API to treat misc_cg as input parameter.
4. Added helper APIs to get and release references on the cgroup.
[1] https://lore.kernel.org/lkml/20210218195549.1696769-1-vipi...@google.com
[2] https://lore.kernel.org/lkml/20210302081705.1990283-1-vipi...@google.com/
Vipin
On Wed, Mar 03, 2021 at 06:55:13PM -0800, Jacob Pan wrote:
> Hi Vipin,
>
> On Tue, 2 Mar 2021 00:17:05 -0800, Vipin Sharma wrote:
>
> > +Migration and Ownership
> > +~~~
> > +
> > +A miscellaneous scalar resource is charged to the cgroup
On Wed, Mar 03, 2021 at 10:42:37AM -0500, Tejun Heo wrote:
> > + atomic_t usage;
> > +};
>
> Can we do 64bits so that something which counts memory can use this too?
>
Sure.
> > +
> > + if (usage > capacity)
> > + return -EBUSY;
>
> I'd rather go with allowing brin
Documentation of miscellaneous cgroup controller. This new controller is
used to track and limit the usage of scalar resources.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4
by::
# echo sev 1 > misc.max
Limit can be set to max by::
# echo sev max > misc.max
Limits can be set more than the capacity value in the misc.capacity
file.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
arch/x86/kvm/svm/sev.c| 65 +-
/20210218195549.1696769-1-vipi...@google.com
Vipin Sharma (2):
cgroup: sev: Add misc cgroup controller
cgroup: sev: Miscellaneous cgroup documentation.
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4 +
Documentation/admin-guide/cgroup-v2.rst
On Thu, Feb 25, 2021 at 10:52:49AM +0100, Michal Koutný wrote:
> On Wed, Feb 24, 2021 at 08:57:36PM -0800, Vipin Sharma
> wrote:
> > This function is meant for hot unplug functionality too.
> Then I'm wondering if the current form is sufficient, i.e. the generic
> controll
On Tue, Feb 23, 2021 at 07:24:55PM +0100, Michal Koutný wrote:
> On Thu, Feb 18, 2021 at 11:55:48AM -0800, Vipin Sharma
> wrote:
> > --- a/arch/x86/kvm/svm/sev.c
> > +++ b/arch/x86/kvm/svm/sev.c
> > [...]
> > +#ifndef CONFIG_KVM_AMD_SEV
> > +/*
> >
On Tue, Feb 23, 2021 at 07:24:33PM +0100, Michal Koutný wrote:
> Hello.
>
> On Thu, Feb 18, 2021 at 11:55:47AM -0800, Vipin Sharma
> wrote:
> > This patch is creating a new misc cgroup controller for allocation and
> > tracking of resources which are not ab
On Fri, Feb 19, 2021 at 11:02:41AM -0800, Randy Dunlap wrote:
> > +++ b/Documentation/admin-guide/cgroup-v1/misc.rst
> > @@ -0,0 +1 @@
> > +/Documentation/admin-guide/cgroup-v2.rst
> What is the purpose of this (above) file?
This new controller has both cgroup v1 and v2 support. Tejun suggested
if
Documentation of miscellaneous cgroup controller. This new controller is
used to track and limit usage of scalar resources.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
Documentation/admin-guide/cgroup-v1/misc.rst | 1 +
Documentation/admin-guide/cgroup-v2.rst | 64
::
# echo sev 1 > misc.max
Limit can be set to max by::
# echo sev max > misc.max
Limits can be set more than the capacity value in the misc.capacity
file.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
---
arch/x86/kvm/svm/sev.c| 60 -
arch/x
hanks
Vipin Sharma (2):
cgroup: sev: Add misc cgroup controller
cgroup: sev: Miscellaneous cgroup documentation.
Documentation/admin-guide/cgroup-v1/misc.rst | 1 +
Documentation/admin-guide/cgroup-v2.rst | 64 ++-
arch/x86/kvm/svm/sev.c | 60 ++-
arch/x86/kv
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 misc.curr
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 over
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 super
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 reg
On Mon, Jan 18, 2021 at 9:55 AM Randy Dunlap wrote:
>
> On 1/15/21 6:32 PM, Vipin Sharma wrote:
> > Documentation of Encryption IDs controller. This new controller is used
> > to track and limit usage of hardware memory encryption capabilities on
> > the CPUs.
> >
&
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
Documentation of Encryption IDs controller. This new controller is used
to track and limit usage of hardware memory encryption capabilities on
the CPUs.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
.../admin-guide/cgroup-v1/encryption_ids.rst | 1
f --git a/include/linux/encryption_ids_cgroup.h
b/include/linux/encryption_ids_cgroup.h
new file mode 100644
index ..af428a4beb28
--- /dev/null
+++ b/include/linux/encryption_ids_cgroup.h
@@ -0,0 +1,72 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Encryption IDs cgroup controller.
+ *
+
rent
[1] https://lore.kernel.org/lkml/20200922004024.3699923-1-vipi...@google.com/
[2] https://lore.kernel.org/lkml/20201208213531.2626955-1-vipi...@google.com/
[3] https://lore.kernel.org/lkml/20201209205413.3391139-1-vipi...@google.com/
[4] https://lore.kernel.org/lkml/20210108012846.4134815-1-vipi...@google.com
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
> >
On Fri, Jan 15, 2021 at 04:00:26PM -0500, Tejun Heo wrote:
> On Thu, Jan 07, 2021 at 05:28:46PM -0800, Vipin Sharma wrote:
> > Documentation for both cgroup versions, v1 and v2, of Encryption IDs
> > controller. This new controller is used to track and limit usage of
> > hardw
.
Other ID types can be easily added in the controller in the same way.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
arch/x86/kvm/svm/sev.c| 52 +++-
include/linux/cgroup_subsys.h | 4 +
include/linux/encryption_ids_cgroup.h
Documentation for both cgroup versions, v1 and v2, of Encryption IDs
controller. This new controller is used to track and limit usage of
hardware memory encryption capabilities on the CPUs.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
.../admin-guide
.com/
[3] https://lore.kernel.org/lkml/20201209205413.3391139-1-vipi...@google.com/
Vipin Sharma (2):
cgroup: svm: Add Encryption ID controller
cgroup: svm: Encryption IDs cgroup documentation.
.../admin-guide/cgroup-v1/encryption_ids.rst | 108 +
Documentation/admin-guide/cgroup-v2.
On Tue, Jan 05, 2021 at 10:36:40AM -0500, Tejun Heo wrote:
> Happy new year!
>
> On Wed, Dec 16, 2020 at 12:02:37PM -0800, Vipin Sharma wrote:
> > I like the idea of having a separate controller to keep the code simple and
> > easier for maintenance.
>
> Yeah, the mor
On Wed, Dec 9, 2020 at 12:59 PM Tejun Heo wrote:
> * I don't have an overall objection. In terms of behavior, the only thing
> which stood out was input rejection depending on the current usage. The
> preferred way of handling that is rejecting future allocations rather than
> failing config
Documentation for both cgroup versions, v1 and v2, of Encryption IDs
controller. This new controller is used to track and limit usage of
hardware memory encryption capabilities on the CPUs.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
.../admin-guide
.
Other ID types can be easily added in the controller in the same way.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
Reported-by: kernel test robot
---
arch/x86/kvm/svm/sev.c| 28 +-
include/linux/cgroup_subsys.h | 4 +
include
ion_ids.sev.max
- encryption_ids.sev.current
Thanks
Vipin Sharma
[1] https://lore.kernel.org/lkml/20200922004024.3699923-1-vipi...@google.com/#r
[2] https://lore.kernel.org/lkml/20201208213531.2626955-1-vipi...@google.com/
.../admin-guide/cgroup-v1/encryption_ids.rst | 108 +
Documentat
On Tue, Dec 08, 2020 at 01:35:29PM -0800, Vipin Sharma wrote:
> Hello,
>
> This patch adds a new cgroup controller, Encryption IDs, to track and
> limit the usage of encryption IDs on a host.
>
> AMD provides Secure Encrypted Virtualization (SEV) and SEV with
> Encryp
Documentation for both cgroup versions, v1 and v2, of Encryption IDs
controller. This new controller is used to track and limit usage of
hardware memory encryption capabilities on the CPUs.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
.../admin-guide
.
Other ID types can be easily added in the controller in the same way.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
---
arch/x86/kvm/svm/sev.c| 28 +-
include/linux/cgroup_subsys.h | 4 +
include/linux/encryption_ids_cgroup.h | 70
- Replaced SEV specific names in APIs and documentations with generic
encryption IDs.
- Providing 3 cgroup files per encryption ID type. For example in SEV,
- encryption_ids.sev.stat (only in the root cgroup directory).
- encryption_ids.sev.max
- encryption_ids.sev.current
Thanks
Vipin Sh
On Tue, Nov 24, 2020 at 09:27:25PM +, Sean Christopherson wrote:
> On Tue, Nov 24, 2020, Vipin Sharma wrote:
> > On Tue, Nov 24, 2020 at 12:18:45PM -0800, David Rientjes wrote:
> > > On Tue, 24 Nov 2020, Vipin Sharma wrote:
> > >
> > > > > > Loopi
On Tue, Nov 24, 2020 at 12:18:45PM -0800, David Rientjes wrote:
> On Tue, 24 Nov 2020, Vipin Sharma wrote:
>
> > > > Looping Janosch and Christian ba
ean Christopherson wrote:
> >
> >
> >
> > > On Fri, Oct 02, 2020 at 01:48:10PM -0700, Vipin Sharma wrote:
> > >
> >
On Fri, Sep 25, 2020 at 03:22:20PM -0700, Vipin Sharma wrote:
> On Thu, Sep 24, 2020 at 02:55:18PM -0500, Tom Lendacky wrote:
> > On 9/24/20 2:21 PM, Sean Christopherson wrote:
> > > On Tue, Sep 22, 2020 at 02:14:04PM -0700, Vipin Sharma wrote:
> > > > On Mon, Se
On Thu, Sep 24, 2020 at 02:55:18PM -0500, Tom Lendacky wrote:
> On 9/24/20 2:21 PM, Sean Christopherson wrote:
> > On Tue, Sep 22, 2020 at 02:14:04PM -0700, Vipin Sharma wrote:
> > > On Mon, Sep 21, 2020 at 06:48:38PM -0700, Sean Christopherson wrote:
> > > > On M
On Mon, Sep 21, 2020 at 06:48:38PM -0700, Sean Christopherson wrote:
> On Mon, Sep 21, 2020 at 05:40:22PM -0700, Vipin Sharma wrote:
> > Hello,
> >
> > This patch series adds a new SEV controller for tracking and limiting
> > the usage of SEV ASIDs on the AMD SVM platf
On Mon, Sep 21, 2020 at 06:22:28PM -0700, Sean Christopherson wrote:
> On Mon, Sep 21, 2020 at 06:04:04PM -0700, Randy Dunlap wrote:
> > Hi,
> >
> > On 9/21/20 5:40 PM, Vipin Sharma wrote:
> > > diff --git a/init/Kconfig b/init/Kconfig
> > > index d6a0b3
pping when
the cgroup is deleted. Mapping array is freed when kvm-amd module is
unloaded.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
Reviewed-by: Erdem Aktas
---
arch/x86/kvm/Makefile | 1 +
arch/x86/kvm/svm/sev.c| 16 +-
arch/x86/kv
both
cgroup v1 and v2.
Thanks
Vipin Sharma (2):
KVM: SVM: Create SEV cgroup controller.
KVM: SVM: SEV cgroup controller documentation
Documentation/admin-guide/cgroup-v1/sev.rst | 94 +
Documentation/admin-guide/cgroup-v2.rst | 56 ++-
arch/x86/kvm/Makefile
SEV cgroup controller documentation.
Documentation for both cgroup versions, v1 and v2, of SEV cgroup
controller. SEV controller is used to distribute and account SEV ASIDs
usage by KVM on AMD processor.
Signed-off-by: Vipin Sharma
Reviewed-by: David Rientjes
Reviewed-by: Dionna Glaze
60 matches
Mail list logo