Re: [PATCH v3 5/8] KVM: x86/mmu: Add a field to control memslot rmap allocation

From: Ben Gardon
Date: Mon May 10 2021 - 12:14:50 EST


On Fri, May 7, 2021 at 1:28 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 07/05/21 01:44, Ben Gardon wrote:
> >> struct kvm_vm_stat {
> >> @@ -1853,4 +1859,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
> >>
> >> int kvm_cpu_dirty_log_size(void);
> >>
> >> +inline bool kvm_memslots_have_rmaps(struct kvm *kvm);
> > Woops, this shouldn't be marked inline as it creates build problems
> > for the next patch with some configs.
> >
>
> Possibly stupid (or at least lazy) question: why can't it be a "normal"
> static inline function?

That was my initial approach (hence the leftover inline) but I got
some warnings about a forward declaration of struct kvm because
arch/x86/include/asm/kvm_host.h doesn't include virt/kvm/kvm_host.h.
Maybe there's a way to fix that, but I didn't want to mess with it.

>
> Paolo
>