Some good advice and info from LJH, but as always, it really boils down to two solutions:

#1 Contact an official overland tour agency and spend a heap of cash having them handle the import arrangements, drivers license, registration, insurance & guide service.

#2 Take your bike apart, send it in boxes to Hong Kong, bring it across the border via a courier. Reassemble the bike and do your trip without license, reg, guide, or insurance.

The subject of non-resident foreigners riding here has been beaten to death, and the outcome is always the same. China doesn't want you, or your motorcycle, here, so they've made an outrageously expensive and structured solution for those wishing to undertake a legitimate overland China tour. This is why so many people have opted to go the illegal route (not recommended).

Just curious, why Shanghai to Guilin?

Cheers!
ChinaV