  We propose a general method to identify nonlinear Fokker--Planck--Kolmogorov
equations (FPK equations) as gradient flows on the space of probability
measures on $\mathbb{R}^d$ with a natural differential geometry. Our notion of
gradient flow does not depend on any underlying metric structure such as the
Wasserstein distance, but is derived from purely differential geometric
principles. We explicitly identify the associated energy functions $E$ and show
that these are Lyapunov functions for the FPK solutions. Moreover, we show
restricted uniqueness results for such gradient flows, and we also prove that
the gradient of $E$ is a gradient field on $\mathbb{R}^d$, which can be
approximated by smooth gradient fields. These results cover classical and
generalized porous media equations, where the latter have a generalized
diffusivity function and a nonlinear transport-type first-order perturbation.
