Re: [PATCH 02/10] nEPT: MMU context for nested EPT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 int nested_ept_init_mmu_context(struct kvm_vcpu *vcpu)
> +{
> +	int r = kvm_init_shadow_mmu(vcpu, &vcpu->arch.mmu);
> +
> +	vcpu->arch.mmu.set_cr3           = vmx_set_cr3;
> +	vcpu->arch.mmu.get_cr3           = nested_ept_get_cr3;
> +	vcpu->arch.mmu.get_pdptr         = nested_ept_get_pdptr;
> +	vcpu->arch.mmu.inject_page_fault = nested_ept_inject_page_fault;
> +	vcpu->arch.mmu.shadow_root_level = get_ept_level();
> +
> +	vcpu->arch.walk_mmu              = &vcpu->arch.nested_mmu;
> +
> +	return r;
> +}
> +
>

kvm_init_shadow_mmu() will cause ->page_fault to be set to something
like paging64_page_fault(), which is geared to reading EPT ptes.  How
does this work?

-- 
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux