  The non-linear relation between X-ray and UV luminosity in quasars can be
used to estimate their distance. Recently, we have shown that despite the large
dispersion of the relation, a Hubble Diagram made of large samples of quasars
can provide unique constraints on cosmology at high redshift. Furthermore, the
dispersion of the relation is heavily affected by measurement errors: until now
we have used serendipitous X-ray observations, but dedicated observations would
significantly increase the precision of the distance estimates. We discuss the
future role of XMM in this new field, showing (1) the fundamental contribution
of the Serendipitous Source Catalogue and of large surveys, and (2) the
breakthrough advancements we may achieve with the observation of a large number
of SDSS quasars at high redshift: every ~10 quasars observed at z$\sim$3 would
be equivalent to discovering a supernova at that redshift.
