qemu-e2k/include
Kevin Wolf 339064d506 block: Don't use guest sector size for qemu_blockalign()
bs->buffer_alignment is set by the device emulation and contains the
logical block size of the guest device. This isn't something that the
block layer should know, and even less something to use for determining
the right alignment of buffers to be used for the host.

The new BlockLimits field opt_mem_alignment tells the qemu block layer
the optimal alignment to be used so that no bounce buffer must be used
in the driver.

This patch may change the buffer alignment from 4k to 512 for all
callers that used qemu_blockalign() with the top-level image format
BlockDriverState. The value was never propagated to other levels in the
tree, so in particular raw-posix never required anything else than 512.

While on disks with 4k sectors direct I/O requires a 4k alignment,
memory may still be okay when aligned to 512 byte boundaries. This is
what must have happened in practice, because otherwise this would
already have failed earlier. Therefore I don't expect regressions even
with this intermediate state. Later, raw-posix can implement the hook
and expose a different memory alignment requirement.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-01-24 17:40:01 +01:00
..
block block: Don't use guest sector size for qemu_blockalign() 2014-01-24 17:40:01 +01:00
disas Add moxie disassembler 2013-03-23 14:25:41 +00:00
exec memory: syncronize kvm bitmap using bitmaps operations 2014-01-13 14:04:55 +01:00
fpu softfloat: Add support for ties-away rounding 2014-01-08 19:07:22 +00:00
hw Merge remote branch 'luiz/queue/qmp' into qmpq 2014-01-14 12:10:08 +10:00
migration migration: Move QEMU_VM_* defines to migration/migration.h 2014-01-13 12:39:48 +01:00
monitor readline: move readline to a generic location 2014-01-22 12:07:17 +01:00
net net: disallow to specify multicast MAC address 2013-11-08 17:32:34 +01:00
qapi qdict: Add qdict_array_split() 2014-01-22 12:07:17 +01:00
qemu qemu-option: Add qemu_config_parse_qdict() 2014-01-22 12:07:17 +01:00
qom qom: Do not register interface "types" in the type table and fix names 2013-12-24 17:27:17 +01:00
sysemu device_tree: qemu_fdt_setprop: Rename val_array arg 2013-12-20 01:58:12 +01:00
ui include: add missing config-host.h include 2013-12-16 10:12:20 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h tcg-s390: Use qemu_getauxval in query_facilities 2013-11-30 07:45:30 +13:00
glib-compat.h glib: add a compatibility interface for g_timeout_add_seconds 2013-03-25 13:10:40 -05:00
qemu-common.h qmp: add interface blockdev-snapshot-delete-internal-sync 2013-09-12 10:12:47 +02:00
qemu-io.h qemu-io: add command completion 2014-01-22 12:07:17 +01:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00