summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-06-12 10:12:32 +0000
committerAlyssa Ross <hi@alyssa.is>2020-07-02 12:33:06 +0000
commitca7331a0fcbf476f782014ff81d06ba5ca08e2a3 (patch)
tree3bbf1560626f74b0fc0b242a1a2bfcc50138d76d /src
parent544cb6bcda8654747e2de3d67c25182f3850ab2c (diff)
downloadcrosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar.gz
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar.bz2
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar.lz
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar.xz
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.tar.zst
crosvm-ca7331a0fcbf476f782014ff81d06ba5ca08e2a3.zip
debug
Diffstat (limited to 'src')
-rw-r--r--src/linux.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/linux.rs b/src/linux.rs
index 3ef323e..e9ee659 100644
--- a/src/linux.rs
+++ b/src/linux.rs
@@ -1826,6 +1826,12 @@ pub fn run_config(cfg: Config) -> Result<()> {
     let (wayland_host_socket, wayland_device_control_socket) =
         msg_socket::pair::<VmMemoryResponse, VmMemoryRequest>().map_err(Error::CreateSocket)?;
     control_sockets.push(TaggedControlSocket::VmMemory(wayland_host_socket));
+
+    eprintln!(
+        "Wayland control socket at index {}",
+        control_sockets.len() - 1
+    );
+
     // Balloon gets a special socket so balloon requests can be forwarded from the main process.
     let (balloon_host_socket, balloon_device_control_socket) =
         msg_socket::pair::<BalloonControlCommand, BalloonControlResult>()
@@ -2107,7 +2113,7 @@ fn run_control(
 
         let mut vm_control_indices_to_remove = Vec::new();
         for event in events.iter_readable() {
-            match event.token() {
+            match dbg!(event.token()) {
                 Token::Exit => {
                     info!("vcpu requested shutdown");
                     break 'poll;
@@ -2267,9 +2273,10 @@ fn run_control(
                     }
                 }
                 Token::VmControl { index } => {
+                    eprintln!("Received VM control message: {{ index: {:?} }}", index);
                     if let Some(socket) = control_sockets.get(index) {
                         match socket {
-                            TaggedControlSocket::Vm(socket) => match socket.recv() {
+                            TaggedControlSocket::Vm(socket) => match dbg!(socket.recv()) {
                                 Ok(request) => {
                                     let device_socket = request.socket(
                                         &balloon_host_socket,