[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54992d3f470522609d735b8432d0091acb806b75.camel@intel.com>
Date: Tue, 16 Apr 2024 17:11:57 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "Yamahata, Isaku"
<isaku.yamahata@...el.com>
CC: "seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai"
<kai.huang@...el.com>, "federico.parola@...ito.it"
<federico.parola@...ito.it>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "isaku.yamahata@...il.com"
<isaku.yamahata@...il.com>, "dmatlack@...gle.com" <dmatlack@...gle.com>,
"michael.roth@....com" <michael.roth@....com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>
Subject: Re: [PATCH v2 07/10] KVM: x86: Always populate L1 GPA for
KVM_MAP_MEMORY
On Wed, 2024-04-10 at 15:07 -0700, isaku.yamahata@...el.com wrote:
> + /* Force to use L1 GPA despite of vcpu MMU mode. */
> + is_smm = !!(vcpu->arch.hflags & HF_SMM_MASK);
> + if (is_smm ||
> + vcpu->arch.mmu != &vcpu->arch.root_mmu ||
> + vcpu->arch.walk_mmu != &vcpu->arch.root_mmu) {
> + vcpu->arch.hflags &= ~HF_SMM_MASK;
0-day informs me that the definition for HF_SMM_MASK depends on CONFIG_KVM_SMM.
> + mmu = vcpu->arch.mmu;
> + walk_mmu = vcpu->arch.walk_mmu;
> + vcpu->arch.mmu = &vcpu->arch.root_mmu;
> + vcpu->arch.walk_mmu = &vcpu->arch.root_mmu;
> + kvm_mmu_reset_context(vcpu);
> + }
> +
Powered by blists - more mailing lists