Basic KSM support

Change-Id: Ibddf5d39d7889069338a1e94a9008b31b9cdd2cf