Skip to content

Commit 359d958

Browse files
committed
merging with main
Signed-off-by: Wojciech Ozga <woz@zurich.ibm.com>
2 parents f16a216 + e0c4bcb commit 359d958

File tree

12 files changed

+103
-107
lines changed

12 files changed

+103
-107
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: install OpenSBI dependencies
1919
run: sudo apt -qq -y install clang
2020
- name: install Qemu dependencies
21-
run: sudo apt -qq -y install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build python3-venv libslirp-dev
21+
run: sudo apt -qq -y install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build python3-venv libslirp-dev xz-utils
2222
- name: install Buildroot dependencies
2323
run: sudo apt -qq -y install unzip sed binutils diffutils build-essential bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils
2424
- name: install utilities

.github/workflows/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Exclude RefinedRust from dune build
4848
run: echo "(dirs :standard \ generated_code.bak refinedrust)" > verification/dune
4949
- name: install build dependencies
50-
run: sudo apt -qq -y install wget autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
50+
run: sudo apt -qq -y install wget autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev xz-utils
5151
- name: install OpenSBI dependencies
5252
run: sudo apt -qq -y install clang
5353
- name: install Buildroot dependencies

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build/*
55
target/*
66

77
tools/cove_tap_tool/target
8+
qemu/
89
security-monitor/target
910

1011
configurations/overlay/root/harness/baremetal

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "hypervisor/buildroot"]
22
path = hypervisor/buildroot
33
url = https://github.com/buildroot/buildroot.git
4-
[submodule "qemu"]
5-
path = qemu
6-
url = https://github.com/qemu/qemu.git
74
[submodule "security-monitor/opensbi"]
85
path = security-monitor/opensbi
96
url = https://github.com/riscv-software-src/opensbi.git

Makefile

+8-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export LINUX_IMAGE ?= $(HYPERVISOR_WORK_DIR)/buildroot/images/Image
2424
export TOOLS_SOURCE_DIR ?= $(MAKEFILE_SOURCE_DIR)/tools
2525
export TOOLS_WORK_DIR ?= $(ACE_DIR)/tools
2626

27-
export CROSS_COMPILE ?= riscv64-unknown-linux-gnu-
27+
export CROSS_COMPILE = riscv64-unknown-linux-gnu-
2828
export PLATFORM_RISCV_XLEN = 64
2929
export PLATFORM_RISCV_ISA = rv64gc
3030
export PLATFORM_RISCV_ABI = lp64d
@@ -72,7 +72,13 @@ firmware: setup devtools hypervisor
7272
emulator: setup devtools
7373
if [ ! -f "${QEMU_WORK_DIR}/bin/qemu-system-riscv64" ]; then \
7474
mkdir -p $(QEMU_WORK_DIR); \
75-
cd $(QEMU_SOURCE_DIR); ./configure --prefix=$(QEMU_WORK_DIR) --enable-slirp --enable-kvm --target-list=riscv64-softmmu,riscv64-linux-user; \
75+
rm -rf $(QEMU_SOURCE_DIR); \
76+
mkdir -p $(QEMU_SOURCE_DIR); \
77+
cd $(QEMU_SOURCE_DIR); \
78+
wget https://download.qemu.org/qemu-8.2.1.tar.xz; \
79+
tar xJf qemu-8.2.1.tar.xz; \
80+
mv qemu-8.2.1/* $(QEMU_SOURCE_DIR)/; \
81+
./configure --prefix=$(QEMU_WORK_DIR) --enable-slirp --enable-kvm --target-list=riscv64-softmmu,riscv64-linux-user; \
7682
PATH="$(RISCV_GNU_TOOLCHAIN_WORK_DIR)/bin:$(PATH)" $(MAKE) -C $(QEMU_SOURCE_DIR) >/dev/null; \
7783
PATH="$(RISCV_GNU_TOOLCHAIN_WORK_DIR)/bin:$(PATH)" $(MAKE) -C $(QEMU_SOURCE_DIR) install; \
7884
fi

README.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
# Assured Confidential Execution (ACE) for RISC-V
1+
# Assured Confidential Execution (ACE) for RISC-V
22
![Build Status](https://github.com/IBM/ACE-RISCV/actions/workflows/build.yml/badge.svg?branch=main)
33

4-
<img src=".github/ace.png" align="right" width="100" height="100">
5-
6-
ACE-RISCV is an open-source project, whose goal is to deliver a confidential computing framework with a formally proven security monitor. It is based on the [canonical architecture](https://dl.acm.org/doi/pdf/10.1145/3623652.3623668) and targets RISC-V with the goal of being portable to other architectures. The formal verification efforts focus on the [security monitor implementation](security-monitor/). We invite collaborators to work with us to push the boundaries of provable confidential computing technology.
4+
<img src=".github/ace.png" align="right" width="100" height="100">
75

8-
This project implements the RISC-V CoVE spec's deployment model 3 referenced in [Appendix D](https://github.com/riscv-non-isa/riscv-ap-tee/blob/main/).
6+
ACE-RISCV is an open-source project, whose goal is to deliver a confidential computing framework with a formally proven security monitor. It is based on the [canonical architecture](https://dl.acm.org/doi/pdf/10.1145/3623652.3623668) and targets RISC-V with the goal of being portable to other architectures. The formal verification efforts focus on the [security monitor implementation](security-monitor/). We invite collaborators to work with us to push the boundaries of provable confidential computing technology.
97

10-
**This is an active research project, without warranties of any kind.** Please read our [paper](https://dl.acm.org/doi/pdf/10.1145/3623652.3623668) to learn about the approach and goals.
8+
This project implements the RISC-V CoVE spec's deployment model 3 referenced in [Appendix D](https://github.com/riscv-non-isa/riscv-ap-tee/blob/main/). The formal specification is embedded in the security monitor's source code and the proofs are in [verification/ folder](verification/). Please read our [paper](https://dl.acm.org/doi/pdf/10.1145/3623652.3623668) to learn about the approach and goals.
119

1210
## Hardware requirements
13-
We are currently building on RISC-V 64-bit with integer (I), atomic (A) and hypervisor extentions (H), physical memory protection (PMP), memory management unit (MMU), IOPMP, core-local interrupt controller (CLINT), and supervisor timecmp extension (Sstc).
11+
We are currently building on RISC-V 64-bit with integer (I), atomic (A) and hypervisor extentions (H), physical memory protection (PMP), memory management unit (MMU), IOPMP, core-local interrupt controller (CLINT), and supervisor timecmp extension (Sstc).
1412

1513
## Quick Start
16-
Follow instructions to run one of the sample [confidential workloads](confidential-vms) under an [untrusted Linux KVM hypervisor](hypervisor/) in an [emulated RISC-V environment](qemu/).
14+
Follow instructions to run one of the sample [confidential workloads](confidential-vms) under an [untrusted Linux KVM hypervisor](hypervisor/) in an emulated RISC-V environment.
1715

1816
### Requirements
19-
Full compilation of the framework takes a long time because many tools are built from sources. Our toolchain currently includes: a RISC-V emulator (`qemu`), hypervisor kernel (`Linux kernel`), and firmware (`security monitor` with `OpenSBI firmware`). Make sure to build this project on a machine with at least 4 cores, 4GB RAM, and 50GB disk space for reasonable (~30min) build time.
17+
Full compilation of the framework takes a long time because many tools are built from sources. Our toolchain currently includes: hypervisor kernel (`Linux kernel`), confidential guest kernel (`Linux kernel`) and firmware (`security monitor` with `OpenSBI firmware`). Make sure to build this project on a machine with at least 4 cores, 4GB RAM, and 50GB disk space for reasonable (~30min) build time.
2018

2119
### Dependencies
2220
You must install build dependencies specific to the operating system you use AND install the Rust toolchain. You can also look at the [reproducible build configuration](.github/workflows/build.yml) of the continous integration (CI) system.
@@ -26,7 +24,7 @@ Dependencies for Ubuntu 22.04
2624
sudo apt update
2725
2826
# riscv-gnu-toolchain dependencies:
29-
sudo apt -qq -y install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
27+
sudo apt -qq -y install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev xz-utils
3028
3129
# OpenSBI
3230
sudo apt -qq -y install clang
@@ -81,7 +79,7 @@ MAKEFLAGS="--silent -j4" make
8179
```
8280

8381
#### Build individual components
84-
Alternativly, you can build individual components to avoid long builds that can lead to 'ssh disconnections', 'hangups', and similar issues.
82+
Alternativly, you can build individual components to avoid long builds that can lead to 'ssh disconnections', 'hangups', and similar issues.
8583

8684
Install all develoment tools required to compile code for the RISC-V architecture:
8785
```
@@ -124,20 +122,16 @@ You should see the output from the boot process and a promt to login to the hype
124122
# login: root, password: passwd
125123
```
126124

127-
To run the sample Linux OS as a confidential VM execute:
125+
To run the sample Linux OS as a confidential VM (login: root, password: passwd) execute:
128126
```
129127
./run_linux_vm.sh
130128
```
131129

132-
To run the sample `baremetal` as a confidential VM execute:
133-
```
134-
./run_baremetal.sh
135-
```
136-
137-
138130
# License
139131
This repository is distributed under the terms of the Apache 2.0 License, see [LICENSE](LICENSE).
140132

133+
**This is an active research project, without warranties of any kind.**
134+
141135
# Citation
142136
```
143137
@inproceedings{ozga2023riscvtee,

hypervisor/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dev:
6060

6161
rootfs: overlay
6262
echo "Generating hypervisor's root filesystem" ;\
63-
$(MAKE) -s -C $(BUILDROOT_SOURCE_DIR) RISCV=$(RISCV_GNU_TOOLCHAIN_WORK_DIR) PATH=$(PATH) O=$(BUILDROOT_WORK_DIR) rootfs-ext2
63+
$(MAKE) -s -C $(BUILDROOT_SOURCE_DIR) RISCV=$(RISCV_GNU_TOOLCHAIN_WORK_DIR) PATH=$(PATH) O=$(BUILDROOT_WORK_DIR) rootfs-ext2
6464

6565
clean:
6666
rm -rf $(HYPERVISOR_WORK_DIR)

hypervisor/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Hypervisor
2-
This code builds a Linux-based hypervisor (KVM+Qemu). The hypervisor is untrusted in our architecture.
2+
This code builds a Linux KVM hypervisor. The hypervisor is untrusted in our architecture.

hypervisor/configurations/qemu_riscv64_virt_defconfig

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ BR2_PACKAGE_QEMU_BLOBS=y
7373
# below not needed?
7474
BR2_TARGET_OPENSBI=y
7575
BR2_TARGET_OPENSBI_PLAT="generic"
76-
7776
#BR2_PACKAGE_DEVMEM2=y
7877

7978
###

0 commit comments

Comments
 (0)