Re: [PATCH 02/18] KVM: MMU: Make tdp_enabled a mmu-context parameter

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joerg Roedel
Date: Wednesday, March 10, 2010 - 8:26 am

On Wed, Mar 10, 2010 at 04:53:29PM +0200, Avi Kivity wrote:

The basic flow of the mmu state with npt-npt is:

	1. As long as the L1 is running the arch.mmu context is in tdp
	   mode and builds a direct-mapped page table.
	
	2. When vmrun is emulated and the nested vmcb enables nested
	   paging, arch.mmu is switched to a shadow-mmu mode which now
	   shadows the l1 nested page table.
	   So when the l2-guest runs with nested paging the
	   arch.mmu.tdp_enabled variable on the host is false.
	
	3. On a vmexit emulation the mmu is switched back to tdp
	   handling state.

So the mmu.tdp_enabled parameter is about tdp being enabled for the
mmu context (so mmu.tdp_enabled means that we build a l1-direct-mapped
page table when true or shadow a l1-page-table when false). Thats why I
think the 'tdp_enabled' name makes sense in the mmu-context.
The global flag only shows if an mmu-context could be in tdp-state. So
tdp_usable may be a good name for it.

	Joerg


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 13/18] KVM: MMU: Introduce Nested MMU context, Joerg Roedel, (Wed Mar 3, 12:12 pm)
[PATCH 18/18] KVM: X86: Add KVM_CAP_SVM_CPUID_FIXED, Joerg Roedel, (Wed Mar 3, 12:12 pm)
Re: [PATCH 18/18] KVM: X86: Add KVM_CAP_SVM_CPUID_FIXED, Joerg Roedel, (Wed Mar 10, 7:46 am)
Re: [PATCH 02/18] KVM: MMU: Make tdp_enabled a mmu-context ..., Joerg Roedel, (Wed Mar 10, 8:26 am)