It seems from looking round the web that a lot of users of z170 boards regardless of manufacturers of both boards and RAM are having trouble with XMP.
I have a Gigabyte z170xp-SLI with four sticks of Corsair CMK32GX4M4A2666C16 RAM and an Intel i7-6700k 4GHz CPU.
After enabling XMP Profile 1 in the BIOS (the latest F5 revision) my machine will sometimes boot and sometimes it won't. I've also experienced BSOD's with both Windows 7 64 bit and after upgrading to Windows 10 64 bit.
The XMP profile sets the RAM to it's rated 2666MHz speed. When I reset to it's default setting in the BIOS (2133Mhz) my machine has been perfectly stable (for two weeks now) and Memtest shows no errors. This is not the case with XMP on....just tried to turn it on again last night and the same symptoms started again.
I've now tried manually setting both the speed to 2666Mhz and the first four timings (16-18-18-35) in the BIOS and will run Memtest tonight. Hopefully the machine will be more stable now. So far so good....
I am hoping that as the BIOS is revised things will improve?