diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 01fccae83..207df7c04 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -56,6 +56,20 @@ jobs: command: clippy args: --target=${{ matrix.target }} --locked --all --all-targets --no-default-features --tests --examples --features "kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states + - name: Clippy (mshv) + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} + command: clippy + args: --target=${{ matrix.target }} --locked --all --all-targets --no-default-features --tests --examples --features "mshv" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states + + - name: Clippy (mshv + kvm) + uses: actions-rs/cargo@v1 + with: + use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} + command: clippy + args: --target=${{ matrix.target }} --locked --all --all-targets --no-default-features --tests --examples --features "mshv,kvm" -- -D warnings -D clippy::undocumented_unsafe_blocks -W clippy::assertions_on_result_states + - name: Clippy (default features) uses: actions-rs/cargo@v1 with: diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs index 6600fefcc..af383e3f3 100644 --- a/hypervisor/src/lib.rs +++ b/hypervisor/src/lib.rs @@ -36,7 +36,7 @@ pub mod arch; pub mod kvm; /// Microsoft Hypervisor implementation module -#[cfg(all(feature = "mshv", target_arch = "x86_64"))] +#[cfg(feature = "mshv")] pub mod mshv; /// Hypervisor related module @@ -148,7 +148,7 @@ pub const USER_MEMORY_REGION_ADJUSTABLE: u32 = 1 << 4; pub enum MpState { #[cfg(feature = "kvm")] Kvm(kvm_bindings::kvm_mp_state), - #[cfg(all(feature = "mshv", target_arch = "x86_64"))] + #[cfg(feature = "mshv")] Mshv, /* MSHV does not support MpState yet */ }