vtpm Mini-Os domain: hotplug fix
PATCH 1/1 vtpm Mini-Os domain: hotplug fix
Signed-off-by Matthew Fioravante <[email protected]>
This patch fixes a bug in the vtpm-stubdom implementation. Guest domains talk to vtpms using the vtpm device driver, so each guest has a vtpm device with backend="domname of vtpm."
Whenever one of these guest domains would be brought up the hotplug scripts would run and pause the domain. The vtpm hotplug scripts are only neccessary if the vtpm's backend domain is dom0. This patch disables hotplugging for vtpm devices with backends that are not dom0.
tools/python/xen/xend/server/tpmif.py +16 -0
@@ -44,6 +44,22 @@ DevController.__init__(self, vm) + def createDevice(self, config): + #Disable hotplug scripts if backend is not dom0 + import xen.xend.XendDomain + xd = xen.xend.XendDomain.instance() + backdom_name = config.get('backend') + if backdom_name is None: + backdom = xen.xend.XendDomain.DOM0_ID + else: + bd = xd.domain_lookup_nr(backdom_name) + backdom = bd.getDomid() + + if backdom != xen.xend.XendDomain.DOM0_ID: + self.hotplug = False + + return DevController.createDevice(self, config) + def getDeviceDetails(self, config): """@see DevController.getDeviceDetails"""
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel