In this paper, we jointly design linear source and relay precoders for two-hop MIMO relaying. The involved channels encounter spatially correlated fading, the source data symbols are mutually correlated, and the noises are colored not only at the destination but also at the relay. Two different scenarios of channel state information (CSI) are assumed to be available at the transmitters: full CSI of both hops (the full CSIT) and full CSI of the source-relay hop only plus the covariance information of the relay-destination hop (the partial CSIT). First, with the full CSIT, we derive optimal precoders by maximizing the instantaneous mutual information (MI). Secondly, with the partial CSIT knowledge we derive suboptimal precoders by maximizing the average MI. For both the CSIT cases, we propose an iterative algorithm to perform power allocation iteratively and alternatively between the source antennas and the relay antennas. Its simplified version in which the power allocation is performed separately between the source antennas and the relay antennas is also developed. Simulation results show that our proposed precoding schemes with the full CSIT provide significantly higher capacity than the existing schemes. Besides, the proposed schemes with the partial CSIT also perform well especially when the channels are spatially correlated at the transmit sides and at medium-to-high signal-to-noise ratios (SNRs), while they require much lower computational complexity and less feedback overhead.