On 11/23/2010 09:45 AM, Gleb Natapov wrote:
Yes. We could define a set of alternate memory slots to be used when SMM is active. The mmu is already prepared (like we support vcpus with different paging modes simultaneously).
But memory slots resides below mmu. The responsible of mmu is to translate gva to gpa. After that memory slots are used to translate gpa into hva and at this point it is not per vcpu. With SMM one vcpu can generate MMIO access and another one memory access with the same gpa.
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.