diff --git a/devices/src/debugcon.rs b/devices/src/debugcon.rs index 330ca37038..d9eb747060 100644 --- a/devices/src/debugcon.rs +++ b/devices/src/debugcon.rs @@ -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, + ) -> Debugcon { + unimplemented!("new_with_pipe unimplemented for Debugcon"); + } } impl BusDevice for Debugcon { diff --git a/devices/src/lib.rs b/devices/src/lib.rs index 77dd8128de..77bd1b9a0f 100644 --- a/devices/src/lib.rs +++ b/devices/src/lib.rs @@ -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,