The Nvidia chief is testifying before lawmakers about whether he risked national security by having an affair with an alleged Chinese spy.