rewrote ksm/uksm for compatibility with new variants
Merge remote-tracking branch 'origin/jb2' into jb2