Malaysia is attempting to climb the semiconductor value chain while maintaining the trust of both Washington and Beijing.