This paper studies a stochastic linear-quadratic (LQ) control problem over an infinite time horizon with Markovian jumps in parameter values, allowing the weighting matrices in the cost to be indefinite. Coupled generalized algebraic Riccati equations (CGAREs) involving pseudo inverse of a matrix are introduced. It is shown that the solvability of the LQ problem boils down to that of the CGAREs. However, the system of the CGAREs is hard to treat. To overcome this difficulty, the corresponding semidefinite programming (SDP) and related duality are utilized. Several implication relations among the SDP complementary duality, the existence of the solution to the CGAREs and the optimality of LQ problem are established. A numerical procedure that provides a thorough treatment of the LQ problem via primal-dual SDP is presented: it identifies a stabilizing optimal feedback control or determines that the LQ problem has no optimal solution