Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

TDX: add dbs-tdx crate #262

Merged
merged 5 commits into from
Jul 9, 2023
Merged

Conversation

studychao
Copy link
Member

We will first add tdx-ioctls for dbs-tdx.

Signed-off-by: fengshifang [email protected]
Signed-off-by: Chao Wu [email protected]

@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Merging #262 (b0cd5da) into main (1a2e876) will decrease coverage by 1.17%.
The diff coverage is 78.89%.

@@            Coverage Diff             @@
##             main     #262      +/-   ##
==========================================
- Coverage   91.59%   90.42%   -1.17%     
==========================================
  Files          80       82       +2     
  Lines       22405    24596    +2191     
==========================================
+ Hits        20521    22240    +1719     
- Misses       1884     2356     +472     
Flag Coverage Δ
dbs-address-space 95.30% <99.46%> (+0.24%) ⬆️
dbs-allocator 94.98% <ø> (ø)
dbs-arch 96.37% <100.00%> (ø)
dbs-boot 94.90% <ø> (ø)
dbs-device 92.95% <ø> (ø)
dbs-interrupt 90.42% <ø> (ø)
dbs-legacy-devices 92.77% <ø> (ø)
dbs-miniball ∅ <ø> (?)
dbs-upcall 94.31% <ø> (ø)
dbs-utils 91.25% <ø> (ø)
dbs-virtio-devices 87.31% <77.02%> (-1.88%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/dbs-address-space/src/lib.rs 100.00% <ø> (ø)
crates/dbs-upcall/src/lib.rs 97.92% <ø> (ø)
crates/dbs-virtio-devices/src/fs/device.rs 69.84% <ø> (ø)
crates/dbs-virtio-devices/src/lib.rs 95.30% <ø> (ø)
crates/dbs-virtio-devices/src/net.rs 85.71% <0.00%> (-0.86%) ⬇️
crates/dbs-virtio-devices/src/vsock/device.rs 79.49% <0.00%> (-3.48%) ⬇️
...s/dbs-virtio-devices/src/vsock/muxer/muxer_impl.rs 91.92% <66.66%> (-0.10%) ⬇️
crates/dbs-virtio-devices/src/mem.rs 76.34% <76.34%> (ø)
crates/dbs-virtio-devices/src/balloon.rs 80.79% <80.79%> (ø)
crates/dbs-address-space/src/region.rs 90.13% <94.44%> (+0.21%) ⬆️
... and 4 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

We will first add tdx-ioctls for dbs-tdx.

Signed-off-by: fengshifang <[email protected]>
Signed-off-by: Chao Wu <[email protected]>
//
// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
//
#![allow(missing_docs)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

}

/// Initialize TDX vcpu
pub fn tdx_init_vcpu(vcpu_fd: &RawFd, hob_address: u64) -> std::result::Result<(), TdxIoctlError> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use std::result::Result;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

#[repr(C)]
#[derive(Default)]
/// Tdx capabilities.
pub struct TdxCapabilities {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add documention for struct TdxCapabilities

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

@NK-fengsf
Copy link
Contributor

This crate may be used temporarily,the related function may be implemented in rust-vmm/kvm-ioctls after tdx is supported in upstream guest kernel.

Since we add document to all pub elements, we could remove allow missing
doc now.

Signed-off-by: Chao Wu <[email protected]>
@studychao studychao merged commit 7cb8457 into openanolis:main Jul 9, 2023
25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants