qemu/backends
Haozhong Zhang 9837684316 hostmem-file: add "align" option
When mmap(2) the backend files, QEMU uses the host page size
(getpagesize(2)) by default as the alignment of mapping address.
However, some backends may require alignments different than the page
size. For example, mmap a device DAX (e.g., /dev/dax0.0) on Linux
kernel 4.13 to an address, which is 4K-aligned but not 2M-aligned,
fails with a kernel message like

[617494.969768] dax dax0.0: qemu-system-x86: dax_mmap: fail, unaligned vma (0x7fa37c579000 - 0x7fa43c579000, 0x1fffff)

Because there is no common approach to get such alignment requirement,
we add the 'align' option to 'memory-backend-file', so that users or
management utils, which have enough knowledge about the backend, can
specify a proper alignment via this option.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Message-Id: <20171211072806.2812-2-haozhong.zhang@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[ehabkost: fixed typo, fixed error_setg() format string]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-01-19 11:18:51 -02:00
..
cryptodev-builtin.c cryptodev: fix asserting single queue 2017-03-23 17:22:01 +08:00
cryptodev.c qom: Remove unused errp parameter from can_be_deleted() 2017-09-01 10:43:07 -03:00
hostmem-file.c hostmem-file: add "align" option 2018-01-19 11:18:51 -02:00
hostmem-ram.c memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() 2017-07-14 17:59:42 +01:00
hostmem.c QAPI patches for 2017-09-01 2017-09-04 13:28:09 +01:00
Makefile.objs char: move char devices to chardev/ 2017-06-02 11:33:53 +04:00
rng-egd.c char: add backend hotswap handler 2017-07-14 11:04:33 +02:00
rng-random.c rng-random: rename RndRandom to RngRandom 2016-05-23 12:18:43 +05:30
rng.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
tpm.c tpm: tpm_emulator: get and set buffer size of device 2017-12-14 23:39:15 -05:00