Ok, that may make sense, and I will make
the patch for it.
Thanks
Xiaohui
From: Keir Fraser
[mailto:keir.fraser@xxxxxxxxxxxxx]
Sent: Tuesday, May 20, 2008 4:40
PM
To: Xin, Xiaohui
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel]about the
super page support with EPT
On 20/5/08 09:27, "Xin,
Xiaohui" <xiaohui.xin@xxxxxxxxx> wrote:
The recent super page support patch checked in met some
problem when EPT was enabled. The patch lost some code during checking in.
>From our experience, in EPT enabled situation, we has to split the last 2M of
the guest memory to 4k pages instead of 2M contiguous, the reason is that, in
tools side, 5 special pages are located in guest high end memory, and the guard
page will be decreased then. It will result to set the p2m entry with order 0 to
be invalid, in normal logic, this will result to set the whole 2m p2m entry
with order 9 to be invalid, then all the other 4k pages in the last 2M cannot
be accessed. The end result is that we will get “Bad address” error
when we create guest with EPT.
The patch may make sense since it avoids needlessly
shattering a physical 2MB extent, but actually your underlying EPT logic should
be able to handle this shattering anyway. It is allowable to allocate
superpages and free 4kB pages and your EPT mis-handling of this case is a bug.
I think the underlying Xen fix should be implemented, tested and applied first,
before considering this tools patch.
-- Keir