From patchwork Thu Feb 18 18:52:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 8353531 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CF3E6C0553 for ; Thu, 18 Feb 2016 18:55:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 031652039E for ; Thu, 18 Feb 2016 18:55:07 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35F7920397 for ; Thu, 18 Feb 2016 18:55:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWTgg-0002VE-C2; Thu, 18 Feb 2016 18:52:26 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWTge-0002UT-EE for xen-devel@lists.xenproject.org; Thu, 18 Feb 2016 18:52:24 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 59/FD-03066-7E216C65; Thu, 18 Feb 2016 18:52:23 +0000 X-Env-Sender: prvs=84994b707=david.vrabel@citrix.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1455821540!23446232!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38238 invoked from network); 18 Feb 2016 18:52:23 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-6.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 Feb 2016 18:52:23 -0000 X-IronPort-AV: E=Sophos;i="5.22,466,1449532800"; d="scan'208";a="339231519" From: David Vrabel To: Date: Thu, 18 Feb 2016 18:52:10 +0000 Message-ID: <1455821530-4263-6-git-send-email-david.vrabel@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455821530-4263-1-git-send-email-david.vrabel@citrix.com> References: <1455821530-4263-1-git-send-email-david.vrabel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Andrew Cooper , David Vrabel , Jan Beulich Subject: [Xen-devel] [PATCHv1 5/5] x86/domctl: Add XEN_DOMCTL_PARAM_ARCH_X86_FIP_WIDTH parameter X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a parameter to allow the toolstack to set the x87 FIP width in case the hypervisor's heuristics do the wrong thing. 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 {