Build thee a house - Thus he gave him the whole city for a prison, and this certainly could have reduced him to no hardships.
The object, apparently, was to keep Shimei under the immediate eye of the government. Shimei‘s old home, Bahurim, lay east of Jerusalem, on the road to Jericho, 2 Samuel 17:18, and could only be reached by crossing the Kedron valley. Solomon assumes, that, if he quits the city, it will probably be in this direction 1 Kings 2:37.