Is there any way to compute the Legendre Transformation of a Hamiltonian which is linear in momentum, for example, a crazy Hamiltonian like
$$H(q,p) = \alpha p q + m\omega q^2 .$$
This function is convex (and also concave) in $p$, which is a sufficient condition for the Legendre transformation to work (as far as I know). However if I try to find $\dot{q}(p)$ , which I would normally then invert and sub into $p \dot{q} -H(q,p) $, I get stuck because $$\frac{\partial H}{\partial p} = \dot{q} = \alpha q.$$