On 10/20/2009 09:37 PM, Marcelo Tosatti wrote:
GUEST_CR3 is updated via kvm_set_cr3 whenever CR3 value changes. diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 364263a..325075f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3638,10 +3638,9 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); - if (enable_ept&& is_paging(vcpu)) { - vmcs_writel(GUEST_CR3, vcpu->arch.cr3); + if (enable_ept&& is_paging(vcpu)) ept_load_pdptrs(vcpu); - } + /* Record the guest's net vcpu time for enforced NMI injections. */ if (unlikely(!cpu_has_virtual_nmis()&& vmx->soft_vnmi_blocked)) vmx->entry_time = ktime_get();
Nice. Any reason why ept_load_pdptrs() couldn't go the same way? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- 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