x86_64: Fix build errors with direct feature

Make `cargo test --feauture=direct` pass by fixing build dependencies
and skipping a broken test case.

BUG=b:220292205
TEST=cargo build --features=direct in x86_64

Change-Id: I599ad5bc7ebb2fa91f6ff64291fb15ea129f8d05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3708381
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
Keiichi Watanabe 2022-06-16 23:25:07 +09:00 committed by Chromeos LUCI
parent c553d1c283
commit 2dcbb98677
3 changed files with 4 additions and 1 deletions

View file

@ -6,7 +6,7 @@ edition = "2021"
[features]
gdb = ["gdbstub_arch", "arch/gdb"]
direct = []
direct = ["arch/direct", "devices/direct"]
[dependencies]
arch = { path = "../arch" }

View file

@ -1903,6 +1903,7 @@ mod tests {
#[test]
#[cfg(feature = "direct")]
#[ignore] // TODO(b/236253615): Fix and re-enable this test.
fn end_addr_before_32bits() {
setup();
// On volteer, type16 (coreboot) region is at 0x00000000769f3000-0x0000000076ffffff.

View file

@ -210,6 +210,8 @@ where
.try_clone()
.expect("unable to clone exit_evt_wrtube"),
Default::default(),
#[cfg(feature = "direct")]
&[], // direct_gpe
&mut irq_chip,
X86_64_SCI_IRQ,
(&None, None),