From nobody Mon Feb 9 19:07:45 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580921505883589.8072915399457; Wed, 5 Feb 2020 08:51:45 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izNtT-0000Sg-5g; Wed, 05 Feb 2020 16:51:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izNtR-0000S9-D2 for xen-devel@lists.xenproject.org; Wed, 05 Feb 2020 16:51:13 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b1dc2e78-4837-11ea-915c-12813bfff9fa; Wed, 05 Feb 2020 16:51:03 +0000 (UTC) X-Inumbo-ID: b1dc2e78-4837-11ea-915c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1580921464; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=4Oa6M4WM6CGr9S2ZAmXGocXyWxGoZB+1v9DkZxuf6vk=; b=em/wVdcDJlKk7OTQfnsPVE5AwFYR+eerDePxIdSG8JM8EljE7eGNw9qO jFgo3aF/woy2tQeAAV2LhBFGc8SRMUzCfsTXDElob8cplG9lJQ7oHzc+z tt4+LGd7Wid7bZAIMabE1UhVg461/wPWAqnK7H790ODPOCP6AHtGdSpfn 0=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: kgo0xgdk/kqQRdU5w13717eY8Du0SX/rid1Uwwtq3KGFfMNrRtJv6nNZOkzq3j+zU5D2eK3dzj f19Z88yFny6+x3vI1mAflFPBz9NNXVjyDzv74PoB7ot30DyoHGfBvvu7vIqhBIssTOSSBZM1Lx sF1F/fiidjWa5D+wKJYSrDdOgk7NqWcUH7mdINg1ZucU9RsRi3v9t0enmr/vnYlPhEaVjz8b+O pU9aLdQbdMRcZMleLAsXaTNaxhIePOOrzeKh8Swq2Py0J6nBdMn5vSYUavLeN9oppjZPCtwXIx Q+A= X-SBRS: 2.7 X-MesageID: 12001776 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.70,406,1574139600"; d="scan'208";a="12001776" From: Andrew Cooper To: Xen-devel Date: Wed, 5 Feb 2020 16:50:55 +0000 Message-ID: <20200205165056.11734-6-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200205165056.11734-1-andrew.cooper3@citrix.com> References: <20200205165056.11734-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 5/6] tools/libx[cl]: Don't use HVM_PARAM_PAE_ENABLED as a function parameter X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Andrew Cooper , Wei Liu , Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The sole use of HVM_PARAM_PAE_ENABLED is as a non-standard calling conventi= on for xc_cpuid_apply_policy(). Pass PAE as a regular parameter instead. Leave a rather better explaination of why only HVM guests have a choice in = PAE setting. No functional change. Signed-off-by: Andrew Cooper --- CC: Ian Jackson CC: Wei Liu CC: Anthony PERARD --- tools/libxc/include/xenctrl.h | 2 +- tools/libxc/xc_cpuid_x86.c | 15 +++++---------- tools/libxl/libxl_cpuid.c | 14 +++++++++++++- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 311df1ef0f..4eb4f4c2c6 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1807,7 +1807,7 @@ int xc_cpuid_set(xc_interface *xch, int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid, const uint32_t *featureset, - unsigned int nr_features); + unsigned int nr_features, bool pae); int xc_mca_op(xc_interface *xch, struct xen_mc *mc); int xc_mca_op_inject_v2(xc_interface *xch, unsigned int flags, xc_cpumap_t cpumap, unsigned int nr_cpus); diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index 2540aa1e1c..4e74a7ed3b 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -455,7 +455,8 @@ int xc_cpuid_set( } =20 int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid, - const uint32_t *featureset, unsigned int nr_feat= ures) + const uint32_t *featureset, unsigned int nr_feat= ures, + bool pae) { int rc; xc_dominfo_t di; @@ -579,8 +580,6 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t d= omid, } else { - uint64_t val; - /* * Topology for HVM guests is entirely controlled by Xen. For now= , we * hardcode APIC_ID =3D vcpu_id * 2 to give the illusion of no SMT. @@ -635,14 +634,10 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t= domid, } =20 /* - * HVM_PARAM_PAE_ENABLED is a parameter to this function, stashed = in - * Xen. Nothing else has ever taken notice of the value. + * PAE used to be a parameter passed to this function by + * HVM_PARAM_PAE_ENABLED. It is now passed normally. */ - rc =3D xc_hvm_param_get(xch, domid, HVM_PARAM_PAE_ENABLED, &val); - if ( rc ) - goto out; - - p->basic.pae =3D val; + p->basic.pae =3D pae; =20 /* * These settings are necessary to cause earlier HVM_PARAM_NESTEDH= VM / diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index 49d3ca5b26..8c49e34125 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -416,8 +416,20 @@ void libxl__cpuid_legacy(libxl_ctx *ctx, uint32_t domi= d, libxl_cpuid_policy_list cpuid =3D info->cpuid; int i; char *cpuid_res[4]; + bool pae =3D true; + + /* + * PAE is a Xen-controlled for PV guests (it is the 'p' that causes the + * difference between the xen-3.0-x86_32 and xen-3.0-x86_32p ABIs). I= t is + * mandatory as Xen is running in 64bit mode. + * + * PVH guests don't have a top-level PAE control, and is treated as + * available. + */ + if (info->type =3D=3D LIBXL_DOMAIN_TYPE_HVM) + pae =3D libxl_defbool_val(info->u.hvm.pae); =20 - xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0); + xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0, pae); =20 if (!cpuid) return; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel