From patchwork Mon Sep 9 13:47:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11137953 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5DFA924 for ; Mon, 9 Sep 2019 13:48:30 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0F9420828 for ; Mon, 9 Sep 2019 13:48:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="CDoib4VS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0F9420828 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i7K0Z-0005EV-Ku; Mon, 09 Sep 2019 13:47:07 +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 1i7K0Y-0005EQ-Ce for xen-devel@lists.xenproject.org; Mon, 09 Sep 2019 13:47:06 +0000 X-Inumbo-ID: 4ead8f4e-d308-11e9-ac0b-12813bfff9fa Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4ead8f4e-d308-11e9-ac0b-12813bfff9fa; Mon, 09 Sep 2019 13:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1568036824; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZZPKatzjvpvJM+0BL9Uaj4EmUnjuDNrA24QUh/u9/e4=; b=CDoib4VSdUtRxhk2Ar1KXGTAMPEj+lWajJ5IleagIKZrH+D4FJV2A4qJ 3wHu2LYxiuaF0n8KA7b7Dvwz61CvAQQfNi3IovRv6kW9OIVY3JDCzEgvZ MsbASBYo7om9wIedPxXLm5o/DKyTEVTO/exS6PqRZVi9vXYuDj8jFth/p Y=; Authentication-Results: esa5.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 (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.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=esa5.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 ~all" Received-SPF: None (esa5.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=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 4/6G4BvnTzAUYC3OgHn1xQNBJZCdD+5Bsl7apCJm+C+boaSt1X8wwDuRJUODfowcQF7IQlIaVZ T3q2KF0fH4uR/+tV1oFwOGaYfUAiq5COGTslMcrG9F9I0ppnQruuXiM0/s0x7WKiqdr9LGogYu Q3CAv0vSEk0m+u6NW60Rwko+3ta7l+KF6Iq1FxJ9EEh2ajkpbWo+n3+6vmKvL86IvewHDDmPVD 9mUcml1UQWNgRrwNvQYt61woJiiw6sOyTfcIVCIHLJfrymhy5LnP7elcPCdSc94Y3M+PbNJwfo +MI= X-SBRS: 2.7 X-MesageID: 5504432 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,484,1559534400"; d="scan'208";a="5504432" From: Andrew Cooper To: Xen-devel Date: Mon, 9 Sep 2019 14:47:01 +0100 Message-ID: <20190909134701.12477-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190906143021.28261-3-roger.pau@citrix.com> References: <20190906143021.28261-3-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] fixup sysctl/libxl: choose a sane default for HAP 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: Wei Liu , Andrew Cooper , Rob Hoes , Christian Lindig , Ian Jackson , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This delta wants folding to keep the Ocaml stubs in line. Signed-off-by: Andrew Cooper Acked-by: Ian Jackson --- CC: Ian Jackson CC: Wei Liu CC: Roger Pau Monné CC: Christian Lindig CC: Rob Hoes --- tools/ocaml/libs/xc/xenctrl.ml | 1 + tools/ocaml/libs/xc/xenctrl.mli | 1 + tools/ocaml/libs/xc/xenctrl_stubs.c | 3 ++- xen/include/public/sysctl.h | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index cd7e95a6fa..5da7c96cee 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -101,6 +101,7 @@ type physinfo_cap_flag = | CAP_HVM | CAP_PV | CAP_DirectIO + | CAP_HAP type physinfo = { diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli index 0bd06ed920..b4e76b827e 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -86,6 +86,7 @@ type physinfo_cap_flag = | CAP_HVM | CAP_PV | CAP_DirectIO + | CAP_HAP type physinfo = { threads_per_core : int; cores_per_socket : int; diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index ce8dbba437..10b306f9f8 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -690,7 +690,8 @@ CAMLprim value stub_xc_physinfo(value xch) BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_hvm != (1u << 0)); BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_pv != (1u << 1)); BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_directio != (1u << 2)); - BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_MAX != XEN_SYSCTL_PHYSCAP_directio); + BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_hap != (1u << 3)); + BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_MAX != XEN_SYSCTL_PHYSCAP_hap); cap_list = c_bitmap_to_ocaml_list(c_physinfo.capabilities); physinfo = caml_alloc_tuple(10); diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index c325ae496c..d4b455619c 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -95,7 +95,7 @@ struct xen_sysctl_tbuf_op { #define XEN_SYSCTL_PHYSCAP_hap (1u<<_XEN_SYSCTL_PHYSCAP_hap) /* Max XEN_SYSCTL_PHYSCAP_* constant. Used for ABI checking. */ -#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_directio +#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_hap struct xen_sysctl_physinfo { uint32_t threads_per_core;