[PATCH net-next v4 3/5] vsock_addr: Check for supported flag values

2020-12-14 Thread Andra Paraschiv
Check if the provided flags value from the vsock address data structure includes the supported flags in the corresponding kernel version. The first byte of the "svm_zero" field is used as "svm_flags", so add the flags check instead. Changelog v3 -> v4 * New patch in v4

[PATCH net-next v4 2/5] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-14 Thread Andra Paraschiv
ags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets.h | 20 1 file changed, 20 insertions(+) diff --git a/include/uapi/linux/vm_sockets.h b/include/

[PATCH net-next v4 0/5] vsock: Add flags field in the vsock address

2020-12-14 Thread Andra Paraschiv
on the receive path in the vsock transport assignment logic. * Merge the checks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.com/ --- Andra Paraschiv (5): vm_sockets: Add flags field in the vsock

[PATCH net-next v4 4/5] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-14 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v3 -> v4 * No changes. v2 -> v3 * No changes. v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-

[PATCH net-next v4 5/5] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-14 Thread Andra Paraschiv
he vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if" block. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- net/vmw_vsock/af_vsock.c | 9 +++-- 1 file changed, 7 insertions(+), 2 d

[PATCH net-next v4 1/5] vm_sockets: Add flags field in the vsock address data structure

2020-12-14 Thread Andra Paraschiv
> v3 * Add "svm_flags" as a new field, not reusing "svm_reserved1". v1 -> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets

[PATCH net-next v3 2/4] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-11 Thread Andra Paraschiv
lag is set in the connect and listen paths. v1 -> v2 * New patch in v2, it was split from the first patch in the series. * Remove the default value for the vsock flags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv --- in

[PATCH net-next v3 0/4] vsock: Add flags field in the vsock address

2020-12-11 Thread Andra Paraschiv
twise operators to setup and check the vsock flag. * Set the vsock flag on the receive path in the vsock transport assignment logic. * Merge the checks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.co

[PATCH net-next v3 1/4] vm_sockets: Add flags field in the vsock address data structure

2020-12-11 Thread Andra Paraschiv
1 -> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv Reviewed-by: Stefano Garzarella --- include/uapi/linux/vm_sockets.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sock

[PATCH net-next v3 3/4] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-11 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v2 -> v3 * No changes. v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-by: Andra Paraschiv Revi

[PATCH net-next v3 4/4] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-11 Thread Andra Paraschiv
ged. Changelog v2 -> v3 * Update bitwise check logic to not compare result to the flag value. v1 -> v2 * Use bitwise operator to check the vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if"

[PATCH net-next v2 4/4] af_vsock: Assign the vsock transport considering the vsock address flags

2020-12-04 Thread Andra Paraschiv
erator to check the vsock flag. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. * Merge the checks for the g2h transport assignment in one "if" block. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PATCH net-next v2 3/4] af_vsock: Set VMADDR_FLAG_TO_HOST flag on the receive path

2020-12-04 Thread Andra Paraschiv
VMADDR_CID_HOST. Changelog v1 -> v2 * Set the vsock flag on the receive path in the vsock transport assignment logic. * Use bitwise operator for the vsock flag setup. * Use the updated "VMADDR_FLAG_TO_HOST" flag naming. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c | 12 +++

[PATCH net-next v2 2/4] vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag

2020-12-04 Thread Andra Paraschiv
rom the first patch in the series. * Remove the default value for the vsock flags field. * Update the naming for the vsock flag to "VMADDR_FLAG_TO_HOST". Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a

[PATCH net-next v2 0/4] vsock: Add flags field in the vsock address

2020-12-04 Thread Andra Paraschiv
ecks for the g2h transport assignment in one "if" block. * v1: https://lore.kernel.org/lkml/20201201152505.19445-1-andra...@amazon.com/ --- Andra Paraschiv (4): vm_sockets: Include flags field in the vsock address data structure vm_sockets: Add VMADDR_FLAG_TO_HOST vsock flag af

[PATCH net-next v2 1/4] vm_sockets: Include flags field in the vsock address data structure

2020-12-04 Thread Andra Paraschiv
v1 -> v2 * Update the field name to "svm_flags". * Split the current patch in 2 patches. Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/

[PATCH net-next v1 3/3] af_vsock: Assign the vsock transport considering the vsock address flag

2020-12-01 Thread Andra Paraschiv
. For the sibling VMs use case, all the vsock packets need to be forwarded to the host, so always assign the guest->host transport if the vsock flag is set. For the other use cases, the vsock transport assignment logic is not changed. Signed-off-by: Andra Paraschiv --- net/vmw_vsock/af_vsock.c |

[PATCH net-next v1 2/3] virtio_transport_common: Set sibling VMs flag on the receive path

2020-12-01 Thread Andra Paraschiv
the use case. Set the vsock flag of the remote address to the one targeted for sibling VMs communication if the following conditions are met: * The source CID of the packet is higher than VMADDR_CID_HOST. * The destination CID of the packet is higher than VMADDR_CID_HOST. Signed-off-by: Andra Paraschiv

[PATCH net-next v1 1/3] vm_sockets: Include flag field in the vsock address data structure

2020-12-01 Thread Andra Paraschiv
instead. This flag can be set when initializing the vsock address variable used for the connect() call. Signed-off-by: Andra Paraschiv --- include/uapi/linux/vm_sockets.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/vm_sockets.h b

[PATCH net-next v1 0/3] vsock: Add flag field in the vsock address

2020-12-01 Thread Andra Paraschiv
or the latest version of the patch series: * https://github.com/andraprs/linux/tree/vsock-flag-sibling-comm-v1 --- Andra Paraschiv (3): vm_sockets: Include flag field in the vsock address data structure virtio_transport_common: Set sibling VMs flag on the receive path af_vsock: Assign the vs

[PATCH v2] nitro_enclaves: Fixup type and simplify logic of the poll mask setup

2020-11-02 Thread Andra Paraschiv
Update the assigned value of the poll result to be EPOLLHUP instead of POLLHUP to match the __poll_t type. While at it, simplify the logic of setting the mask result of the poll function. Changelog v1 -> v2 * Simplify the mask setting logic from the poll function. Signed-off-by: An

[PATCH v1] nitro_enclaves: Fixup type of the poll result assigned value

2020-10-14 Thread Andra Paraschiv
Update the assigned value of the poll result to be EPOLLHUP instead of POLLHUP to match the __poll_t type. Signed-off-by: Andra Paraschiv Reported-by: kernel test robot --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v10 18/18] MAINTAINERS: Add entry for the Nitro Enclaves driver

2020-09-21 Thread Andra Paraschiv
cation of the documentation, as it has been moved to the "virt" directory. v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -> v2 * No cha

[PATCH v10 14/18] nitro_enclaves: Add Kconfig for the Nitro Enclaves driver

2020-09-21 Thread Andra Paraschiv
er is already in place. v1 -> v2 * Update path to Kconfig to match the drivers/virt/nitro_enclaves directory. * Update help in Kconfig. Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/Kconfig| 2 ++ drivers/virt/nitro_enclaves/Kconfig | 20 ++

[PATCH v10 15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

2020-09-21 Thread Andra Paraschiv
v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path to Makefile to match the drivers/virt/nitro_enclaves direc

[PATCH v10 17/18] nitro_enclaves: Add overview documentation

2020-09-21 Thread Andra Paraschiv
No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * Update doc type from .txt to .rst. * Update documentation based on the changes from v4. v2 -> v3 * No changes. v1 -> v2 * New in v2. Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Do

[PATCH v10 16/18] nitro_enclaves: Add sample for ioctl interface usage

2020-09-21 Thread Andra Paraschiv
octl interface usage. v2 -> v3 * Remove the include directory to use the uapi from the kernel. * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * New in v2. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexan

[PATCH v10 09/18] nitro_enclaves: Add logic for setting an enclave vCPU

2020-09-21 Thread Andra Paraschiv
elease. v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. * Remove the BUG_ON calls. * Check if enclave state is init when setting enclave vCPU. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_e

[PATCH v10 11/18] nitro_enclaves: Add logic for setting an enclave memory region

2020-09-21 Thread Andra Paraschiv
enclave max memory regions is reached when setting an enclave memory region. * Check if enclave state is init when setting an enclave memory region. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 317 +++

[PATCH v10 13/18] nitro_enclaves: Add logic for terminating an enclave

2020-09-21 Thread Andra Paraschiv
Update goto labels to match their purpose. * Add early exit in release() if there was a slot alloc error in the fd creation path. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 166 ++ 1 f

[PATCH v10 12/18] nitro_enclaves: Add logic for starting an enclave

2020-09-21 Thread Andra Paraschiv
it when starting an enclave. * Remove the BUG_ON calls. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 157 ++ 1 file changed, 157 insertions(+) diff --git a/drivers/virt/nitro_enclav

[PATCH v10 10/18] nitro_enclaves: Add logic for getting the enclave image load info

2020-09-21 Thread Andra Paraschiv
et enclave image load offset based on flags. * Update the naming for the ioctl command from metadata to info. v2 -> v3 * No changes. v1 -> v2 * New in v2. Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 36

[PATCH v10 07/18] nitro_enclaves: Init misc device providing the ioctl interface

2020-09-21 Thread Andra Paraschiv
global mutex. * Update NE misc device mode to 0660. * Check if the CPU siblings are included in the NE CPU pool, as full CPU cores are given for the enclave(s). Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 139 ++

[PATCH v10 03/18] nitro_enclaves: Define enclave info for internal bookkeeping

2020-09-21 Thread Andra Paraschiv
v1 -> v2 * Add enclave memory regions and vcpus count for enclave bookkeeping. * Update ne_state comments to reflect NE_START_ENCLAVE ioctl naming update. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_e

[PATCH v10 06/18] nitro_enclaves: Handle out-of-band PCI device events

2020-09-21 Thread Andra Paraschiv
te goto labels to match their purpose. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_pci_dev.c | 118 +++ 1 file changed, 118 insertions(+) diff --git a/drivers/virt/nitro_enclaves/ne_pci

[PATCH v10 04/18] nitro_enclaves: Init PCI device driver

2020-09-21 Thread Andra Paraschiv
I device disable state check. * Update function name for NE PCI device probe / remove. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_pci_dev.c | 304 +++

[PATCH v10 08/18] nitro_enclaves: Add logic for creating an enclave VM

2020-09-21 Thread Andra Paraschiv
og pattern for NE. * Update goto labels to match their purpose. * Remove the BUG_ON calls. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_misc_dev.c | 223 ++ 1 file changed, 223 insertions(+)

[PATCH v10 05/18] nitro_enclaves: Handle PCI device command requests

2020-09-21 Thread Andra Paraschiv
call paths. v1 -> v2 * Add log pattern for NE. * Remove the BUG_ON calls. * Update goto labels to match their purpose. * Add fix for kbuild report: https://lore.kernel.org/lkml/202004231644.xtmn4z1z%25...@intel.com/ Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra P

[PATCH v10 02/18] nitro_enclaves: Define the PCI device interface

2020-09-21 Thread Andra Paraschiv
E_OFF / NE_ENABLE_ON defines. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- drivers/virt/nitro_enclaves/ne_pci_dev.h | 327 +++ 1 file changed, 327 insertions(+) create mo

[PATCH v10 00/18] Add support for Nitro Enclaves

2020-09-21 Thread Andra Paraschiv
tter to include more context on the NE overall. * Add fix for the enclave / vcpu fd creation error cleanup path. * Add fix reported by kbuild test robot . * v1: https://lore.kernel.org/lkml/20200421184150.68011-1-andra...@amazon.com/ --- Andra Paraschiv (18): nitro_enclaves: Add ioctl interface def

[PATCH v10 01/18] nitro_enclaves: Add ioctl interface definition

2020-09-21 Thread Andra Paraschiv
enclave image load metadata. * Update NE_ENCLAVE_START ioctl name to NE_START_ENCLAVE. * Add entry in Documentation/userspace-api/ioctl/ioctl-number.rst for NE ioctls. * Update NE ioctls definition based on the updated ioctl range for major and minor. Signed-off-by: Alexandru Vasile Signed-off-by

[PATCH v8 14/18] nitro_enclaves: Add Kconfig for the Nitro Enclaves driver

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * Remove, for now, the dependency on ARM64 arch. x86 is currently supported, with Arm to come afterwards. The NE kernel driver can be built for aarch64 arch. v5 -> v6 * N

[PATCH v8 10/18] nitro_enclaves: Add logic for getting the enclave image load info

2020-09-04 Thread Andra Paraschiv
. Then the user space tooling copies the enclave image in the memory using the given memory offset. Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Add custom error code for incorrect enclave image load info flag. v6 -> v7 * No changes. v5 -> v6

[PATCH v8 15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is

[PATCH v8 18/18] MAINTAINERS: Add entry for the Nitro Enclaves driver

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -

[PATCH v8 13/18] nitro_enclaves: Add logic for terminating an enclave

2020-09-04 Thread Andra Paraschiv
release callback. Free the internal enclave info used for bookkeeping. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * Remove the pci_dev_put() call as the NE misc device parent field is us

[PATCH v8 17/18] nitro_enclaves: Add overview documentation

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Add info about the primary / parent VM CID value. * Update reference link for huge pages. * Add reference link for the x86 boot protocol. * Add license mention and update doc title / chapter formatting.

[PATCH v8 16/18] nitro_enclaves: Add sample for ioctl interface usage

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Track NE custom error codes for invalid page size, invalid flags and enclave CID. * Update the heartbeat logic to have a listener fd first, then start the encl

[PATCH v8 12/18] nitro_enclaves: Add logic for starting an enclave

2020-09-04 Thread Andra Paraschiv
associated with the enclave. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Add check for invalid enclave CID value e.g. well-known CIDs and parent VM CID. * Add custom error code for incorrect flag in enclave start i

[PATCH v8 11/18] nitro_enclaves: Add logic for setting an enclave memory region

2020-09-04 Thread Andra Paraschiv
-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Add early check, while getting user pages, to be multiple of 2 MiB for the pages that back the user space memory region. * Add custom error code for incorrect user space memory region flag. * Include in a separate funct

[PATCH v8 08/18] nitro_enclaves: Add logic for creating an enclave VM

2020-09-04 Thread Andra Paraschiv
-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * Use the NE misc device parent field to get the NE PCI device. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the e

[PATCH v8 09/18] nitro_enclaves: Add logic for setting an enclave vCPU

2020-09-04 Thread Andra Paraschiv
the same NUMA node. CPU 0 and its siblings have to remain available to the primary / parent VM. Add ioctl command logic for setting an enclave vCPU. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 *

[PATCH v8 07/18] nitro_enclaves: Init misc device providing the ioctl interface

2020-09-04 Thread Andra Paraschiv
The Nitro Enclaves driver provides an ioctl interface to the user space for enclave lifetime management e.g. enclave creation / termination and setting enclave resources such as memory and CPU. This ioctl interface is mapped to a Nitro Enclaves misc device. Signed-off-by: Andra Paraschiv

[PATCH v8 06/18] nitro_enclaves: Handle out-of-band PCI device events

2020-09-04 Thread Andra Paraschiv
the out-of-band events. Notify user space enclave process that is using a polling mechanism on the enclave fd. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6

[PATCH v8 05/18] nitro_enclaves: Handle PCI device command requests

2020-09-04 Thread Andra Paraschiv
an MSI-X interrupt vector for command reply notifications to handle this type of communication events. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Update function signature for submit request and retrive re

[PATCH v8 04/18] nitro_enclaves: Init PCI device driver

2020-09-04 Thread Andra Paraschiv
-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * Add NE PCI driver shutdown logic. v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove s

[PATCH v8 03/18] nitro_enclaves: Define enclave info for internal bookkeeping

2020-09-04 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -> v7 * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Update documentation to kernel-d

[PATCH v8 02/18] nitro_enclaves: Define the PCI device interface

2020-09-04 Thread Andra Paraschiv
as private data for the PCI device driver and the function for the PCI device command requests handling. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v7 -> v8 * No changes. v6 -&

[PATCH v8 01/18] nitro_enclaves: Add ioctl interface definition

2020-09-04 Thread Andra Paraschiv
interacts with the NE driver, that exposes an ioctl interface for creating an enclave and setting up its resources. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf Reviewed-by: Stefan Hajnoczi --- Changelog v7 -> v8 * Add NE custom error codes for u

[PATCH v8 00/18] Add support for Nitro Enclaves

2020-09-04 Thread Andra Paraschiv
more context on the NE overall. * Add fix for the enclave / vcpu fd creation error cleanup path. * Add fix reported by kbuild test robot . * v1: https://lore.kernel.org/lkml/20200421184150.68011-1-andra...@amazon.com/ --- Andra Paraschiv (18): nitro_enclaves: Add ioctl interface definition nitro_

[PATCH v7 18/18] MAINTAINERS: Add entry for the Nitro Enclaves driver

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -> v2 * No changes. --- MAINTAINERS | 13 +

[PATCH v7 13/18] nitro_enclaves: Add logic for terminating an enclave

2020-08-17 Thread Andra Paraschiv
release callback. Free the internal enclave info used for bookkeeping. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Remove the pci_dev_put() call as the NE misc device parent field is used now to get the NE PCI dev

[PATCH v7 16/18] nitro_enclaves: Add sample for ioctl interface usage

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * Track POLLNVAL as poll event in addition to POLLHUP. v5 -> v6 * Remove "rc" mentioning when printing errno string. * Remove the ioctl to query API version. * Include usage info for NU

[PATCH v7 14/18] nitro_enclaves: Add Kconfig for the Nitro Enclaves driver

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * Remove, for now, the dependency on ARM64 arch. x86 is currently supported, with Arm to come afterwards. The NE kernel driver can be built for aarch64 arch. v5 -> v6 * No changes. v4 -> v5 * Add arch dependency for Arm /

[PATCH v7 15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 ->

[PATCH v7 17/18] nitro_enclaves: Add overview documentation

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * Update doc type from .txt to .rst. * Update documentation based on the changes from v4. v2 -> v3 * No changes. v1 -> v2 * New in v2.

[PATCH v7 11/18] nitro_enclaves: Add logic for setting an enclave memory region

2020-08-17 Thread Andra Paraschiv
-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Update check for duplicate user space memory regions to cover additional possible scenarios. v5 -> v6 * Check for max number of pages allocated for the internal data structure for pages. * Check for invalid memory

[PATCH v7 12/18] nitro_enclaves: Add logic for starting an enclave

2020-08-17 Thread Andra Paraschiv
associated with the enclave. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 *

[PATCH v7 10/18] nitro_enclaves: Add logic for getting the enclave image load info

2020-08-17 Thread Andra Paraschiv
. Then the user space tooling copies the enclave image in the memory using the given memory offset. Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * No changes. v5 -> v6 * Check for invalid enclave image load flags. v4 -> v5 * Check for the enclave

[PATCH v7 04/18] nitro_enclaves: Init PCI device driver

2020-08-17 Thread Andra Paraschiv
-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity checks for situations that shouldn't hap

[PATCH v7 09/18] nitro_enclaves: Add logic for setting an enclave vCPU

2020-08-17 Thread Andra Paraschiv
the same NUMA node. CPU 0 and its siblings have to remain available to the primary / parent VM. Add ioctl command logic for setting an enclave vCPU. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * Check for error return value when setting the kernel parame

[PATCH v7 07/18] nitro_enclaves: Init misc device providing the ioctl interface

2020-08-17 Thread Andra Paraschiv
The Nitro Enclaves driver provides an ioctl interface to the user space for enclave lifetime management e.g. enclave creation / termination and setting enclave resources such as memory and CPU. This ioctl interface is mapped to a Nitro Enclaves misc device. Signed-off-by: Andra Paraschiv

[PATCH v7 05/18] nitro_enclaves: Handle PCI device command requests

2020-08-17 Thread Andra Paraschiv
an MSI-X interrupt vector for command reply notifications to handle this type of communication events. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc

[PATCH v7 06/18] nitro_enclaves: Handle out-of-band PCI device events

2020-08-17 Thread Andra Paraschiv
the out-of-band events. Notify user space enclave process that is using a polling mechanism on the enclave fd. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv --- Changelog v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5

[PATCH v7 03/18] nitro_enclaves: Define enclave info for internal bookkeeping

2020-08-17 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Update documentation to kernel-doc format. * Include in the e

[PATCH v7 08/18] nitro_enclaves: Add logic for creating an enclave VM

2020-08-17 Thread Andra Paraschiv
-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Use the NE misc device parent field to get the NE PCI device. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 *

[PATCH v7 01/18] nitro_enclaves: Add ioctl interface definition

2020-08-17 Thread Andra Paraschiv
interacts with the NE driver, that exposes an ioctl interface for creating an enclave and setting up its resources. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf Reviewed-by: Stefan Hajnoczi --- Changelog v6 -> v7 * Clarify in the ioctls documentat

[PATCH v7 02/18] nitro_enclaves: Define the PCI device interface

2020-08-17 Thread Andra Paraschiv
as private data for the PCI device driver and the function for the PCI device command requests handling. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v6 -> v7 * Update the documentat

[PATCH v7 00/18] Add support for Nitro Enclaves

2020-08-17 Thread Andra Paraschiv
d sample / documentation for the ioctl interface basic flow usage. * Update cover letter to include more context on the NE overall. * Add fix for the enclave / vcpu fd creation error cleanup path. * Add fix reported by kbuild test robot . * v1: https://lore.kernel.org/lkml/20200421184150.68011-1-andr

[PATCH v6 13/18] nitro_enclaves: Add logic for terminating an enclave

2020-08-05 Thread Andra Paraschiv
release callback. Free the internal enclave info used for bookkeeping. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update documentation to kernel-doc format. * Use directly put_page() instead of unpin_user_pages(), to ma

[PATCH v6 14/18] nitro_enclaves: Add Kconfig for the Nitro Enclaves driver

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * No changes. v4 -> v5 * Add arch dependency for Arm / x86. v3 -> v4 * Add PCI and SMP dependencies. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update

[PATCH v6 15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path to Ma

[PATCH v6 17/18] nitro_enclaves: Add overview documentation

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * Update doc type from .txt to .rst. * Update documentation based on the changes from v4. v2 -> v3 * No changes. v1 -> v2 * New in v2. --- Documentation/nitro_enclaves/

[PATCH v6 16/18] nitro_enclaves: Add sample for ioctl interface usage

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * Remove "rc" mentioning when printing errno string. * Remove the ioctl to query API version. * Include usage info for NUMA-aware hugetlb configuration. * Update documentation to kernel-doc

[PATCH v6 18/18] MAINTAINERS: Add entry for the Nitro Enclaves driver

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -> v2 * No changes. --- MAINTAINERS | 13 + 1 file changed, 13 insertions

[PATCH v6 10/18] nitro_enclaves: Add logic for getting the enclave image load info

2020-08-05 Thread Andra Paraschiv
. Then the user space tooling copies the enclave image in the memory using the given memory offset. Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * Check for invalid enclave image load flags. v4 -> v5 * Check for the enclave not being started when invoking this ioctl call. * Remo

[PATCH v6 12/18] nitro_enclaves: Add logic for starting an enclave

2020-08-05 Thread Andra Paraschiv
associated with the enclave. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * Check for invalid enclave start flags. * Update documentation to kernel-doc format. v4 -> v5 * Add early exit on enclave start ioctl function call error. * Move sanity

[PATCH v6 08/18] nitro_enclaves: Add logic for creating an enclave VM

2020-08-05 Thread Andra Paraschiv
-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update the code base to init the ioctl function in this patch. * Update documentation to kernel-doc format. v4 -> v5 * Release the reference to the NE PCI device on create VM error. * Close enclave fd on copy_t

[PATCH v6 07/18] nitro_enclaves: Init misc device providing the ioctl interface

2020-08-05 Thread Andra Paraschiv
The Nitro Enclaves driver provides an ioctl interface to the user space for enclave lifetime management e.g. enclave creation / termination and setting enclave resources such as memory and CPU. This ioctl interface is mapped to a Nitro Enclaves misc device. Signed-off-by: Andra Paraschiv

[PATCH v6 11/18] nitro_enclaves: Add logic for setting an enclave memory region

2020-08-05 Thread Andra Paraschiv
-by: Andra Paraschiv --- Changelog v5 -> v6 * Check for max number of pages allocated for the internal data structure for pages. * Check for invalid memory region flags. * Check for aligned physical memory regions. * Update documentation to kernel-doc format. * Check for duplicate user space mem

[PATCH v6 09/18] nitro_enclaves: Add logic for setting an enclave vCPU

2020-08-05 Thread Andra Paraschiv
the same NUMA node. CPU 0 and its siblings have to remain available to the primary / parent VM. Add ioctl command logic for setting an enclave vCPU. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * Check CPUs are from the same NUMA node before going through

[PATCH v6 06/18] nitro_enclaves: Handle out-of-band PCI device events

2020-08-05 Thread Andra Paraschiv
the out-of-band events. Notify user space enclave process that is using a polling mechanism on the enclave fd. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv --- Changelog v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity

[PATCH v6 03/18] nitro_enclaves: Define enclave info for internal bookkeeping

2020-08-05 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update documentation to kernel-doc format. * Include in the enclave memory region data structure the user space address and size for duplicate user space memory regions checks. v4 -> v5 * Include enclave

[PATCH v6 05/18] nitro_enclaves: Handle PCI device command requests

2020-08-05 Thread Andra Paraschiv
an MSI-X interrupt vector for command reply notifications to handle this type of communication events. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove

[PATCH v6 04/18] nitro_enclaves: Init PCI device driver

2020-08-05 Thread Andra Paraschiv
-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity checks for situations that shouldn't happen, only if buggy system or

[PATCH v6 02/18] nitro_enclaves: Define the PCI device interface

2020-08-05 Thread Andra Paraschiv
as private data for the PCI device driver and the function for the PCI device command requests handling. Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v5 -> v6 * Update documentation to ker

[PATCH v6 00/18] Add support for Nitro Enclaves

2020-08-05 Thread Andra Paraschiv
ontext on the NE overall. * Add fix for the enclave / vcpu fd creation error cleanup path. * Add fix reported by kbuild test robot . * v1: https://lore.kernel.org/lkml/20200421184150.68011-1-andra...@amazon.com/ --- Andra Paraschiv (18): nitro_enclaves: Add ioctl interface definition nitro_enclav

[PATCH v6 01/18] nitro_enclaves: Add ioctl interface definition

2020-08-05 Thread Andra Paraschiv
interacts with the NE driver, that exposes an ioctl interface for creating an enclave and setting up its resources. Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf Reviewed-by: Stefan Hajnoczi --- Changelog v5 -> v6 * Fix typo in the description ab

[PATCH v5 18/18] MAINTAINERS: Add entry for the Nitro Enclaves driver

2020-07-15 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv --- Changelog v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -> v2 * No changes. --- MAINTAINERS | 13 + 1 file changed, 13 insertions(+) diff --git a/MAINTAINERS b/MAINT

[PATCH v5 15/18] nitro_enclaves: Add Makefile for the Nitro Enclaves driver

2020-07-15 Thread Andra Paraschiv
Signed-off-by: Andra Paraschiv Reviewed-by: Alexander Graf --- Changelog v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path to Makefile to match the

  1   2   >