From: Wei Liu Subject: Re: [PATCH v2 2/5] vTPM: limit libxl__add_vtpms() function to para virtual machine Date: Tue, 6 Jan 2015 09:44:35 +0000 Message-ID: <20150106094435.GA14301@zion.uk.xensource.com> References: <1420001102-24005-1-git-send-email-quan.xu@intel.com> <20150105125247.GG24360@zion.uk.xensource.com> <945CA011AD5F084CBEA3E851C0AB28890E853D03@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <945CA011AD5F084CBEA3E851C0AB28890E853D03@SHSMSX101.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Xu, Quan" Cc: "ian.jackson@eu.citrix.com" , "stefano.stabellini@eu.citrix.com" , Wei Liu , "ian.campbell@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Jan 06, 2015 at 02:17:36AM +0000, Xu, Quan wrote: > > > > -----Original Message----- > > From: Wei Liu [mailto:wei.liu2@citrix.com] > > Sent: Monday, January 05, 2015 8:53 PM > > To: Xu, Quan > > Cc: xen-devel@lists.xen.org; ian.jackson@eu.citrix.com; > > stefano.stabellini@eu.citrix.com; ian.campbell@citrix.com; > > wei.liu2@citrix.com > > Subject: Re: [PATCH v2 2/5] vTPM: limit libxl__add_vtpms() function to para > > virtual machine > > > > On Tue, Dec 30, 2014 at 11:45:02PM -0500, Quan Xu wrote: > > > Signed-off-by: Quan Xu > > > --- > > > tools/libxl/libxl_create.c | 5 +++-- > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > > > index b1ff5ae..0a09925 100644 > > > --- a/tools/libxl/libxl_create.c > > > +++ b/tools/libxl/libxl_create.c > > > @@ -1358,8 +1358,9 @@ static void domcreate_attach_vtpms(libxl__egc > > *egc, > > > goto error_out; > > > } > > > > > > - /* Plug vtpm devices */ > > > - if (d_config->num_vtpms > 0) { > > > + /* Plug vtpm devices for para virtual domain*/ > > > + if (d_config->num_vtpms > 0 && > > > + d_config->b_info.type == LIBXL_DOMAIN_TYPE_PV) { > > > > It's unclear to me why you stub out HVM domain. You need to state your > > reasoning in comment and commit log. :-/ > > In brief, it is different to plug vtpm device for HVM/PV domain. I will try to describe more detailed in next v3. Thanks Wei. > I got that idea when I read your later patch. But stubbing out PV here is wrong. Essentially this patch introduces a functional regression by itself because now you can't add vtpms for PV. I doubt that you will still need this patch in your next round. See my reply to patch 4/5. Wei. > Thanks > Quan Xu > > > > Wei. > > > > > /* Attach vtpms */ > > > libxl__multidev_begin(ao, &dcs->multidev); > > > dcs->multidev.callback = domcreate_attach_pci; > > > -- > > > 1.8.3.2