> + if (likely(nr_pages_needed == 1)) > + return __kvm_gfn_to_hva_cache_init(slots, ghc, gpa, len); > + else > + return -EINVAL; > } I don't really have enough knowledge to comment on the functionality, but this code structure is really odd to read. Try to handle error conditions with early returns first, please: if (unlikely(nr_pages_needed != 1)) return -EINVAL; return __kvm_gfn_to_hva_cache_init(slots, ghc, gpa, len);