Re: [PATCH v2 01/25] KVM: x86/mmu: avoid indirect call for get_cr3

Paolo Bonzini
2022-03-08T17:14:36Z

On 3/8/22 17:53, Sean Christopherson wrote:
>> static inline unsigned long kvm_mmu_get_guest_pgd(struct kvm_vcpu *vcpu,
>> struct kvm_mmu *mmu)
>> {
>> if (unlikely(vcpu == &vcpu->arch.guest_mmu))
> Well, not that certainly:-)
>
> if (mmu == &vcpu->arch.guest_mmu)
>
> But you're right, we need to be able to do kvm_read_cr3() for the actual nested_mmu.
>

Ok, I'll drop this patch for now since the end of the series actually
introduces the nested_ops already. And then we can do it for both
get_guest_pgd and get_pdptr.

Paolo