From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/6] vTPM: add HVM_PARAM_STUBDOM_VTPM parameter for HVM virtual machine Date: Thu, 30 Oct 2014 11:49:38 +0000 Message-ID: <545225D2.8090203@citrix.com> References: <1414654731-32641-1-git-send-email-quan.xu@intel.com> <1414654731-32641-3-git-send-email-quan.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1414654731-32641-3-git-send-email-quan.xu@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: Quan Xu , xen-devel@lists.xen.org Cc: ian.jackson@eu.citrix.com, tim@xen.org, keir@xen.org, ian.campbell@citrix.com, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org 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. > --- > tools/libxl/libxl_dom.c | 2 ++ > xen/arch/x86/hvm/hvm.c | 3 +++ > xen/include/public/hvm/params.h | 1 + > 3 files changed, 6 insertions(+) > > diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c > index 74ea84b..a60e8c9 100644 > --- a/tools/libxl/libxl_dom.c > +++ b/tools/libxl/libxl_dom.c > @@ -291,6 +291,8 @@ static void hvm_set_conf_params(xc_interface *handle, uint32_t domid, > #if defined(__i386__) || defined(__x86_64__) > xc_hvm_param_set(handle, domid, HVM_PARAM_HPET_ENABLED, > libxl_defbool_val(info->u.hvm.hpet)); > + xc_set_hvm_param(handle, domid, HVM_PARAM_STUBDOM_VTPM, > + info->num_vtpms); > #endif > xc_hvm_param_set(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info)); > xc_hvm_param_set(handle, domid, HVM_PARAM_VPT_ALIGN, > diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c > index 78f519d..39e4c11 100644 > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -5696,6 +5696,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg) > > break; > } > + case HVM_PARAM_STUBDOM_VTPM: > + rc = 0; > + break; > } > > if ( rc == 0 ) > diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h > index 3c51072..333c131 100644 > --- a/xen/include/public/hvm/params.h > +++ b/xen/include/public/hvm/params.h > @@ -56,6 +56,7 @@ > > #if defined(__i386__) || defined(__x86_64__) > > +#define HVM_PARAM_STUBDOM_VTPM 8 New params should be added to the end of the number range. 8 is not up for grabs. ~Andrew > /* > * Viridian enlightenments > *