From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nadav Har'El" Subject: Re: KVM call minutes for Nov 30 Date: Tue, 7 Dec 2010 14:49:07 +0200 Message-ID: <20101207124907.GA25485@fermat.math.technion.ac.il> References: <20101130155355.GJ24841@x200.localdomain> <20101201092730.GB29486@fermat.math.technion.ac.il> <20101206193919.GA1999@fermat.math.technion.ac.il> <4CFDF19D.70505@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Wright , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mailgw12.technion.ac.il ([132.68.225.12]:26416 "EHLO mailgw12.technion.ac.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753826Ab0LGMtQ (ORCPT ); Tue, 7 Dec 2010 07:49:16 -0500 Content-Disposition: inline In-Reply-To: <4CFDF19D.70505@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 07, 2010, Avi Kivity wrote about "Re: KVM call minutes for Nov 30": >... > All it requires is a > kvm_set_cr3() which will load the PDPTEs into the PDPTRs if PAE is > enabled. You may need to order the loading of CR0, CR3, CR4, and EFER > to achieve the desired effect. I did this more explicitly as: vmcs_writel(GUEST_CR3, get_vmcs12_fields(vcpu)->guest_cr3); vcpu->arch.cr3 = get_vmcs12_fields(vcpu)->guest_cr3; load_pdptrs(vcpu, vcpu->arch.walk_mmu, vcpu->arch.cr3); vmcs_write64(GUEST_PDPTR0, vcpu->arch.mmu.pdptrs[0]); vmcs_write64(GUEST_PDPTR1, vcpu->arch.mmu.pdptrs[1]); vmcs_write64(GUEST_PDPTR2, vcpu->arch.mmu.pdptrs[2]); vmcs_write64(GUEST_PDPTR3, vcpu->arch.mmu.pdptrs[3]); I'm still working on trying to simplify this code - I'll indeed try to see if I can use kvm_set_cr3 instead. Thanks for the suggestion. However, Even if it works, I have a concern on how nested vmx might brake in the future if kvm_set_cr3 is changed in some way that is irrelevant to nested. Nadav. -- Nadav Har'El | Tuesday, Dec 7 2010, 30 Kislev 5771 nyh@math.technion.ac.il |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |We could wipe out world hunger if we knew http://nadav.harel.org.il |how to make AOL's Free CD's edible!