Preheat oven to 400 F.
Wash and peel the potatoes. Put them in a large stockpot and cover with at least an inch of cold water. Bring to a boil. Reduce to a simmer and cook 20 minutes, or until potatoes are tender. Drain the potatoes and allow to cool to room temperature.
In a large saucepan set over medium-high heat, heat 3 tablespoons olive oil. Add the onions and saute 5 minutes, or until slightly translucent. Add the thyme and garlic, and stir for 40 seconds until fragrant.
Add the mushrooms to the pan and saute 2 minutes. Add the garam masala and cook an additional minute, stirring occasionally. Remove the pan from the heat and transfer the mixture to a large bowl. Let cool to room temperature.
Lightly whisk the egg and milk until combined, then add to the mushroom mixture. Stir in the hot sauce, cayenne pepper, black pepper and half of the sea salt. Fold in the pork until evenly combined.
Lightly coat a baking dish with olive oil. Transfer the pork mixture to the baking dish, and level with a spatula or small spoon.
To prepare the top level, roughly dice the cooled potatoes. Mash them with a potato ricer or masher until there are no lumps. Stir in the egg yolks, remaining salt, white pepper and butter until smooth. Spread this mixture over the pork in a smooth, even layer. Sprinkle the Parmesan evenly over the top.
Place on a middle rack in the oven and bake at least 1 hour. The crust will be golden brown. Remove from the oven and allow to cool for at least 10 minutes before serving. Garnish with the thyme sprig.