mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
The attached patch uncouples the device id used inside XenD from the
instance number of the vTPM. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
028268e9bc
commit
ced2f6408d
1 file changed
+7
-3
@@ -38,10 +38,14 @@ class TPMifController(DevController):
|
||||
def getDeviceDetails(self, config):
|
||||
"""@see DevController.getDeviceDetails"""
|
||||
|
||||
devid = int(sxp.child_value(config, 'pref_instance', '0'))
|
||||
log.info("The domain has a TPM with instance %d." % devid)
|
||||
devid = self.allocateDeviceID()
|
||||
inst = int(sxp.child_value(config, 'pref_instance', '-1'))
|
||||
if inst == -1:
|
||||
inst = int(sxp.child_value(config, 'instance' , '0'))
|
||||
|
||||
back = { 'pref_instance' : "%i" % devid }
|
||||
log.info("The domain has a TPM with instance %d and devid %d.",
|
||||
inst, devid)
|
||||
back = { 'pref_instance' : "%i" % inst }
|
||||
front = { 'handle' : "%i" % devid }
|
||||
|
||||
return (devid, back, front)
|
||||
|
||||