Tensions between the United States and China have been growing over accusations that the countries are using tech companies for cyber espionage. The U.S. recently charged five Chinese military officials with hacking into various American companies to steal trade secrets, and the government has been suspicious of Chinese tech giant Huawei for years. The United States, as it turns out, has been spying on Huawei, and it was recently reported that the NSA has been intercepting some networking hardware and installing surveillance equipment before sending it on its way.

CEO John Chambers of Cisco (CSCO 0.37%) penned a letter to president Obama in response, stating that revelations about the NSA are hurting American technology companies in foreign markets. China has retaliated, recently banning Microsoft's (MSFT 1.65%) Windows 8 from government computers, calling it a security threat, while continuing to allow older versions of Windows. It has also been reported that the Chinese government is pressuring banks to replace hardware made by International Business Machines (IBM 0.16%) with local alternatives.

Should investors in these American technology companies be worried?

Microsoft's biggest problem is piracy
In 2011, former Microsoft CEO, Steve Ballmer, stated that China only generated about 5% of the revenue generated in the United States, even though PC sales in both countries were about the same. Rampant software piracy in China is to blame, and because of this the ban on Windows 8, whether it ends up being long-term or not, will have very little effect on Microsoft's bottom line.

The reason given for the ban, that it was to ensure computer security after Microsoft ended support for Windows XP, makes no sense at all. Windows XP still accounts for about half of the Chinese desktop market, and those desktops are now security risks due to Microsoft ending support. This ban seems reactionary and nonsensical, but it likely doesn't change much for Microsoft in China.

Spied on either way
While Cisco's emerging market sales have been declining lately, at least partly attributed to mistrust of American tech companies, there's little doubt that China is also spying through its own tech companies. What this means in the long-term is that foreign companies have a choice between potentially being spied on by the United States, potentially being spied on by China, or only using local technology products. The last option is unlikely to be feasible in most places.

Cisco could have trouble in China, however. China has accused Cisco of cooperating with the NSA, an allegation which Cisco denies. Competition from low-cost Chinese competitors like Huawei has always been a problem, but the tension between the U.S. and China could lead China to take further steps to lower its dependence on Cisco products. Cisco only derives about 15.5% of sales from the Asia-Pacific region, which includes China, so continued weakness in China wouldn't necessarily be devastating, but it would have a negative effect on the company's profits.

Replacing IBM?
Bloomberg recently reported that the Chinese government is urging some banks to replace IBM hardware with local hardware, worried that using American hardware compromises China's financial security. IBM has been in China for more than 30 years, and the Chinese banking system relies on IBM's mainframe computers to process transactions in a secure, reliable way.

A quote from an official at one of China's big banks sums up how difficult it would be for China's banks to replace IBM hardware: "There aren't any locally made hardware around that can handle the massive amount of data in the banking industry."

IBM's mainframes are built to process an enormous number of transactions, and there's simply no viable alternative in China. Servers that power less important systems could certainly be replaced by local hardware, but mainframes could not.

As much trouble as IBM has been having with its hardware division lately, the mainframe computer is entrenched in the global banking industry and provides IBM with a durable competitive advantage. China is as important to IBM as IBM is to China.

The bottom line
While the tension between the United States and China is not good for the American tech industry, some companies are better off than others. Both Microsoft and IBM are fairly entrenched in China, and it's unlikely that their products will get dumped any time soon. Cisco faces local competition in China, but the activities of the NSA seem unlikely to cause long-term problems in other emerging markets. As much as China may want to decrease its reliance on American tech, there's a limit to how much it can do.