mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
256be3a144
Add a new command "battery" which is used to modify the virtual battery/ac status. When there is goldfish battery device model created, the command is able to sent to the goldfish battery monitoring thread. If no, the command won't be sent. The supported commands are: 1. crosvm battery goldfish status <status string> crosvm.sock 2. crosvm battery goldfish health <health string> crosvm.sock 3. crosvm battery goldfish present <number> crosvm.sock 4. crosvm battery goldfish capacity <number> crosvm.sock 5. crosvm battery goldfish aconline <number> crosvm.sock "goldfish" is the battery identifier to specify which virtual battery is going to be modified by this command in case there are multiple virtual batteries in the guest in future. Right now only one goldfish battery is supported. BUG=chromium:1050432 BUG=b:137890633 TEST=create VM with parameter "--battery" or "--battery=type=goldfish" and boot linux guest with goldfish_battery driver enabled. From host side, execute command "#crosvm battery goldfish status discharging crosvm.sock" can make the guest receive an interrupt, and the status sysfs is changed to "Discharging". Also tested the other commands as well. TEST=modified values are visible in ARCVM and interrupts are triggered Change-Id: I82177811a6f2b1960f7895522760ff3b8143163f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2119574 Tested-by: Alex Lau <alexlau@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alex Lau <alexlau@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
23 lines
594 B
TOML
23 lines
594 B
TOML
[package]
|
|
name = "arch"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
|
|
[features]
|
|
gdb = ["gdbstub"]
|
|
|
|
[dependencies]
|
|
acpi_tables = { path = "../acpi_tables" }
|
|
devices = { path = "../devices" }
|
|
gdbstub = { version = "0.4.0", optional = true }
|
|
hypervisor = { path = "../hypervisor" }
|
|
kernel_cmdline = { path = "../kernel_cmdline" }
|
|
libc = "*"
|
|
minijail = "*"
|
|
msg_socket = { path = "../msg_socket" }
|
|
resources = { path = "../resources" }
|
|
sync = { path = "../sync" }
|
|
base = { path = "../base" }
|
|
vm_control = { path = "../vm_control" }
|
|
vm_memory = { path = "../vm_memory" }
|