lkml.org 
[lkml]   [2022]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: x86/mmu: Do not create SPTEs for GFNs that exceed host.MAXPHYADDR
From
On 5/2/22 13:12, Kai Huang wrote:
>> - if (unlikely(!enable_mmio_caching)) {
>> + if (unlikely(!enable_mmio_caching) ||
>> +     unlikely(fault->gfn > kvm_mmu_max_gfn_host())) {
> Shouldn't we check fault->gfn against cpuid_maxphyaddr(vcpu) instead of
> kvm_mmu_max_gfn_host() here?

No, the point of this check is to handle the case where
kvm_mmu_max_gfn_host() is smaller than cpuid_maxphyaddr().

Paolo

\
 
 \ /
  Last update: 2022-05-02 13:52    [W:0.106 / U:2.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site