acrn-hypervisor/devicemodel
Conghui Chen 6f482b8856 dm: virtio: add memory barrier before notify FE
Without memory barrier, the change of used ring index could not
immediately detected by FE, this would bring some problems.

For virtio-blk FE driver, when it receives an interrupt, and confirms the
used ring index has changed, it will first set ring flags with
VRING_AVAIL_F_NO_INTERRUPT, then get buffer from virtqueue, after
process this request, it will mask VRING_AVAIL_F_NO_INTERRUPT, and get
used ring index again before return. If used ring changes, it will
process it. At the same time, BE will read this flags before each notify,
if VRING_AVAIL_F_NO_INTERRUPT was set, BE will not inject interrupt.

Without memory barrier, before FE mask VRING_AVAIL_F_NO_INTERRUPT, BE
has finished notify without interrupt, then FE mask
VRING_AVAIL_F_NO_INTERRUPT, and get used ring index but failed (index
has changed from BE side). FE will return from interrupt handler
function, and wait for next interrupt which was not injected by BE. Thus,
this will cause kernel hung.

Tracked-On: #2732
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Wang Yu <yu1.wang@intel.com>
2019-03-12 14:15:10 +08:00
..
arch/x86 dm: use power button acpi device to find its input event 2019-03-07 20:23:48 +08:00
bios OVMF release v0.7 2019-03-01 20:23:22 +08:00
core [RevertMe] dm: pci: restore workaround when alloc pci mem64 bar 2019-03-05 15:14:24 +08:00
hw dm: virtio: add memory barrier before notify FE 2019-03-12 14:15:10 +08:00
include dm: add support of high MMIO mapping 2019-02-28 18:33:11 +08:00
lib dm: Fix some issues from string operations 2018-12-25 18:40:04 +08:00
samples DM: Add sample script to launch zephyr as guest 2019-03-12 09:59:06 +08:00
vmcfg tools: vmcfg: use defconfig instead of default values in Kconfig 2018-12-12 13:23:28 +08:00
MAINTAINERS
Makefile Makefile: undefine _FORTIFY_SOURCE prior using it 2019-02-28 11:56:45 +08:00
README.rst Documentation: clean-up of isolated README.rst files 2018-11-20 11:09:53 -08:00

README.rst

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/