Just a couple of things I noticed while reviewing Haogang's patch. Applies on top of my suggested replacement for that patch (in <1325669689.25206.181.camel@zakaz.uk.xensource.com>).
Not extensively tested but I did run it in dom0 and start both and HVM and PV guest.