The tech giant's stock rallied after Berkshire Hathaway disclosed a first-quarter investment in the company.