lkml.org 
[lkml]   [2021]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/7] KVM: x86/mmu: Track if shadow MMU active
From
Date
On 04/05/21 21:55, Sean Christopherson wrote:
> But, I think we we can avoid bikeshedding by simply eliminating this flag. More
> in later patches.

Are you thinking of checking slot->arch.rmap[0] directly? That should
work indeed.

>> - kvm_mmu_init_tdp_mmu(kvm);
>> + if (!kvm_mmu_init_tdp_mmu(kvm))
>> + activate_shadow_mmu(kvm);
> Doesn't come into play yet, but I would strongly prefer to open code setting the
> necessary flag instead of relying on the helper to never fail.
>

You mean

kvm->arch.shadow_mmu_active = !kvm_mmu_init_tdp_mmu(kvm);

(which would assign to alloc_memslot_rmaps instead if shadow_mmu_active
is removed)? That makes sense.

Paolo

\
 
 \ /
  Last update: 2021-05-04 22:27    [W:0.079 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site