Halliday & Matthiessen (2014: 160):
The WH- element is a distinct element in the interpersonal structure of the clause. Its function is to specify the entity that the questioner wishes to have supplied. … it typically takes a thematic position in the clause. The WH- element is always conflated with one or another of the three functions of Subject, Complement or Adjunct. If it is conflated with the Subject, it is part of the Mood element, and the order within the Mood element must therefore be Subject^Finite.
If on the other hand the WH- element is conflated with a Complement or Adjunct, it is part of the Residue; and in that case the typical interrogative ordering within the Mood element reasserts itself, and we have Finite preceding Subject.