Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] cc rebase #1310

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
17037a2
cc: start of CC(Confidential Computing) support
123abcpp May 23, 2024
d26ec53
cc: update makefile for cc
123abcpp May 23, 2024
68ecdcd
cc: add config file field CCMode
123abcpp May 23, 2024
5cfb079
cc: memory isolation implementation
123abcpp May 24, 2024
e4a73cf
cc: update initialization flow for qvisor and qkernel
123abcpp May 24, 2024
76c9149
cc: hcall update
123abcpp May 27, 2024
01c6e28
cc: copy executable into private memory
123abcpp May 28, 2024
99d0c45
cc: Add sharestring struct
123abcpp May 28, 2024
48bc685
cc: move PAGE_MGR to guest private memory
123abcpp May 29, 2024
be755a1
cc: copy data from private to shared for ucalls
123abcpp May 29, 2024
9d9fa18
cc: avoid vcpu's task queue allocate memory at runtime
123abcpp May 29, 2024
ea82841
cc: avoid uring dynamic allocation
123abcpp May 29, 2024
931db1b
cc: handling the completed ucall request on guest
123abcpp May 29, 2024
2917893
cc: use shared allocator for DataBuff
123abcpp May 29, 2024
fa06cae
cc: refactor aucall
123abcpp May 29, 2024
0f2adb9
cc: use Ucall insteand of SignalHandler
123abcpp May 31, 2024
375f662
cc: task refactor
123abcpp May 31, 2024
e22bf6c
cc: move Kernel to private memory when cc enabled
123abcpp May 31, 2024
7b2abf5
cc: disable rdma, tsot, hibernate when cc enabled
123abcpp May 31, 2024
acd9508
cc: move timer related struct into shared memory
123abcpp Jun 1, 2024
4800736
cc: move SocketBuff into shared memory
123abcpp Jun 4, 2024
f810288
cc: move host epoll related struct into shared memory
123abcpp Jun 4, 2024
e123fc2
cc: add unidentical mapping
123abcpp Jun 3, 2024
e763c76
cc: fix task_exit deadlock when cc is enabled
123abcpp Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"Sandboxed" : false,
"Realtime" : false,
"EnableIOBuf" : false,
"EnableTsot" : false
"EnableTsot" : false,
"CCMode" : "None"
}
18 changes: 18 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ all:: release debug

cuda_all:: cuda_release cuda_debug

cc_all:: cc_release cc_debug

release:: qvisor_release qkernel_release $(VDSO)

debug:: qvisor_debug qkernel_debug $(VDSO)
Expand Down Expand Up @@ -70,6 +72,22 @@ qvisor_cuda_release:
qvisor_cuda_debug:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) cuda_debug

cc_release:: qvisor_cc_release qkernel_cc_release $(VDSO)

cc_debug:: qvisor_cc_debug qkernel_cc_debug $(VDSO)

qkernel_cc_release:
make -C ./qkernel TOOLCHAIN=$(RUST_TOOLCHAIN) cc_release

qkernel_cc_debug:
make -C ./qkernel TOOLCHAIN=$(RUST_TOOLCHAIN) cc_debug

qvisor_cc_release:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) cc_release

qvisor_cc_debug:
make -C ./qvisor TOOLCHAIN=$(RUST_TOOLCHAIN) cc_debug

install:
-sudo cp -f $(QKERNEL_RELEASE) $(QBIN_DIR)/
-sudo cp -f $(QUARK_RELEASE) $(QBIN_DIR)/quark
Expand Down
3 changes: 3 additions & 0 deletions qkernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ hashbrown = "0.12.3"
enum_dispatch = { git = "https://github.com/QuarkContainer/enum_dispatch_clone.git" }
log = { version = "0.4", features = ["max_level_trace", "release_max_level_trace"] }

[features]
cc = []

[target.'cfg(target_arch = "x86_64")'.dependencies]
x86_64 = "0.14.7"

Expand Down
20 changes: 20 additions & 0 deletions qkernel/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
arch = $(shell uname -m)
kernel := ../build/qkernel.bin
cc_kernel = ../build/qkernel_cc.bin
kernel_debug := ../build/qkernel_d.bin
cc_kernel_debug := ../build/qkernel_d_cc.bin
target ?= $(arch)-qkernel
qkernel := ../target/$(target)/release/libqkernel.a
qkernel_debug := ../target/$(target)/debug/libqkernel.a
Expand All @@ -16,6 +18,10 @@ release: $(kernel)

debug: $(kernel_debug)

cc_release: $(cc_kernel)

cc_debug: $(cc_kernel_debug)

$(kernel): kernel $(assembly_object_files)
@ld --gc-sections -T $(linker_script) -o $(kernel) \
$(assembly_object_files) $(qkernel)
Expand All @@ -24,12 +30,26 @@ $(kernel_debug): kernel_debug $(assembly_object_files)
@ld --gc-sections -T $(linker_script) -o $(kernel_debug) \
$(assembly_object_files) $(qkernel_debug)

$(cc_kernel): cc_kernel $(assembly_object_files)
@ld -n --gc-sections -T $(linker_script) -o $(kernel) \
$(assembly_object_files) $(qkernel)

$(cc_kernel_debug): cc_kernel_debug $(assembly_object_files)
@ld -n --gc-sections -T $(linker_script) -o $(kernel_debug) \
$(assembly_object_files) $(qkernel_debug)

kernel:
CARGO_TARGET_DIR=../target cargo +$(TOOLCHAIN) build --target $(arch)-qkernel.json --release

kernel_debug:
CARGO_TARGET_DIR=../target cargo +$(TOOLCHAIN) build --target $(arch)-qkernel.json

cc_kernel:
CARGO_TARGET_DIR=../target cargo +$(TOOLCHAIN) build --target $(arch)-qkernel.json --release --features cc

cc_kernel_debug:
CARGO_TARGET_DIR=../target cargo +$(TOOLCHAIN) build --target $(arch)-qkernel.json --features cc

../build/arch/$(arch)/%.o: src/qlib/kernel/arch/$(arch)/%.s
@mkdir -p $(shell dirname $@)
$(AS) $^ -o $@
Expand Down
Loading