aarch64: Enable default build option

We have been building Cloud Hypervisor with command like:
`cargo build --no-default-features --features ...`.

After implementing ACPI, we donot have to use specify all features
explicitly. Default build command `cargo build` can work.

This commit fixed some build warnings with default build option and
changed github workflow correspondingly.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao 2021-06-24 10:49:04 +08:00 committed by Rob Bradford
parent 45c4d1a06e
commit 3613b4c096
3 changed files with 27 additions and 1 deletions

View File

@ -31,9 +31,31 @@ jobs:
components: rustfmt, clippy
- name: Formatting (rustfmt)
run: cargo fmt -- --check
- name: Clippy (kvm)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: clippy
args: --target=${{ matrix.target }} --no-default-features --features "kvm" -- -D warnings
- name: Clippy (kvm,acpi)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: clippy
args: --target=${{ matrix.target }} --no-default-features --features "kvm,acpi" -- -D warnings
- name: Clippy (all features,kvm)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: clippy
args: --target=${{ matrix.target }} --no-default-features --features "common,kvm" -- -D warnings
- name: Clippy (default)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: clippy
args: --target=${{ matrix.target }} -- -D warnings

View File

@ -173,6 +173,7 @@ struct Ioapic {
}
#[cfg(all(target_arch = "aarch64", feature = "acpi"))]
#[allow(dead_code)]
#[repr(packed)]
struct GicC {
pub r#type: u8,
@ -196,6 +197,7 @@ struct GicC {
}
#[cfg(all(target_arch = "aarch64", feature = "acpi"))]
#[allow(dead_code)]
#[repr(packed)]
struct GicD {
pub r#type: u8,
@ -209,6 +211,7 @@ struct GicD {
}
#[cfg(all(target_arch = "aarch64", feature = "acpi"))]
#[allow(dead_code)]
#[repr(packed)]
struct GicR {
pub r#type: u8,
@ -219,6 +222,7 @@ struct GicR {
}
#[cfg(all(target_arch = "aarch64", feature = "acpi"))]
#[allow(dead_code)]
#[repr(packed)]
struct GicIts {
pub r#type: u8,

View File

@ -97,7 +97,7 @@ use vm_memory::guest_memory::FileOffset;
#[cfg(feature = "kvm")]
use vm_memory::GuestMemoryRegion;
use vm_memory::{Address, GuestAddress, GuestUsize, MmapRegion};
#[cfg(feature = "cmos")]
#[cfg(all(target_arch = "x86_64", feature = "cmos"))]
use vm_memory::{GuestAddressSpace, GuestMemory};
use vm_migration::{
Migratable, MigratableError, Pausable, Snapshot, SnapshotDataSection, Snapshottable,