MSM stuff from S4 kernel