qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 1/3] hostmem-file: add "align" option


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v3 1/3] hostmem-file: add "align" option
Date: Wed, 29 Nov 2017 08:05:19 -0200
User-agent: Mutt/1.9.1 (2017-09-22)

On Wed, Nov 29, 2017 at 08:33:29AM +0800, Haozhong Zhang wrote:
> On 11/27/17 23:07 -0200, Eduardo Habkost wrote:
> > On Mon, Nov 27, 2017 at 12:35:15PM +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 <address@hidden>
> > 
> > The new option needs to be documented on qemu-options.hx.
> 
> will add in the next version.

Note that there are patches on on machine-next that change the memory backend
documentation.

See:
  git://github.com/ehabkost/qemu.git machine-next
  
https://github.com/ehabkost/qemu/commit/869f7f61c557a46b46e41b5e38a61551d45b6d0d

But the conflicts should be trivial to solve if you document the new option in
a separate paragraph.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]