From: Stefan Hajnoczi <stefanha@gmail.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, ehabkost@redhat.com,
Xiao Guangrong <guangrong.xiao@gmail.com>,
Dan Williams <dan.j.williams@intel.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4 1/3] hostmem-file: add "align" option
Date: Wed, 13 Dec 2017 11:14:24 +0000 [thread overview]
Message-ID: <20171213111424.GH16782@stefanha-x1.localdomain> (raw)
In-Reply-To: <20171211072806.2812-2-haozhong.zhang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
On Mon, Dec 11, 2017 at 03:28:04PM +0800, Haozhong Zhang wrote:
> 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>
> ---
> backends/hostmem-file.c | 41 ++++++++++++++++++++++++++++++++++++++++-
> docs/nvdimm.txt | 16 ++++++++++++++++
> exec.c | 8 +++++++-
> include/exec/memory.h | 3 +++
> memory.c | 2 ++
> numa.c | 2 +-
> qemu-options.hx | 9 ++++++++-
> 7 files changed, 77 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-12-13 11:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 7:28 [Qemu-devel] [PATCH for-2.12 v4 0/3] nvdimm: fixes for (non-)dax backends Haozhong Zhang
2017-12-11 7:28 ` [Qemu-devel] [PATCH v4 1/3] hostmem-file: add "align" option Haozhong Zhang
2017-12-13 11:14 ` Stefan Hajnoczi [this message]
2017-12-11 7:28 ` [Qemu-devel] [PATCH v4 2/3] nvdimm: add a macro for property "label-size" Haozhong Zhang
2017-12-11 7:28 ` [Qemu-devel] [PATCH v4 3/3] nvdimm: add 'unarmed' option Haozhong Zhang
2017-12-13 11:15 ` Stefan Hajnoczi
2017-12-13 11:16 ` [Qemu-devel] [PATCH for-2.12 v4 0/3] nvdimm: fixes for (non-)dax backends Stefan Hajnoczi
2017-12-20 17:28 ` Michael S. Tsirkin
2018-01-09 20:10 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171213111424.GH16782@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=crosthwaite.peter@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=ehabkost@redhat.com \
--cc=guangrong.xiao@gmail.com \
--cc=haozhong.zhang@intel.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).