Hong Kong and Macau are not part of mainland China and therefore a visa is not required to enter these Special Autonomous Regions of China (S.A.R.).
Cruise ship passengers applying for a visa to China are advised to contact the cruise company they are travelling with and enquire what type of visa they are requried to obtain i.e. a single, double or multiple entry visa. If the ship is visiting more than one port in China a double or multiple entry visa may be required.
Some cruise ships that overnight in a Chinese mainland port require passengers to have an entry visa for each time they leave the ship even if stopping in only one port.