mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-12-24 22:22:29 +00:00
mmio_hint in mem.c can potentially be accessed concurrently in emulate_mem() because it only holds a read lock. Use a local variable to make sure the same entry address is used throughout the function. Since it only serves as a hint, it's okay if the function does not use the most up-to-date version of mmio_hint, as long as mmio_hint is accessed atomically. Explicitly enforce natural alignment on mmio_hint to guarantee atomic accesses on x86 and increase code portability, even though compilers most likely always do it. Entries in the RB tree are only removed in unregister_mem_int() while holding a write lock, so accessing mmio_hint while holding a read lock is safe. Tracked-On: #2902 Signed-off-by: Peter Fang <peter.fang@intel.com> Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
ACRN Device Model ################# Introduction ============ The ACRN Device Model provides **device sharing** capabilities between the Service OS and Guest OSs. It is a component that is used in conjunction with the `ACRN Hypervisor`_ and this is installed within the Service OS. You can find out more about Project ACRN on the `Project ACRN documentation`_ website. .. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor .. _`Project ACRN documentation`: https://projectacrn.github.io/