As correctly pointed out by elambo and lcdave, Maserati uses Maserati engines.
The V8s in the Gran Turismo and Gran Cabrio are so-called F136 engines. They are used in many Maserati and Ferrari models - and in the Alfa Romeo 8C - but in different specs. The F136 engine family was actually introduced in a Maserati; the 4200 Spyder (and then in the 4200 Coupe) in 2002. It made its first Ferrari appearance in the 430 in 2004.
The Maserati and Ferrari engines are far from identical. Displacements differ, and the Maserati F136 engines are crossplane crankshaft engines, whereas the Ferrari F136 engines are flatplane crankshaft engines. But, they are all built in Maranello.
The new V8s - the (twin-turbocharged) F154 family - also differ in Maserati and Ferrari applications, and was, again, first introduced in a Maserati; the Quattroporte VI in 2013.
Expect a version of the V6 engine in the new Ghibli to be introduced in some Ferrari at some point...
Even the V12 (the F149) used in the MC12 is not the same in Maserati and Ferrari configurations. Most importantly, the MC12 has a gear-driven camshaft system, whereas the Ferraris have a more mundane chain-driven system.
The last Maserati engine that was both designed and built in Viale Ciro Menotti was the 3200 twin-turbocharged V8, last used in the 3200GT (1998-2002).