XX crank in otherwise 9 speed setup?

I'm looking for a 2 ring BB30 crankset to be used in a 9 speed setup. Can I run an XX crank? Will there be any compatability challenges with a 10 speed crank with 9 speed cassette? Which chain should I run....10sp or 9?