On 11/10/2011 11:58 AM, Nadav Har'El wrote: > KVM's existing shadow MMU code already supports nested TDP. To use it, we > need to set up a new "MMU context" for nested EPT, and create a few callbacks > for it (nested_ept_*()). We then need to switch back and forth between this > nested context and the regular MMU context when switching between L1 and L2. > > + > +static void nested_ept_inject_page_fault(struct kvm_vcpu *vcpu, > + struct x86_exception *fault) > +{ > + struct vmcs12 *vmcs12; > + nested_vmx_vmexit(vcpu); > + vmcs12 = get_vmcs12(vcpu); > + /* > + * Note no need to set vmcs12->vm_exit_reason as it is already copied > + * from vmcs02 in nested_vmx_vmexit() above, i.e., EPT_VIOLATION. > + */ Not in all cases. For example, L0 may emulate an L2 instruction, which then faults at the EPT level. > + vmcs12->exit_qualification = fault->error_code; > + vmcs12->guest_physical_address = fault->address; > +} What about the guest linear address field? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html