mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
build: Remove "fwdebug" and "common" feature flags
This simplifes the buld and checks with very little overhead and the fwdebug device is I/O port device on 0x402 that can be used by edk2 as a very simple character device. See: #4679 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
36e26f004c
commit
b2d1dd65f3
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@ -36,8 +36,8 @@ jobs:
|
|||||||
- name: Build (default features)
|
- name: Build (default features)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor -- -D warnings
|
||||||
|
|
||||||
- name: Build (common + kvm)
|
- name: Build (kvm)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "common,kvm" -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "kvm" -- -D warnings
|
||||||
|
|
||||||
- name: Build (default features + tdx)
|
- name: Build (default features + tdx)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor --features "tdx" -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor --features "tdx" -- -D warnings
|
||||||
@ -48,11 +48,11 @@ jobs:
|
|||||||
- name: Build (default features + guest_debug)
|
- name: Build (default features + guest_debug)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor --features "guest_debug" -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor --features "guest_debug" -- -D warnings
|
||||||
|
|
||||||
- name: Build (common + mshv)
|
- name: Build (mshv)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "common,mshv" -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "mshv" -- -D warnings
|
||||||
|
|
||||||
- name: Build (common + mshv + kvm)
|
- name: Build (mshv + kvm)
|
||||||
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "common,mshv,kvm" -- -D warnings
|
run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "mshv,kvm" -- -D warnings
|
||||||
|
|
||||||
- name: Release Build (default features)
|
- name: Release Build (default features)
|
||||||
run: cargo build --locked --all --release --target=${{ matrix.target }}
|
run: cargo build --locked --all --release --target=${{ matrix.target }}
|
||||||
|
16
.github/workflows/quality.yaml
vendored
16
.github/workflows/quality.yaml
vendored
@ -48,12 +48,12 @@ jobs:
|
|||||||
- name: Formatting (rustfmt)
|
- name: Formatting (rustfmt)
|
||||||
run: cargo fmt -- --check
|
run: cargo fmt -- --check
|
||||||
|
|
||||||
- name: Clippy (common + kvm)
|
- name: Clippy (kvm)
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --locked --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings
|
args: --locked --all --all-targets --no-default-features --tests --features "kvm" -- -D warnings
|
||||||
|
|
||||||
- name: Clippy (default features)
|
- name: Clippy (default features)
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
@ -83,29 +83,29 @@ jobs:
|
|||||||
command: clippy
|
command: clippy
|
||||||
args: --locked --all --all-targets --tests --features "tracing" -- -D warnings
|
args: --locked --all --all-targets --tests --features "tracing" -- -D warnings
|
||||||
|
|
||||||
- name: Clippy (common + mshv)
|
- name: Clippy (mshv)
|
||||||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --locked --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings
|
args: --locked --all --all-targets --no-default-features --tests --features "mshv" -- -D warnings
|
||||||
|
|
||||||
- name: Clippy (common + mshv + kvm)
|
- name: Clippy (mshv + kvm)
|
||||||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --locked --all --all-targets --no-default-features --tests --features "common,mshv,kvm" -- -D warnings
|
args: --locked --all --all-targets --no-default-features --tests --features "mshv,kvm" -- -D warnings
|
||||||
|
|
||||||
- name: Clippy (common + kvm + tdx)
|
- name: Clippy (kvm + tdx)
|
||||||
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --locked --all --all-targets --no-default-features --tests --features "common,tdx,kvm" -- -D warnings
|
args: --locked --all --all-targets --no-default-features --tests --features "tdx,kvm" -- -D warnings
|
||||||
|
|
||||||
- name: Check build did not modify any files
|
- name: Check build did not modify any files
|
||||||
run: test -z "$(git status --porcelain)"
|
run: test -z "$(git status --porcelain)"
|
||||||
|
@ -54,10 +54,7 @@ test_infra = { path = "test_infra" }
|
|||||||
wait-timeout = "0.2.0"
|
wait-timeout = "0.2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["common", "kvm"]
|
default = ["kvm"]
|
||||||
# Common features for all hypervisors
|
|
||||||
common = ["fwdebug"]
|
|
||||||
fwdebug = ["vmm/fwdebug"]
|
|
||||||
gdb = ["vmm/gdb"]
|
gdb = ["vmm/gdb"]
|
||||||
guest_debug = ["vmm/guest_debug"]
|
guest_debug = ["vmm/guest_debug"]
|
||||||
kvm = ["vmm/kvm"]
|
kvm = ["vmm/kvm"]
|
||||||
|
@ -25,4 +25,3 @@ arch = { path = "../arch" }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
fwdebug = []
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
mod cmos;
|
mod cmos;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
mod debug_port;
|
mod debug_port;
|
||||||
#[cfg(feature = "fwdebug")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
mod fwdebug;
|
mod fwdebug;
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
mod gpio_pl061;
|
mod gpio_pl061;
|
||||||
@ -22,7 +22,7 @@ mod uart_pl011;
|
|||||||
pub use self::cmos::Cmos;
|
pub use self::cmos::Cmos;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
pub use self::debug_port::DebugPort;
|
pub use self::debug_port::DebugPort;
|
||||||
#[cfg(feature = "fwdebug")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
pub use self::fwdebug::FwDebugDevice;
|
pub use self::fwdebug::FwDebugDevice;
|
||||||
pub use self::i8042::I8042Device;
|
pub use self::i8042::I8042Device;
|
||||||
pub use self::serial::Serial;
|
pub use self::serial::Serial;
|
||||||
|
@ -6,7 +6,6 @@ edition = "2021"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
fwdebug = ["devices/fwdebug"]
|
|
||||||
gdb = ["kvm", "gdbstub", "gdbstub_arch"]
|
gdb = ["kvm", "gdbstub", "gdbstub_arch"]
|
||||||
guest_debug = ["kvm"]
|
guest_debug = ["kvm"]
|
||||||
kvm = ["hypervisor/kvm", "vfio-ioctls/kvm", "vm-device/kvm", "pci/kvm"]
|
kvm = ["hypervisor/kvm", "vfio-ioctls/kvm", "vm-device/kvm", "pci/kvm"]
|
||||||
|
@ -1560,9 +1560,7 @@ impl DeviceManager {
|
|||||||
.io_bus
|
.io_bus
|
||||||
.insert(cmos, 0x70, 0x2)
|
.insert(cmos, 0x70, 0x2)
|
||||||
.map_err(DeviceManagerError::BusError)?;
|
.map_err(DeviceManagerError::BusError)?;
|
||||||
}
|
|
||||||
#[cfg(feature = "fwdebug")]
|
|
||||||
{
|
|
||||||
let fwdebug = Arc::new(Mutex::new(devices::legacy::FwDebugDevice::new()));
|
let fwdebug = Arc::new(Mutex::new(devices::legacy::FwDebugDevice::new()));
|
||||||
|
|
||||||
self.bus_devices
|
self.bus_devices
|
||||||
|
Loading…
Reference in New Issue
Block a user