From: Avi Kivity <avi@redhat.com>
To: Christoffer Dall <cdall@cs.columbia.edu>
Cc: KVM General <kvm@vger.kernel.org>,
Marc Zyngier <Marc.Zyngier@arm.com>,
Steve Capper <Steve.Capper@arm.com>,
Will Deacon <Will.Deacon@arm.com>
Subject: Re: Alignment issue with transparent huge pages
Date: Tue, 30 Oct 2012 11:48:31 +0200 [thread overview]
Message-ID: <508FA26F.6040603@redhat.com> (raw)
In-Reply-To: <CAEDV+gLZh4t2n0eHYZ5remSYeENuJf-jw8p80NpwvKa+V8wKgA@mail.gmail.com>
On 10/30/2012 03:43 AM, Christoffer Dall wrote:
> Hi,
>
> I am seeing an interesting case on KVM/ARM where a user memory region
> is not aligned with the guest physical memory address with respect to
> huge page size. This clearly makes it impossible for us to leverage
> transparent huge pages for stage-2 mappings on ARM.
>
> The question is, if this is simply something to check for inside KVM
> and hope that user space aligns its memory allocations, or if this is
> supposed to be forced somehow, or if I'm missing a bigger picture all
> together?
A #ifdef needs changing:
#if defined(__linux__) && defined(__x86_64__)
/* Use 2 MiB alignment so transparent hugepages can be used by KVM.
Valgrind does not support alignments larger than 1 MiB,
therefore we need special code which handles running on Valgrind. */
# define QEMU_VMALLOC_ALIGN (512 * 4096)
# define CONFIG_VALGRIND
#elif defined(__linux__) && defined(__s390x__)
/* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */
# define QEMU_VMALLOC_ALIGN (256 * 4096)
#else
# define QEMU_VMALLOC_ALIGN getpagesize()
#endif
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-10-30 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 1:43 Alignment issue with transparent huge pages Christoffer Dall
2012-10-30 9:48 ` Avi Kivity [this message]
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=508FA26F.6040603@redhat.com \
--to=avi@redhat.com \
--cc=Marc.Zyngier@arm.com \
--cc=Steve.Capper@arm.com \
--cc=Will.Deacon@arm.com \
--cc=cdall@cs.columbia.edu \
--cc=kvm@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.