Partial revert of 9ccef3ed2505ff47ea2f601308bf0e8a988c6a11
Partial revert of 9ccef3ed2505ff47ea2f601308bf0e8a988c6a11

Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@citrix.com>

koushikcgit/xenopsd,euanh/xenopsd,simonjbeaumont/xenopsd,koushikcgit/xenopsd,simonjbeaumont/xenopsd,johnelse/xenopsd,johnelse/xenopsd,euanh/xenopsd,cheng--zhang/xenopsd,thomassa/xenopsd,djs55/xenopsd,djs55/xenopsd,djs55/xenopsd,thomassa/xenopsd,johnelse/xenopsd,cheng--zhang/xenopsd,simonjbeaumont/xenopsd,koushikcgit/xenopsd,euanh/xenopsd,thomassa/xenopsd,cheng--zhang/xenopsd