devices: enable debugcon on windows

new_with_pipe is not implemented yet.

BUG=b:213149155
TEST=presubmit

Change-Id: I1062bc964e6204088660fd1a04bbce09a77e293d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3760144
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Vikram Auradkar 2022-07-13 01:08:31 +00:00 committed by Chromeos LUCI
parent f59a7fb1e9
commit 8bcd18bdeb
2 changed files with 17 additions and 4 deletions

View file

@ -4,6 +4,8 @@
use std::io::{self, Write};
#[cfg(windows)]
use base::named_pipes;
use base::{error, Event, FileSync, RawDescriptor, Result};
use hypervisor::ProtectionType;
@ -29,6 +31,17 @@ impl SerialDevice for Debugcon {
) -> Debugcon {
Debugcon { out }
}
#[cfg(windows)]
fn new_with_pipe(
_protected_vm: ProtectionType,
_interrupt_evt: Event,
_pipe_in: named_pipes::PipeConnection,
_pipe_out: named_pipes::PipeConnection,
_keep_rds: Vec<RawDescriptor>,
) -> Debugcon {
unimplemented!("new_with_pipe unimplemented for Debugcon");
}
}
impl BusDevice for Debugcon {

View file

@ -8,6 +8,8 @@
mod bus;
mod cmos;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod debugcon;
#[cfg(feature = "direct")]
pub mod direct_io;
#[cfg(feature = "direct")]
@ -42,6 +44,8 @@ pub use self::bus::{
HostHotPlugKey, HotPlugBus,
};
pub use self::cmos::Cmos;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use self::debugcon::Debugcon;
#[cfg(feature = "direct")]
pub use self::direct_io::{DirectIo, DirectMmio};
#[cfg(feature = "direct")]
@ -67,8 +71,6 @@ pub use self::vtpm_proxy::VtpmProxy;
cfg_if::cfg_if! {
if #[cfg(unix)] {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod debugcon;
mod platform;
mod proxy;
pub mod acpi;
@ -82,8 +84,6 @@ cfg_if::cfg_if! {
pub use self::acpi::ACPIPMResource;
pub use self::bat::{BatteryError, GoldfishBattery};
pub use self::bus::Error as BusError;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub use self::debugcon::Debugcon;
#[cfg(feature = "audio")]
pub use self::pci::{Ac97Backend, Ac97Dev, Ac97Parameters};
pub use self::pci::{ PciBus,