From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v5 RFC 11/14] tools/libxc: x86 HVM save code Date: Thu, 12 Jun 2014 18:07:02 +0100 Message-ID: <5399DE36.8010704@citrix.com> References: <1402510482-21099-1-git-send-email-andrew.cooper3@citrix.com> <1402510482-21099-12-git-send-email-andrew.cooper3@citrix.com> <5399CD67.10109@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5399CD67.10109@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: David Vrabel Cc: Frediano Ziglio , Xen-devel List-Id: xen-devel@lists.xenproject.org On 12/06/14 16:55, David Vrabel wrote: > On 11/06/14 19:14, Andrew Cooper wrote: >> --- /dev/null >> +++ b/tools/libxc/saverestore/save_x86_hvm.c > ... >> +static int write_hvm_params(struct context *ctx) >> +{ > ... >> + >> + for ( i = 0; i < ARRAY_SIZE(params); i++ ) >> + { >> + uint32_t index = params[i]; >> + uint64_t value; >> + >> + rc = xc_get_hvm_param(xch, ctx->domid, index, (unsigned long *)&value); >> + if ( rc ) >> + { >> + /* Gross XenServer hack. Consider HVM_PARAM_CONSOLE_PFN failure >> + * nonfatal. This is related to the fact it is impossible to >> + * distinguish "no console" from a console at pfn/evtchn 0. >> + * >> + * TODO - find a compatible way to fix this. >> + */ >> + if ( index == HVM_PARAM_CONSOLE_PFN ) >> + continue; > Um. Is this really needed with upstream Xen? > > David What is needed with upstream Xen is way of representing "no console". The XenServer way of unconditionally failing the get_param hypercall with -EINVAL is not suitable. This particular hack however shouldn't have slipped in. It comes as a side effect of testing this series under XenServer. ~Andrew