From patchwork Wed Nov 2 14:10:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9409255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3C5F6022E for ; Wed, 2 Nov 2016 14:13:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E65792A123 for ; Wed, 2 Nov 2016 14:13:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB2F82A138; Wed, 2 Nov 2016 14:13:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46B6A2A128 for ; Wed, 2 Nov 2016 14:13:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1wFY-000083-Vh; Wed, 02 Nov 2016 14:10:44 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1wFY-00007u-3n for xen-devel@lists.xenproject.org; Wed, 02 Nov 2016 14:10:44 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id 0A/ED-24885-3E3F9185; Wed, 02 Nov 2016 14:10:43 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrohUvfRZ8k Ig0/rzCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxpU2QL9rBXnDu9k7mB8T9rFyMnh4SAv8Sz 8zOZQWw2AWWJn529bCC2iICeRNOB54wgNrOAl8SLdf/AbGGBQImbD06B1bAIqEi83TWVCcTmF XCSWLD0NQvETDmJ88d/gs0UElCQ6Jh+DKpGUOLkzCcsEDMlJA6+eAFUwwFUzy3xt9t+AiPPLC RVs5BULWBkWsWoUZxaVJZapGtooZdUlJmeUZKbmJmja2hgrJebWlycmJ6ak5hUrJecn7uJERg g9QwMjDsYf5/2PMQoycGkJMr7+alkhBBfUn5KZUZicUZ8UWlOavEhRhkODiUJXpVPQDnBotT0 1Iq0zBxgqMKkJTh4lER400HSvMUFibnFmekQqVOMuhzvNr97wCTEkpeflyolzrv4I1CRAEhRR mke3AhY3FxilJUS5mVkYGAQ4ilILcrNLEGVf8UozsGoJMyrD7KKJzOvBG7TK6AjmICOME+SAD miJBEhJdXA6CA7Z96cO3PEV+e9yk26LxG1cWsJ8yG5h+a7e5tSHp6pOXpu9yPRnU8KJR6vVLB /KMwt2S79Prt7usLH57GBfhdafa+XqLzd/fpJ3xSndTNn22wPnpzVfSxFJHRnpevEXeF/3Ce8 eMmzS6zzvPSR6NU9J+bYZLkXzPhs9kI7+2v2euaVj9rbviixFGckGmoxFxUnAgDRG9FVlgIAA A== X-Env-Sender: prvs=107ac9648=wei.liu2@citrix.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1478095841!61205910!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.0.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59189 invoked from network); 2 Nov 2016 14:10:42 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 2 Nov 2016 14:10:42 -0000 X-IronPort-AV: E=Sophos;i="5.31,583,1473120000"; d="scan'208";a="387404442" From: Wei Liu To: Xen-devel Date: Wed, 2 Nov 2016 14:10:37 +0000 Message-ID: <1478095837-9524-1-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH for-4.8] libxl: disallow enabling PoD and ALTP2M at the same time X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP That combination would cause Xen to crash. Note that this is not a security issue because ALTP2M is experimental. Signed-off-by: Wei Liu Acked-by: Ian Jackson --- Cc: Ian Jackson Maybe backport this to 4.6 and 4.7? --- tools/libxl/libxl_create.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index d986cd2..47c297b 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -885,6 +885,13 @@ static void initiate_domain_create(libxl__egc *egc, goto error_out; } + if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM && + libxl_defbool_val(d_config->b_info.u.hvm.altp2m) && + pod_enabled) { + LOG(ERROR, "Cannot enable PoD and ALTP2M at the same time"); + goto error_out; + } + /* PV vNUMA is not yet supported because there is an issue with * cpuid handling. */