[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100908091655.GI2177@amd.com>
Date: Wed, 8 Sep 2010 11:16:55 +0200
From: "Roedel, Joerg" <Joerg.Roedel@....com>
To: Avi Kivity <avi@...hat.com>
CC: Marcelo Tosatti <mtosatti@...hat.com>,
Alexander Graf <agraf@...e.de>,
"joro@...tes.org" <joro@...tes.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 22/27] KVM: MMU: Refactor mmu_alloc_roots function
On Wed, Sep 08, 2010 at 03:16:59AM -0400, Avi Kivity wrote:
> On 09/07/2010 11:39 PM, Marcelo Tosatti wrote:
> >
> >> @@ -2406,16 +2441,11 @@ static int mmu_alloc_roots(struct kvm_vcpu *vcpu)
> >> root_gfn = pdptr>> PAGE_SHIFT;
> >> if (mmu_check_root(vcpu, root_gfn))
> >> return 1;
> >> - } else if (vcpu->arch.mmu.root_level == 0)
> >> - root_gfn = 0;
> >> - if (vcpu->arch.mmu.direct_map) {
> >> - direct = 1;
> >> - root_gfn = i<< 30;
> >> }
> >> spin_lock(&vcpu->kvm->mmu_lock);
> >> kvm_mmu_free_some_pages(vcpu);
> >> sp = kvm_mmu_get_page(vcpu, root_gfn, i<< 30,
> >> - PT32_ROOT_LEVEL, direct,
> >> + PT32_ROOT_LEVEL, 0,
> >> ACC_ALL, NULL);
> > Should not write protect the gfn for nonpaging mode.
> >
>
> nonpaging mode should have direct_map set, so wouldn't enter this path
> at all.
Hmm, actually the nonpaging path does not set direct_map. I'll fix this
too in v4. Thanks.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists