On Tue, Nov 23, 2010 at 12:32:04PM +0200, Avi Kivity wrote:
On 11/23/2010 10:21 AM, Gleb Natapov wrote:
The mmu would translate gva to a (gpa, smm) pair (when tdp is enabled, translate gpa or ngpa to (gpa, smm). gfn_to_page() translates a (gpa, smm) pair to a struct page.
Actually smm is a vcpu state, so only gfn_to_pfn will have to be changed to get vcpu as a parameter (or is_smm flag, although this look like very x86ish thing for common code where gfn_to_pfn resides).
Yes, even simpler. We'll need to add smm to kvm_mmu_page_role so page tables don't get confused.
And what about tdp? kvm_mmu_page_role is not used there, no?