mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
62e2e2e8de
Allow devices to be added to a Bus without a mutex. If a device implements BusDeviceSync and is inserted into the Bus via the new insert_sync function, the Bus will not lock the device before write and read operations. This feature will allow IrqChip implementations to use the mmio bus for APIC mmio, and allow each vcpu to write to their respective APICs simultaneously. This also changes the BusDevice trait so read and write functions take a new BusAccessInfo struct. The BusAccessInfo conveys the full address of the read/write operation, the offset of the address relative to the device start address, and an id that in practice will hold the vcpu id for the vcpu thread perforing the read/write. As a result, inserts into the Bus are no longer distinguished between full_addr and non full_addr inserts. Instead, each device's BusDevice implementation must decide whether they use the absolute read/write address or the relative read/write offset. BUG=chromium:1077058 TEST=ran build_test TEST=ran simple debian image Change-Id: I9125aaa69869c1004b6c6a099b50f5c58038d4ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2514662 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Colin Downs-Razouk <colindr@google.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |