From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xu, Quan" Subject: Re: [PATCH 2/6] vTPM: add HVM_PARAM_STUBDOM_VTPM parameter for HVM virtual machine Date: Thu, 30 Oct 2014 14:22:50 +0000 Message-ID: <945CA011AD5F084CBEA3E851C0AB28890E81CF19@SHSMSX101.ccr.corp.intel.com> References: <1414654731-32641-1-git-send-email-quan.xu@intel.com> <1414654731-32641-3-git-send-email-quan.xu@intel.com> <545225D2.8090203@citrix.com> <945CA011AD5F084CBEA3E851C0AB28890E81CCD8@SHSMSX101.ccr.corp.intel.com> <54522C3C.4040807@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , Andrew Cooper Cc: "keir@xen.org" , "ian.campbell@citrix.com" , "ian.jackson@eu.citrix.com" , "tim@xen.org" , "xen-devel@lists.xen.org" , "jbeulich@suse.com" List-Id: xen-devel@lists.xenproject.org > -----Original Message----- > From: Stefano Stabellini [mailto:stefano.stabellini@eu.citrix.com] > Sent: Thursday, October 30, 2014 9:35 PM > To: Andrew Cooper > Cc: Xu, Quan; xen-devel@lists.xen.org; ian.jackson@eu.citrix.com; tim@xen.org; > keir@xen.org; ian.campbell@citrix.com; jbeulich@suse.com > Subject: Re: [Xen-devel] [PATCH 2/6] vTPM: add > HVM_PARAM_STUBDOM_VTPM parameter for HVM virtual machine > > On Thu, 30 Oct 2014, Andrew Cooper wrote: > > On 30/10/14 12:05, Xu, Quan wrote: > > > > > >> -----Original Message----- > > >> From: Andrew Cooper [mailto:andrew.cooper3@citrix.com] > > >> Sent: Thursday, October 30, 2014 7:50 PM > > >> To: Xu, Quan; xen-devel@lists.xen.org > > >> Cc: keir@xen.org; ian.campbell@citrix.com; tim@xen.org; > > >> ian.jackson@eu.citrix.com; jbeulich@suse.com > > >> Subject: Re: [Xen-devel] [PATCH 2/6] vTPM: add > > >> HVM_PARAM_STUBDOM_VTPM parameter for HVM virtual machine > > >> > > >> On 30/10/14 07:38, Quan Xu wrote: > > >>> Signed-off-by: Quan Xu > > >> What is the purpose of this parameter? A patch like this is > > >> currently unacceptable, especially as the libxl hunk indicates that > > >> the parameter name does not match whatever information you are putting > into it. > > >> > > > Thanks for your suggestion. > > > This parameter tell the Qemu whether to register Qemu vTPM frontend in > xen_hvm_init(). > > > Qemu will get the parameter value by xc_get_hvm_param(). How can I > change it? > > > > This is surely something which should be a command line parameter to > > qemu, or perhaps for qemu to read out of xenstore. > > > > An HVM param is entirely inappropriate for this purpose, in my opinion. > > I agree that an HVM param for this might not the best way to do it, but I can see > why Quan did it that way as we already have a few key parameters passed to > QEMU that way. > > A QEMU command line option, QMP command or xenstore key would be better. If hvm param is not the best way, I think xenstore key would be better. Below is part of Qemu patch, that's why I add HVM_PARAM_STUBDOM_VTPM param. xen_vtpm_register() is similar to xen_be_register() ### Qemu : xen_hvm_init() [xen-hvm.c]### +#ifdef CONFIG_TPM_XENSTUBDOMS + xc_get_hvm_param(xen_xc, xen_domid, HVM_PARAM_STUBDOM_VTPM, &stubdom_vtpm); + if (stubdom_vtpm) { + xen_vtpm_register(&xen_vtpmdev_ops); + } +#endif xen_be_register("console", &xen_console_ops); xen_be_register("vkbd", &xen_kbdmouse_ops); xen_be_register("qdisk", &xen_blkdev_ops); xen_read_physmap(state); ##### Qemu #### Quan