[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BB15B1A.7090901@cn.fujitsu.com>
Date: Tue, 30 Mar 2010 09:59:54 +0800
From: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
To: Avi Kivity <avi@...hat.com>
CC: Ingo Molnar <mingo@...e.hu>, Marcelo Tosatti <mtosatti@...hat.com>,
Sheng Yang <sheng@...ux.intel.com>,
KVM list <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [RFC] KVM MMU: thinking of shadow page cache
When we cached shadow page tables, one guest page table may have
many shadow pages, take below case for example:
(RO+U) ---> |------| __ |------|
(W+U ) ---> | GP1 | | | GP2 |
(W+P ) ---> |------| |--> |------|
There have 3 kinds of permission mapping to GP1, so we should
allocate 3 shadow pages for GP1 and 3 shadow pages for GP2.
And it has 3 class permissions(R/W, U/S, X/NX) in x86's architecture,
for the worst case, we should allocate 2^3 pages for every paging
mapping level.
This waste is caused by that we only set the permission bits in PTE,
not in the middle mapping level.
So, i think we can mapping guest page table's permission into cache
shadow page table, then it can be shared between many shadow page tables
if their map to the same gust physics address. For above case, we only need 2
pages.
Any comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists