From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [RFC PATCH 04/10] tools: Add support for new HVM params Date: Fri, 13 Dec 2013 18:23:44 -0500 Message-ID: <52AB9700.40306@terremark.com> References: <1386875718-28166-1-git-send-email-dslutz@terremark.com> <1386875718-28166-5-git-send-email-dslutz@terremark.com> <52AA3A88.6060102@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52AA3A88.6060102@citrix.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: Andrew Cooper Cc: Keir Fraser , Ian Campbell , Stefano Stabellini , Jun Nakajima , Ian Jackson , Eddie Dong , Don Slutz , xen-devel@lists.xen.org, Jan Beulich , Boris Ostrovsky , Suravee Suthikulpanit List-Id: xen-devel@lists.xenproject.org On 12/12/13 17:36, Andrew Cooper wrote: > On 12/12/2013 19:15, Don Slutz wrote: >> From: Don Slutz [snip] >> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl >> index 649ce50..71ba64e 100644 >> --- a/tools/libxl/libxl_types.idl >> +++ b/tools/libxl/libxl_types.idl >> @@ -346,6 +346,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ >> ("timeoffset", string), >> ("hpet", libxl_defbool), >> ("vpt_align", libxl_defbool), >> + ("vmware_hw", integer), >> + ("vmport_logmask", integer), > "integer" in the IDL is 24 bit is it not? I would suggest uint64 to > match the param width. > Will do. >> ("timer_mode", libxl_timer_mode), >> ("nested_hvm", libxl_defbool), >> ("smbios_firmware", string), >> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c >> index bd26bcc..013066d 100644 >> --- a/tools/libxl/xl_cmdimpl.c >> +++ b/tools/libxl/xl_cmdimpl.c >> @@ -987,6 +987,16 @@ static void parse_config_data(const char *config_source, >> xlu_cfg_get_defbool(config, "acpi_s4", &b_info->u.hvm.acpi_s4, 0); >> xlu_cfg_get_defbool(config, "nx", &b_info->u.hvm.nx, 0); >> xlu_cfg_get_defbool(config, "viridian", &b_info->u.hvm.viridian, 0); >> + if (!xlu_cfg_get_long(config, "vmware_hw", &l, 1)) { >> + b_info->u.hvm.vmware_hw = l; >> + if (dom_info->debug) >> + fprintf(stderr, "vmware_hw: 0x%llx\n", (unsigned long long) b_info->u.hvm.vmware_hw); > PRIx64 and no cast please. Also will do. >> + } >> + if (!xlu_cfg_get_long(config, "vmport_logmask", &l, 1)) { >> + b_info->u.hvm.vmport_logmask = l; >> + if (dom_info->debug) >> + fprintf(stderr, "vmport_logmask: 0x%llx\n", (unsigned long long) b_info->u.hvm.vmport_logmask); >> + } >> xlu_cfg_get_defbool(config, "hpet", &b_info->u.hvm.hpet, 0); >> xlu_cfg_get_defbool(config, "vpt_align", &b_info->u.hvm.vpt_align, 0); >> >> diff --git a/tools/libxl/xl_sxp.c b/tools/libxl/xl_sxp.c >> index a16a025..9010c42 100644 >> --- a/tools/libxl/xl_sxp.c >> +++ b/tools/libxl/xl_sxp.c > The sxp is strictly for xm compatibility. New features should not > extend it. Ok, will drop this file change. >> @@ -102,6 +102,10 @@ void printf_info_sexp(int domid, libxl_domain_config *d_config) >> printf("\t\t\t(nx %s)\n", libxl_defbool_to_string(b_info->u.hvm.nx)); >> printf("\t\t\t(viridian %s)\n", >> libxl_defbool_to_string(b_info->u.hvm.viridian)); >> + printf("\t\t\t(vmware_hw %d)\n", >> + b_info->u.hvm.vmware_hw); >> + printf("\t\t\t(vmport_logmask %x)\n", >> + b_info->u.hvm.vmport_logmask); >> printf("\t\t\t(hpet %s)\n", >> libxl_defbool_to_string(b_info->u.hvm.hpet)); >> printf("\t\t\t(vpt_align %s)\n", >> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c >> index 6a7a781..38641c4 100644 >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -589,6 +589,7 @@ int hvm_domain_initialise(struct domain *d) >> >> d->arch.hvm_domain.params[HVM_PARAM_HPET_ENABLED] = 1; >> d->arch.hvm_domain.params[HVM_PARAM_TRIPLE_FAULT_REASON] = SHUTDOWN_reboot; >> + d->arch.hvm_domain.params[HVM_PARAM_VMPORT_RESET_TIME] = 15; >> >> vpic_init(d); >> > This should probably be part of the patch which introduced the params. > > ~Andrew Yes, patch #2 and #4 will be combined. -Don Slutz