  We show, using a direct variational approach, that the second boundary value
problem for the Monge-Amp\`ere equation in R^n with exponential non-linearity
and target a convex body P is solvable iff 0 is the barycenter of P. Combined
with some toric geometry this confirms, in particular, the (generalized)
Yau-Tian-Donaldson conjecture for toric log Fano varieties (X,D), saying that
(X,D) admits a (singular) K\"ahler-Einstein metric iff it is K-stable in the
algebro-geometric sense. We thus obtain a new proof and extend to the log Fano
setting the seminal result of Zhou-Wang concerning the case when X is smooth
and D is trivial. Li's toric formula for the greatest lower bound on the Ricci
curvature is also generalized. More generally, we obtain K\"ahler-Ricci
solitons on any log Fano variety and show that they appear as the large time
limit of the K\"ahler-Ricci flow. Furthermore, using duality, we also confirm a
conjecture of Donaldson concerning solutions to Abreu's boundary value problem
on the convex body P. in the case of a given canonical measure on the boundary
of P.
