Musk seems to have handled China quite well so far, with Tesla's gigafactory in Shanghai, which is also the first fully foreign-owned such venture allowed in the country. An alignment of interests no doubt.
I think he also appreciated the Chinese attitude of going for it and making things happen quickly once the decision is made, which seems quite similar to his.