crosvm/base
Alexandre Courbot 96c3a79138 virtio: vhost: user: use volatile access to memory-mapped registers
We recently started to map VVU device registers into the process address
space, but accessed them like regular memory. This is dangerous as the
compiler can reorder and optimize these accesses.

Add new `write_obj_volatile` and `read_obj_volatile` ops to
`MemoryMapping` that are designed to perform such I/O accesses and use
them where appropriate.

BUG=b:238282334
BUG=b:237647217
TEST=VVU console device can be created from Linux.

Change-Id: I40f30acfd358248d4f9d0c00d5cd708eabae047d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762971
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-07-16 01:25:47 +00:00
..
base_event_token_derive base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
src virtio: vhost: user: use volatile access to memory-mapped registers 2022-07-16 01:25:47 +00:00
.build_test_serial Refactoring: Move common/base into base 2022-03-17 00:01:27 +00:00
Cargo.toml Cargo: bump all rand dependencies to 0.8 2022-06-30 23:22:37 +00:00