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

Fix build error of feature vmcall-vsock and add action in CI #288

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
- name: Build MigTD binary with a default production migration policy(virtio-serial)
run: cargo image --no-default-features --features main,stack-guard,virtio-serial

- name: Build MigTD binary with a default production migration policy(vmcall-vsock)
run: cargo image --no-default-features --features main,stack-guard,vmcall-vsock

- name: Build MigTD binary with feature `test_disable_ra_and_accept_all`
run: cargo image --features test_disable_ra_and_accept_all

Expand Down
3 changes: 2 additions & 1 deletion src/devices/vsock/src/transport/vmcall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
use alloc::boxed::Box;
use alloc::collections::BTreeMap;
use alloc::vec::Vec;
use core::arch::asm;

Check warning on line 19 in src/devices/vsock/src/transport/vmcall.rs

View workflow job for this annotation

GitHub Actions / Build final migtd - release

unused import: `core::arch::asm`
use core::convert::TryInto;
use core::sync::atomic::{AtomicBool, Ordering};
use td_payload::{eoi, interrupt_handler_template};

Check warning on line 22 in src/devices/vsock/src/transport/vmcall.rs

View workflow job for this annotation

GitHub Actions / Build final migtd - release

unused import: `eoi`
use td_shim_interface::td_uefi_pi::pi::guid;
use tdx_tdcall::tdx;

Expand Down Expand Up @@ -101,7 +101,8 @@
header.extend_from_slice(&pkt[..HEADER_LEN]);

// Parse the data length from the packet header and copy it out from DMA buffer
let packet_hdr = Packet::new_checked(&header[..]);
let packet_hdr = Packet::new_checked(&header[..])
.map_err(|_| VsockTransportError::InvalidVsockPacket)?;
let data_len = packet_hdr.data_len();
if data_len != 0 {
if data_len as usize > pkt.len() - HEADER_LEN {
Expand Down
Loading