Season pork on all sides with 1 tablespoon rosemary, ¾ teaspoon salt and ½ teaspoon pepper.
Add oil to a programmable pressure multicooker (such as Instant Pot). Select Sauté setting. Select High temperature setting and allow it to preheat.
Add the pork; cook on all sides until nicely browned, about 3 minutes per side. Transfer to a plate.
Pour off excess drippings in the cooker; do not wipe the cooker clean.
Add onion, garlic, ½ teaspoon rosemary and the remaining ½ teaspoon each salt and pepper to the cooker; cook, stirring constantly, until the onion softens, about 1 minute.
Add stock, stirring to scrape up any browned bits from the bottom of the cooker.
Return the pork to the cooker. Press Cancel. Cover the cooker and lock the lid in place.
Turn the steam release handle to Sealing position. Select Manual/Pressure Cook setting. Select High pressure for 22 minutes.
Carefully turn the steam release handle to Venting position, and let the steam fully escape. Remove the lid from the cooker.
Transfer the pork to a cutting board; let rest for 10 to 12 minutes.
Meanwhile, whisk cornstarch and cold water in a small bowl until combined.
Select Sauté setting on the cooker. Select High temperature setting, and bring the mixture in the cooker to a boil.
Add the cornstarch mixture, whisking until combined. Cook, whisking constantly, until the mixture thickens into gravy, 1 to 2 minutes.
Add butter and the remaining 2 ½ teaspoons rosemary, stirring until the butter is melted. Turn the cooker off.
Slice the pork into ¾-inch pieces. Arrange the slices on 6 plates; spoon the gravy over the pork.
