From: Stefan Berger Subject: [PATCH] [vTPM] Not building vTPM frontend as module Date: Tue, 09 May 2006 13:08:46 -0400 Message-ID: <1147194526.421.4.camel@941e-2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-AYkdvPu7grprok5Vmoa7" 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 List-Id: xen-devel@lists.xenproject.org --=-AYkdvPu7grprok5Vmoa7 Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch prevents the vTPM frontend to be built as module for now. An 'rmmod' causes some problems since the backend is still using the shared page. This patch also fixes a problem in the backend. Signed-off-by: Stefan Berger --=-AYkdvPu7grprok5Vmoa7 Content-Disposition: attachment; filename=tpm_module.diff Content-Type: text/x-patch; name=tpm_module.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig @@ -50,13 +50,12 @@ config TCG_INFINEON can be found at http://www.prosec.rub.de/tpm config TCG_XEN - tristate "XEN TPM Interface" - depends on TCG_TPM && XEN + bool "XEN TPM Interface" + depends on XEN + select TCG_TPM ---help--- - If you want to make TPM support available to a Xen - user domain, say Yes and it will - be accessible from within Linux. To compile this driver - as a module, choose M here; the module will be called - tpm_xen. + If you want to make TPM support available to a Xen user domain, + say Yes and it will be accessible from within Linux. This driver + is not available as module. endmenu Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile @@ -8,4 +8,5 @@ endif obj-$(CONFIG_TCG_NSC) += tpm_nsc.o obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o -obj-$(CONFIG_TCG_XEN) += tpm_xen.o tpm_vtpm.o +obj-$(CONFIG_TCG_XEN) += tpm_xenu.o +tpm_xenu-y = tpm_xen.o tpm_vtpm.o Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c @@ -745,9 +745,9 @@ failexit: static void __exit tpmif_exit(void) { + exit_tpm_xenbus(); cleanup_vtpm(); tpm_private_put(); - exit_tpm_xenbus(); gnttab_free_grant_references(gref_head); } Index: root/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_32 =================================================================== --- root.orig/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_32 +++ root/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_32 @@ -1904,7 +1904,7 @@ CONFIG_TCG_TPM=m CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m -CONFIG_TCG_XEN=m +# CONFIG_TCG_XEN is not set CONFIG_TELCLOCK=m # Index: root/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_64 =================================================================== --- root.orig/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_64 +++ root/xen-unstable.hg/buildconfigs/linux-defconfig_xen_x86_64 @@ -1768,7 +1768,7 @@ CONFIG_TCG_TPM=m CONFIG_TCG_NSC=m CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m -CONFIG_TCG_XEN=m +# CONFIG_TCG_XEN is not set CONFIG_TELCLOCK=m # Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c =================================================================== --- root.orig/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c +++ root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c @@ -179,7 +179,7 @@ void __init tpmif_interface_init(void) 0, 0, NULL, NULL); } -void __init tpmif_interface_exit(void) +void __exit tpmif_interface_exit(void) { kmem_cache_destroy(tpmif_cachep); } --=-AYkdvPu7grprok5Vmoa7 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 --=-AYkdvPu7grprok5Vmoa7--