riscv64: fix build error from RunnableLinuxVm change

suspend_evt field in RunnableLinuxVm was changed and a riscv user of it
was not yet updated.

TEST=Android build with riscv64
TEST=lunch riscv64-trunk_stable-userdebug && m libriscv
BUG=b:349612065
Change-Id: I0881ca59d408856ea6105b9389a21f2e9c60ce72

Change-Id: I0d9092abfa8c1d33582fa5618b596e0eb1cb6a01
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5661556
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Devin Moore <devinmoore@google.com>
Commit-Queue: Devin Moore <devinmoore@google.com>
This commit is contained in:
Devin Moore 2024-06-26 21:00:46 +00:00 committed by crosvm LUCI
parent b5dc71456a
commit 650b0ec732

View file

@ -21,6 +21,7 @@ use arch::VmComponents;
use arch::VmImage;
use base::Event;
use base::SendTube;
use base::Tube;
use devices::serial_device::SerialHardware;
use devices::serial_device::SerialParameters;
use devices::Bus;
@ -295,7 +296,7 @@ impl arch::LinuxArch for Riscv64 {
}
// Event used by PMDevice to notify crosvm that guest OS is trying to suspend.
let suspend_evt = Event::new().map_err(Error::CreateEvent)?;
let (suspend_tube_send, suspend_tube_recv) = Tube::directional_pair().unwrap();
// separate out image loading from other setup to get a specific error for
// image loading
@ -417,7 +418,7 @@ impl arch::LinuxArch for Riscv64 {
hotplug_bus: BTreeMap::new(),
rt_cpus: components.rt_cpus,
delay_rt: components.delay_rt,
suspend_evt,
suspend_tube: (Arc::new(Mutex::new(suspend_tube_send)), suspend_tube_recv),
bat_control: None,
#[cfg(feature = "gdb")]
gdb: components.gdb,