summary refs log tree commit diff
path: root/devices/src/acpi.rs
Commit message (Collapse)AuthorAge
* acpi: refactor the ACPI PM deviceChuanxiao Dong2020-05-11
| | | | | | | | | | | | | | | | | | Add the AML support to generate the S1 table instead of hard coding. Also use the IO allocater to allocate the IO resouce for ACPI PM. BUG=None TEST=boot crosvm by command "crosvm run -s crosvm.sock -m 4096 --cpus 4 --rwdisk rootfs.img -p "root=/dev/vda rootfstype=ext4" vmlinux". Check the S1 capability by "#echo standby > /sys/power/state" from guest side. Linux guest is suspended. And resume linux guest by "#crosvm resume crosvm.sock" from host side. Change-Id: I75b484c44db05f98d49557ba694a1531b57871c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2119571 Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Chuanxiao Dong <chuanxiao.dong@intel.corp-partner.google.com>
* x86_64: generate ACPI tablesChuanxiao Dong2020-02-28
| | | | | | | | | | | | | | | | | | | | | | | | Add acpi_rsdp_addr in boot_params to allow crosvm to pass a physicall address of RSDP to the Linux guest kernel, so that the linux guest kernel can parse the constructed ACPI tables and enable the ACPI. Although there is ACPI tables but as we still have "acpi=off" in command line parameter, there is still no ACPI in guest kernel. The ACPI construction refers to the implementation of the Cloud-hypervisor commit: - arch: x86_64: Generate basic ACPI tables BUG=chromium:1018674 TEST=None Change-Id: Ibcb2ae98c43da8ef8c07a07eda9213f61570d14c Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2035351 Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Tomasz Jeznach <tjeznach@chromium.org>
* acpipm: implement suspend and resume mechanismChuanxiao Dong2020-02-19
| | | | | | | | | | | | | | | | | | | For suspend request from VM, will write suspend event and notify crosvm main process to pause VCPUs. For resume request, it is not from VM itself but by the resume command through crosvm socket. Resume request will notify the PM device to fill its wakeup registers with wakeup event so that when VCPUs start to run, VM can know there is wakeup from outside. BUG=chromium:1018674 TEST=cargo test -p devices Change-Id: I4724ffee10150065a62bf520076c16cbc70b7749 Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2035169 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org>
* devices: add acpi device emulation code in devicesChuanxiao Dong2020-02-17
Add ACPI PM resource emulation code in devices, so that it can support the ACPI PM requestion from guest OS. BUG=chromium:1018674 TEST=cargo test -p devices Change-Id: I7b82b1c3a6f609136e493b55420b947afd1d5cfc Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2035168 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org>