acrn-hypervisor/hypervisor/include
Zhao Yakui 6b4ad0b449 HV: Add the volatile to avoid optimization for mmio_read/write access
If subsequent write is on the same address, maybe the compiler will optimize
the access of MMIO memory and only the last write takes effect.In such case
it is wrong. For example:
  mmio_write_long(0x25, addr);
  mmio_write_long(0x26, addr);
  mmio_write_long(0x27, addr);

After volatile is added, it can avoid the above possible optimization and
assure that each write takes effect.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-05-15 17:25:55 +08:00
..
arch/x86 HV: Add the volatile to avoid optimization for mmio_read/write access 2018-05-15 17:25:55 +08:00
common hypercall: bug fix on the address convertion while hypercall 2018-05-15 17:25:27 +08:00
debug Remove STATIC_ASSERT Macro and replace with standard _Static_assert 2018-05-15 17:19:38 +08:00
lib hv: remove spinlock_irq_obtain/spinlock_irq_release 2018-05-15 17:25:55 +08:00
public hv:add suffix(UL)for MACRO(SECURE_WORLD_ENABLED) 2018-05-15 17:25:26 +08:00
hv_debug.h initial import 2018-05-11 14:44:28 +08:00
hv_lib.h Move s[n]printf to lib for release 2018-05-15 17:19:37 +08:00
hypervisor.h initial import 2018-05-11 14:44:28 +08:00