Preheat oven to 350°F.
In a large skillet over medium heat and heat the olive oil. Cook onion and garlic in olive oil for 20 minutes stirring occasionally. Cook until onions turn golden brown. Stir in thyme, salt and pepper. Remove from heat.
With a butcher knife, carefully open a hole in the middle of the pork loin. Once the caramelized onion has cooled, stuff the pork loin with it. Season well with salt and pepper.
Chop roughly the potatoes and mushrooms, season with thyme, salt and pepper, place in a roasting pan. Top with the pork loin and drizzle with olive oil. Roast for 1 to 1 1/2 hours until cooked through or until meat thermometer registers 160°F.
Remove from oven and allow meat to rest for 5 minutes before slicing. Cut into 1 1/2 inch slices and serve with a portion of the mushrooms and potatoes.