Before Xerxes I invaded Greece, what did he first need to do?

put down a revolt of Ionian Greeks
defeat revolts in Babylon and Egypt
support Sparta in the Peloponnesian Wars
build the Royal Road so his army could reach Greece