the tls stuff was already solved like years ago with a kernel patch that adds gdt and ldt manipulation thru /dev/gdt and /dev/ldt.
http://9hal.ath.cx/usr/cinap_lenrek/segdescpatch.tgz its probably out of date now and needs adaption. its already on the todo for 9front... :) -- cinap