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

Support for CoVE's Deployment Model 3 #4

Open
wants to merge 14 commits into
base: cove-integration
Choose a base branch
from

Conversation

wojciechozga
Copy link

This patchset introduces support for Deployment Model 3 of the RISC-V CoVE specification.

Subsequent patches add support for different deployment models and new CoVE features introduced in the CoVE spec version 0.6 and 0.7. Specifically, we support deployment models where (1) host runs in the HS mode, (2) TEE security monitor (TSM) does not support RISC-V AIA or dynamic allocation of confidential pages, (3) TVM is created in a single-step via promotion, (4) TVM requires local attestation via TVM attestation payload (TAP).

Please review the changes, and let me know if there are any questions or concerns.

Utilize the correct NACL features by testing whether a feature required
for NACL exploitation in nested virtualized environments is present. If
nested virtualization is not present, use the NACL setup_shared_memory()
ABIi. Otherwise, use the entire NACL ABI.

Signed-off-by: Wojciech Ozga <[email protected]>
Detect AIA presence by discovering that the TEE security monitor (TSM)
supports AIA capability. If AIA is not present, inject external
interrupts using the HVIP register when resuming execution of a virtual
processor via the COVH tvm_vcpu_run() call.

Signed-off-by: Wojciech Ozga <[email protected]>
Separate the TVM's init and finalized states to allow alternative ways
of creating TVMs in future. These alternative TVM creation procedures
require different behaviour during CoVE VM initialization, finalization
and termination.

Signed-off-by: Wojciech Ozga <[email protected]>
Specialize the current TVM creation procedure as a multi-step TVM
creation to differentiate from other ways of creating TVMs.

Signed-off-by: Wojciech Ozga <[email protected]>
Support new type of CoVE VM that can be created in a single step.
Preload VM pages into memory when creating the boot vcpu and request
promotion when running the boot vcpu for the first time.

Signed-off-by: Wojciech Ozga <[email protected]>
This patch is still under review and won’t be merged in this cycle.

Signed-off-by: Wojciech Ozga <[email protected]>
Support the alternative way of creating TVM by letting the VM to decide
when it should be promoted to TVM. The VM uses COVH promote_to_tvm()
ABI at the time it wants to become TVM. Reflect this call and the VM
architectural state to the TSM.

This is an experimental feature, thus the patch is not targeted yet for
merge.

Signed-off-by: Wojciech Ozga <[email protected]>
Support sharing pages with a hypervisor in an environment where dynamic page
conversion is not supported. When a single share_memory_region() call for a
memory region that contains multiple 4KiB pages fails, execute multiple 4KiB
share_memory_region() calls until the request is completed.

Signed-off-by: Wojciech Ozga <[email protected]>
Allocate a placeholder in the kernel memory, so that the TVM image
creator can embed there the TVM attestation payload (TAP).

Signed-off-by: Wojciech Ozga <[email protected]>
Request isolation from the hypervisor early in the kernel boot process
only if the kernel was built with the CONFIG_RISCV_COVE_GUEST_PROMOTE
build parameter.

Signed-off-by: Wojciech Ozga <[email protected]>
Retrieve the TVM attestation payload (TAP) address passed by the VMM
and reflect it to TEE security monitor (TSM) during the creation of
the TEE virtual machine (TVM) via the promote call.

Signed-off-by: Wojciech Ozga <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant