From: Stefan Hajnoczi <stefanha@gmail.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>,
Richard Henderson <rth@twiddle.net>,
Xiao Guangrong <guangrong.xiao@linux.intel.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment
Date: Tue, 30 May 2017 10:16:24 +0100 [thread overview]
Message-ID: <20170530091624.GE11362@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170526022438.17478-2-haozhong.zhang@intel.com>
[-- Attachment #1: Type: text/plain, Size: 752 bytes --]
On Fri, May 26, 2017 at 10:24:38AM +0800, Haozhong Zhang wrote:
> file_ram_alloc() currently maps the backend file via mmap to a virtual
> address aligned to the value returned by qemu_fd_getpagesize(). When a
> DAX device (e.g. /dev/dax0.0) is used as the backend file, its kernel
> mmap implementation may require an alignment larger than what
> qemu_fd_get_pagesize() returns (e.g. 2MB vs. 4KB), and mmap may fail.
>
> This commit adds an attribute 'align' to hostmem-file, so that users
> can specify a proper alignment that satisfies the kernel requirement.
>
> If 'align' is not specified or is 0, the value returned by
> qemu_fd_get_pagesize() will be used as before.
How are users supposed to determine alignment requirements?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-05-30 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 2:24 [Qemu-devel] [PATCH 1/2] nvdimm: warn if the backend is not a DAX device Haozhong Zhang
2017-05-26 2:24 ` [Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment Haozhong Zhang
2017-05-30 9:16 ` Stefan Hajnoczi [this message]
2017-05-31 6:24 ` Haozhong Zhang
2017-05-30 9:15 ` [Qemu-devel] [PATCH 1/2] nvdimm: warn if the backend is not a DAX device Stefan Hajnoczi
2017-05-31 6:12 ` Haozhong Zhang
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=20170530091624.GE11362@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@linux.intel.com \
--cc=haozhong.zhang@intel.com \
--cc=imammedo@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).