qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary


From: Marcelo Tosatti
Subject: Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary
Date: Mon, 28 Oct 2013 12:04:06 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Oct 27, 2013 at 04:20:44PM +0100, igor Mammedov wrote:
> > Yes, thought of that, unfortunately its cumbersome to add an interface
> > for the user to supply both 2MB and 1GB hugetlbfs pages.
> Could 2Mb tails be automated, meaning if host uses 1Gb hugepages and
> there is/are tail/s, QEMU should be able to figure out alignment
> issues and allocate with appropriate pages.

Yes that would be ideal but the problem with hugetlbfs is that pages are
preallocated.

So in the end you'd have to expose the split of guest RAM in 2MB/1GB types
to the user (it would be necessary for the user to calculate the size of
the hole, etc).

> Goal is separate host part allocation aspect from guest related one,
> aliasing 32-bit hole size at the end doesn't help it at all, it's quite
> opposite, it's making current code more complicated and harder to fix
> in the future.

You can simply back the 1GB areas which the hole reside with 2MB pages.
Can't see why having the tail of RAM map to the hole is problematic.

Understand your concern, but the complication is necessary: the host
virtual/physical address and guest physical addresses must be aligned on
largepage boundaries.

Do you foresee any problem with memory hotplug?

Could add a warning to memory API: if memory region is larger than 1GB
and RAM is 1GB backed, and not properly aligned, warn.




reply via email to

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