The other answers are more or less right but missing some important details.
You do not want exposed cement board to extend out. The goal should be for the tile - even 1" - to lap over the drywall next to the cement board. Remember you don't need cement board outside your doors and things like that.
What if you have to have "exposed" cement board. Yes you skim coat it. But if you use latex pva primer and latex paint - which most people on here would suggest - your skimcoat will crack and fail within a couple years if that long. You must must must use an oil based primer to provide a moisture barrier for the 1/8" skimcoat. After that you can go latex or oil on top of it.
After finishing over 100 bathrooms I can say the #1 thing to longevity of the look and feel is using an oil based primer. It is funny your question is exactly why I started using it. We got these shower kits that were thin sheets of marble (not faux marble). Everything had to be almost exactly plumb/square and called for concrete boards backing... We just decided, so there wasn't a gap to run the boards to the ceiling (~9') when kit was about ~6'.
So skimcoat the upper area, prime, paint. Every fricking unit that we did this bathroom - paint/skimcoat failure. Older guy in our crew cleans up the first one... Asks me what type of primer. Explained to me how oil based primer prevent steam moisture from penetrating. Reduces these kinds of issues, nail/screw pops, wet spots and almost every other kind of bathroom issue. Never primed another bathroom in latex.