The cognitive radio multiple-input multiple-output Gaussian broadcast channels are studied where multiple antennas are available for both primary users and secondary users in a spectrum sharing environment, and the sum-rate capacity is also obtained under both the SUs' transmit power constraint and interference power constraint at the primary receivers. The paper principally consists of two steps. First, a duality technique and dirty paper coding are adopted to simplify the channels. Second, we propose an iterative power allocation algorithm to obtain the maximum sum-rate capacity and examine the effects of the constraint parameters on the concerned quantities. Finally, numerical simulation results are presented to validate the proposed theoretical analysis.