2021-08-26 17:37:29

by Paraschiv, Andra-Irina

[permalink] [raw]
Subject: [PATCH v1 1/3] nitro_enclaves: Enable Arm support

Update the kernel config to enable the Nitro Enclaves kernel driver for
Arm support.

Signed-off-by: Andra Paraschiv <[email protected]>
---
drivers/virt/nitro_enclaves/Kconfig | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/virt/nitro_enclaves/Kconfig b/drivers/virt/nitro_enclaves/Kconfig
index 8c9387a232df8..f53740b941c0f 100644
--- a/drivers/virt/nitro_enclaves/Kconfig
+++ b/drivers/virt/nitro_enclaves/Kconfig
@@ -1,17 +1,13 @@
# SPDX-License-Identifier: GPL-2.0
#
-# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+# Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

# Amazon Nitro Enclaves (NE) support.
# Nitro is a hypervisor that has been developed by Amazon.

-# TODO: Add dependency for ARM64 once NE is supported on Arm platforms. For now,
-# the NE kernel driver can be built for aarch64 arch.
-# depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
-
config NITRO_ENCLAVES
tristate "Nitro Enclaves Support"
- depends on X86 && HOTPLUG_CPU && PCI && SMP
+ depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
help
This driver consists of support for enclave lifetime management
for Nitro Enclaves (NE).
--
2.20.1 (Apple Git-117)




Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.


2021-08-27 07:08:03

by Stefano Garzarella

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] nitro_enclaves: Enable Arm support

On Thu, Aug 26, 2021 at 08:34:49PM +0300, Andra Paraschiv wrote:
>Update the kernel config to enable the Nitro Enclaves kernel driver for
>Arm support.
>
>Signed-off-by: Andra Paraschiv <[email protected]>
>---
> drivers/virt/nitro_enclaves/Kconfig | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)

Acked-by: Stefano Garzarella <[email protected]>

>
>diff --git a/drivers/virt/nitro_enclaves/Kconfig b/drivers/virt/nitro_enclaves/Kconfig
>index 8c9387a232df8..f53740b941c0f 100644
>--- a/drivers/virt/nitro_enclaves/Kconfig
>+++ b/drivers/virt/nitro_enclaves/Kconfig
>@@ -1,17 +1,13 @@
> # SPDX-License-Identifier: GPL-2.0
> #
>-# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>+# Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>
> # Amazon Nitro Enclaves (NE) support.
> # Nitro is a hypervisor that has been developed by Amazon.
>
>-# TODO: Add dependency for ARM64 once NE is supported on Arm platforms. For now,
>-# the NE kernel driver can be built for aarch64 arch.
>-# depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
>-
> config NITRO_ENCLAVES
> tristate "Nitro Enclaves Support"
>- depends on X86 && HOTPLUG_CPU && PCI && SMP
>+ depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
> help
> This driver consists of support for enclave lifetime management
> for Nitro Enclaves (NE).
>--
>2.20.1 (Apple Git-117)
>
>
>
>
>Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
>

2021-08-27 08:44:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] nitro_enclaves: Enable Arm support

On Thu, Aug 26, 2021 at 08:34:49PM +0300, Andra Paraschiv wrote:
> Update the kernel config to enable the Nitro Enclaves kernel driver for
> Arm support.
>
> Signed-off-by: Andra Paraschiv <[email protected]>
> ---
> drivers/virt/nitro_enclaves/Kconfig | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/virt/nitro_enclaves/Kconfig b/drivers/virt/nitro_enclaves/Kconfig
> index 8c9387a232df8..f53740b941c0f 100644
> --- a/drivers/virt/nitro_enclaves/Kconfig
> +++ b/drivers/virt/nitro_enclaves/Kconfig
> @@ -1,17 +1,13 @@
> # SPDX-License-Identifier: GPL-2.0
> #
> -# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
> +# Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>
> # Amazon Nitro Enclaves (NE) support.
> # Nitro is a hypervisor that has been developed by Amazon.
>
> -# TODO: Add dependency for ARM64 once NE is supported on Arm platforms. For now,
> -# the NE kernel driver can be built for aarch64 arch.
> -# depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
> -
> config NITRO_ENCLAVES
> tristate "Nitro Enclaves Support"
> - depends on X86 && HOTPLUG_CPU && PCI && SMP
> + depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP

So no code change needed? If not, they why do we have a cpu type at all
here?

thanks,

greg k-h

2021-08-27 10:21:42

by Paraschiv, Andra-Irina

[permalink] [raw]
Subject: Re: [PATCH v1 1/3] nitro_enclaves: Enable Arm support



On 27/08/2021 11:43, Greg KH wrote:
> On Thu, Aug 26, 2021 at 08:34:49PM +0300, Andra Paraschiv wrote:
>> Update the kernel config to enable the Nitro Enclaves kernel driver for
>> Arm support.
>>
>> Signed-off-by: Andra Paraschiv <[email protected]>
>> ---
>> drivers/virt/nitro_enclaves/Kconfig | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/virt/nitro_enclaves/Kconfig b/drivers/virt/nitro_enclaves/Kconfig
>> index 8c9387a232df8..f53740b941c0f 100644
>> --- a/drivers/virt/nitro_enclaves/Kconfig
>> +++ b/drivers/virt/nitro_enclaves/Kconfig
>> @@ -1,17 +1,13 @@
>> # SPDX-License-Identifier: GPL-2.0
>> #
>> -# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>> +# Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
>>
>> # Amazon Nitro Enclaves (NE) support.
>> # Nitro is a hypervisor that has been developed by Amazon.
>>
>> -# TODO: Add dependency for ARM64 once NE is supported on Arm platforms. For now,
>> -# the NE kernel driver can be built for aarch64 arch.
>> -# depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
>> -
>> config NITRO_ENCLAVES
>> tristate "Nitro Enclaves Support"
>> - depends on X86 && HOTPLUG_CPU && PCI && SMP
>> + depends on (ARM64 || X86) && HOTPLUG_CPU && PCI && SMP
> So no code change needed? If not, they why do we have a cpu type at all
> here?

Yes, no codebase changes needed so far.

I've looked during the initial phase of the upstreaming process to also
check the ARM64 build and use / implement functionality that would not
be x86 specific, if possible. And it worked good, for now no necessary
updates.

The supported architectures for the Nitro Enclaves overall project will
be x86 and ARM64 (x86 support has been released, ARM64 support is to be
released), so mentioning these explicitly here. No other architectures
have been considered so far.

Thanks,
Andra



Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.