From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCHv1 5/5] x86/domctl: Add XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH parameter Date: Fri, 19 Feb 2016 10:05:31 +0000 Message-ID: <56C6E8EB.8030605@citrix.com> References: <1455821530-4263-1-git-send-email-david.vrabel@citrix.com> <1455821530-4263-6-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWhwO-0007hI-Jz for xen-devel@lists.xenproject.org; Fri, 19 Feb 2016 10:05:36 +0000 In-Reply-To: <1455821530-4263-6-git-send-email-david.vrabel@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 , xen-devel@lists.xenproject.org Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 18/02/16 18:52, David Vrabel wrote: > Add a parameter to allow the toolstack to set the x87 FIP width in case > the hypervisor's heuristics do the wrong thing. I think this would be better as a HVM param since: a) it only needs to be changed for HVM guests; b) it would allow the guest agent or OS (which may be able to make a better decision) to set it; and c) it can be saved/restored across a migrate. David > > Signed-off-by: David Vrabel > --- > xen/arch/x86/domctl.c | 10 ++++++++++ > xen/include/public/domctl.h | 1 + > 2 files changed, 11 insertions(+) > > diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c > index 3a3ebbf..f75cd69 100644 > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -1415,6 +1415,16 @@ int arch_domctl_param(struct domain *d, uint32_t param, bool_t set, > > switch ( param ) > { > + case XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH: > + *value = d->arch.x87_fip_width; > + if ( set ) > + { > + if ( new_value != 0 && new_value != 4 && new_value != 8 ) > + return -EINVAL; > + d->arch.x87_fip_width = new_value; > + } > + break; > + > default: > return -EINVAL; > } > diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h > index 330b3e7..26d4096 100644 > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -1100,6 +1100,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_psr_cat_op_t); > * > * Not all parameters are valid for all architectures or domain types. > */ > +#define XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH 0 > #define XEN_DOMCTL_PARAM_SET (1u << 31) > > struct xen_domctl_param { >