  We derive a Hamiltonian for an extended spinning test body in a curved
background spacetime, to quadratic order in the spin, in terms of
three-dimensional position, momentum, and spin variables having canonical
Poisson brackets. This requires a careful analysis of how changes of the spin
supplementary condition are related to shifts of the body's representative
worldline and transformations of the body's multipole moments, and we employ
bitensor calculus for a precise framing of this analysis. We apply the result
to the case of the Kerr spacetime and thereby compute an explicit canonical
Hamiltonian for the test-body limit of the spinning two-body problem in general
relativity, valid for generic orbits and spin orientations, to quadratic order
in the test spin. This fully relativistic Hamiltonian is then expanded in
post-Newtonian orders and in powers of the Kerr spin parameter, allowing
comparisons with the test-mass limits of available post-Newtonian results. Both
the fully relativistic Hamiltonian and the results of its expansion can inform
the construction of waveform models, especially effective-one-body models, for
the analysis of gravitational waves from compact binaries.
