Skip to content

Commit

Permalink
cli: Add new resource driver v0.2.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Trandafir <[email protected]>
  • Loading branch information
Andrei Trandafir authored and Andrei Trandafir committed Apr 7, 2020
1 parent 56655d0 commit 12dfbd5
Show file tree
Hide file tree
Showing 10 changed files with 2,349 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Prerequisites:
for details of how to install docker on your host.
2. Install gcc, make, git.

Driver information:
The Nitro Enclaves device driver is currently at version 0.2. It is based on the
kernel tree head commit b335e6094dff (tag: v0.2, origin/ne-driver-mainline-kernel,
"nitro_enclaves: Add hrtimer support for polling") and supports out-of-tree driver builds.

How to install:
1. Clone the repository.
2. Set NITRO_CLI_INSTALL_DIR to the desired location, by default everything will be
Expand Down
27 changes: 27 additions & 0 deletions drivers/virt/amazon/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-2.0
#
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

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

config NITRO_ENCLAVES
tristate "Nitro Enclaves Support"
---help---
This driver consists of support for enclave lifetime management
for Nitro Enclaves (NE).

To compile this driver as a module, choose M here.
The module will be called nitro_enclaves.
19 changes: 19 additions & 0 deletions drivers/virt/amazon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: GPL-2.0
#
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

# Enclave lifetime management support for Nitro Enclaves (NE).

obj-$(CONFIG_NITRO_ENCLAVES) += nitro_enclaves/
36 changes: 36 additions & 0 deletions drivers/virt/amazon/nitro_enclaves/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: GPL-2.0
#
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

# Enclave lifetime management support for Nitro Enclaves (NE).

obj-m += nitro_enclaves.o

nitro_enclaves-y := ne_pci_dev.o ne_main.o

ccflags-y += -Wall -I$(src)/../../../../include

KERNEL_RELEASE := $(shell uname -r)

KERNEL_BUILD_DIR := "/lib/modules/$(KERNEL_RELEASE)/build"

all:
@if [ ! -d "$(KERNEL_BUILD_DIR)" ] ; then \
echo "$(KERNEL_BUILD_DIR) not present, install kernel-devel package for $(KERNEL_RELEASE)"; \
fi
$(MAKE) -C $(KERNEL_BUILD_DIR) M=$(shell pwd) modules

clean:
$(MAKE) -C $(KERNEL_BUILD_DIR) M=$(shell pwd) clean
Loading

0 comments on commit 12dfbd5

Please sign in to comment.