WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] The attached patch uncouples the device id used inside X

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] The attached patch uncouples the device id used inside XenD from the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Dec 2005 21:22:08 +0000
Delivery-date: Thu, 08 Dec 2005 21:23:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 3ab6a6c4b6edda2bc4f7d920de581cb542d3d36c
# Parent  cd434888abdc5979fc1098522367f61307296342
The attached patch uncouples the device id used inside XenD from the
instance number of the vTPM.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

diff -r cd434888abdc -r 3ab6a6c4b6ed tools/python/xen/xend/server/tpmif.py
--- a/tools/python/xen/xend/server/tpmif.py     Thu Dec  8 18:17:59 2005
+++ b/tools/python/xen/xend/server/tpmif.py     Thu Dec  8 18:19:24 2005
@@ -38,10 +38,14 @@
     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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] The attached patch uncouples the device id used inside XenD from the, Xen patchbot -unstable <=