crosvm/aarch64
Masami Hiramatsu c80de3af0e aarch64: Fix Goldfish battery to send IRQ correctly
Since the virtio allocates all available IRQ lines for VGIC,
system_allocator::allocate_irq() returns 32 for Goldfish battery,
but that is not handled by the VGIC. In the result, the interrupts
from Goldfish Battery device are dropped in the host kernel. Thus
even if the crosvm detects the AC unplug, it is not notified to
the guest.

To fix this issue, assign a static IRQ number (#3) to Goldfish
battery device as same as other devices, so that it can deriver the
interrupts correctly to the guest side via VGIC.

BUG=b:252582345
TEST=Boot the ARCVM and run 'dumpsys battery' and unplug/re-plug
  AC connector several times, and confirm the AC status is updated.

Change-Id: Icdf3713cdf615d0039dd4e7719b80cad32333094
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3971137
Reviewed-by: Masami Hiramatsu <mhiramat@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Masami Hiramatsu <mhiramat@google.com>
2022-10-25 01:02:33 +00:00
..
src aarch64: Fix Goldfish battery to send IRQ correctly 2022-10-25 01:02:33 +00:00
.build_test_skip
Cargo.toml arch: split fdt code into its own crate 2022-10-19 17:43:19 +00:00