In this letter, we develop a new precoding scheme that improves the performance of mutual information for generalized spatial modulation (GSM). First, the closed-form expression of the mutual information of the GSM with finite alphabet inputs is derived in order to update the precoder with regard to the mutual information. The joint precoding design problem to maximize the mutual information of the GSM is difficult to solve directly since it is a non-convex coupled problem. In order to solve this problem, we transform the GSM system into a virtual multiple-input multiple-output (MIMO) system, and then an extended ellipsoid algorithm is applied. Each precoder of the GSM can be solved using the common precoder of the virtual MIMO. The numerical results demonstrate that the proposed precoding scheme significantly enhances the performance in terms of the mutual information.