On Thu, May 06, 2021, Marcelo Tosatti wrote: > Index: kvm/arch/x86/kvm/x86.c > =================================================================== > --- kvm.orig/arch/x86/kvm/x86.c > +++ kvm/arch/x86/kvm/x86.c > @@ -11295,7 +11295,11 @@ bool kvm_arch_can_dequeue_async_page_pre > > void kvm_arch_start_assignment(struct kvm *kvm) > { > - atomic_inc(&kvm->arch.assigned_device_count); > + int ret; > + > + ret = atomic_inc_return(&kvm->arch.assigned_device_count); > + if (kvm_x86_ops.start_assignment) > + kvm_x86_ops.start_assignment(kvm, ret); This can be a static_call(), just needs an entry in kvm-x86-ops.h. > } > EXPORT_SYMBOL_GPL(kvm_arch_start_assignment); > > >