From: Stefan Berger Subject: [PATCH][vTPM][REPOST] 2/3: Enablement of vTPM in xm for fully virtualized VMs Date: Tue, 22 Aug 2006 11:11:47 -0400 Message-ID: <1156259507.16094.17.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-fcAsh+ufdsMNZ4NJrTu4" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Christian Limpach List-Id: xen-devel@lists.xenproject.org --=-fcAsh+ufdsMNZ4NJrTu4 Content-Type: text/plain Content-Transfer-Encoding: 7bit Some cleanup in the xm/xend related code since now I am using the xenstore to get virtual TPM configuration parameters from. Signed-off-by: Stefan Berger --=-fcAsh+ufdsMNZ4NJrTu4 Content-Disposition: attachment; filename=xm-vtpm-hvm.diff Content-Type: text/x-patch; name=xm-vtpm-hvm.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xend/image.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/image.py +++ root/xen-unstable.hg/tools/python/xen/xend/image.py @@ -302,10 +302,6 @@ class HVMImageHandler(ImageHandler): (nics, mac, model)) ret.append("-net") ret.append("tap,vlan=%d,bridge=%s" % (nics, bridge)) - if name == 'vtpm': - instance = sxp.child_value(info, 'pref_instance') - ret.append("-instance") - ret.append("%s" % instance) return ret def configVNC(self, config): Index: root/xen-unstable.hg/tools/python/xen/xend/server/tpmif.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/server/tpmif.py +++ root/xen-unstable.hg/tools/python/xen/xend/server/tpmif.py @@ -25,7 +25,7 @@ from xen.xend import sxp from xen.xend.XendLogging import log from xen.xend.XendError import XendError from xen.xend import XendRoot -from xen.xend.XendDomainInfo import DEV_MIGRATE_TEST +import xen.xend.XendDomainInfo from xen.xend.server.DevController import DevController @@ -52,7 +51,7 @@ class TPMifController(DevController): if inst == -1: inst = int(sxp.child_value(config, 'instance' , '0')) - log.info("The domain has a TPM with instance %d and devid %d.", + log.info("The domain has a TPM with preferred instance %d and devid %d.", inst, devid) back = { 'pref_instance' : "%i" % inst, 'resume' : "%s" % (self.vm.getResume()) } --=-fcAsh+ufdsMNZ4NJrTu4 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-fcAsh+ufdsMNZ4NJrTu4--