New York (CNN Business) Warren Buffett's devotion to Apple is taking a toll on his portfolio. The Oracle of Omaha lost almost $4 billion after Apple's sales warning .

Buffett's Berkshire Hathaway ( BRKB ) owns about 252.5 million shares of Apple, making Berkshire the company's second-largest investor. The position makes up 25.7% of Berkshire's total portfolio and is by far Buffett's largest holding.

Apple tumbled 10% Thursday, and the value of Berkshire's Apple ( AAPL ) stake fell to about $36 billion, down from nearly $40 billion on Wednesday.

Berkshire first invested in Apple in early 2016. At that time, Buffett's only other major tech holding was IBM ( IBM ). That stock has fallen out of favor in recent years.

IBM is no longer a top Berkshire holding. But Buffett has praised Apple and its CEO Tim Cook repeatedly over the past two years.

Last August, Buffett told CNBC that he was not focusing on iPhone "sales in the next quarter or the next year," adding that he liked Apple because there are "hundreds millions of people who practically live their lives" by the iPhone.

Buffett admitted that he does not use an iPhone. He does have an iPad tablet, though.

Buffett also called the iPhone "enormously underpriced" despite its $1,000-plus price tag for some top models — a price that many now fear is way too expensive for consumers in emerging markets like China and India.

Berkshire Hathaway was not immediately available for comment for this report.

The company is not the only large investment firm to get whacked by Apple's woes.

Mutual fund giant Vanguard is the largest owner of Apple, with a position of nearly 340 million shares. BlackRock, State Street and Fidelity are also among the five largest investors in Apple.

But shares of Berkshire fell more than 5% Thursday. And the problems at Apple are just the latest for Buffett's portfolio.