From nobody Sat Feb 7 05:49:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1565693720; cv=none; d=zoho.com; s=zohoarc; b=USDD41zUT5Hgj0uTUmJ/CvIVcn5sKK0ZKaoR4potoH4Gfn3TA9E5X++ZBqhVMWOOF714hb0nEj7FBhmoZ+pfKCIgB3TugEhXn6klSiZk6GNzQ17IQZyIknJvt1KNc159ipRMRsedXWlWrm/Ypgkh2jhnuddonuMXqrQoMCH0b2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565693720; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TBLh3vElXpid7IdqeCUUSs9hHkqPP2vrmfbqCUuXqQk=; b=VMuG0Ak5e4QOKZTOqvLdfetUHTeXJyRgLY6KkCJJwuU6OQ8wLMvLzMoIe1LnN9hyWtyR7xB0sLeAwDQ0RdMOC2c/4NFTrLUv+CtUMjzH9J46n35ZKbLD/lxvL6LvIGBMCnAwXgtqb9SAPwfLzW0yCHfvrbEWiV+uAFF4Jj0n5AQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15656937202961012.907057605073; Tue, 13 Aug 2019 03:55:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxURI-0002Wq-Ia; Tue, 13 Aug 2019 10:54:04 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hxURH-0002WP-In for xen-devel@lists.xenproject.org; Tue, 13 Aug 2019 10:54:03 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a92ba39e-bdb8-11e9-9fcc-27bbbe29133e; Tue, 13 Aug 2019 10:54:02 +0000 (UTC) X-Inumbo-ID: a92ba39e-bdb8-11e9-9fcc-27bbbe29133e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1565693642; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p+gI0ZKyLHYvavp9A9GRbSgdMOeMaOJ2xE7mKOy3I3Y=; b=I3i2xbjHYYuo0NRl0r8waLiKm3Dq4YLGUtdFoaKAJmcf6HftTAPyq+kZ paNHbEOCgE3WWwR/iHIAMeYt7oHnzcixuv6uvUn3+ydG+ef4ZOMVNamGt nMccJ01mFeSOYTZ5Ttj8BLErJhGojqP6uFr9a7Ygt5dsfu+1t9twgCHEM k=; Authentication-Results: esa3.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 (zoho.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.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=esa3.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 (esa3.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=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: H8y8SNDjGC9Q7vYu9uqReRjuu903JkZ4Rl0u7QgahrMHg486HYbpb0zZWgQYXQPWqQZBeFagHc hpn1FSchmmnfVkphZL3eUmFiO2wu6tf4j4G/yYIgg3PEd3op5FHHmwWr5FE6dc8ZP+4Sd7v8ji K1m/oq6WDbnH/dMxeb9qaXwZOJoAVp0AjeSX99moQzY+TjnAgOiDNYRlKwmh1jQaeIc1af3REB jLXjg7uxBsQIGKOSmtuWNPL9kHqNyK4AkVNFQtUZGAHb6MdxyZyhOzty9VLwzncAdHFuRN1tSO jNU= X-SBRS: 2.7 X-MesageID: 4208596 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,381,1559534400"; d="scan'208";a="4208596" From: Andrew Cooper To: Xen-devel Date: Tue, 13 Aug 2019 11:53:52 +0100 Message-ID: <20190813105352.32412-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190813105352.32412-1-andrew.cooper3@citrix.com> References: <20190813105352.32412-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/2] xen: Drop XEN_DOMCTL_{get, set}_machine_address_size 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 , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Rob Hoes , Christian Lindig , Jan Beulich , Ian Jackson , Daniel De Graaf , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= 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) This functionality is obsolete. It was introduced by c/s 41296317a31 into Xend, but was never exposed in libxl. Nothing limits this to PV guests, but it makes no sense for HVM guests. Looking through the XenServer templates, this was used to work around bugs = in the 32bit RHEL/CentOS 4.7 and 4.8 kernels (fixed in 4.9) and RHEL/CentOS/OEL 5.2 and 5.3 kernels (fixed in 5.4). RHEL 4 as a major version went out of support in 2017, whereas the 5.2/5.3 kernels went out of support when 5.4 w= as released in 2009. Signed-off-by: Andrew Cooper Acked-by: Christian Lindig Acked-by: Marek Marczykowski-G=C3=B3recki Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 CC: Ian Jackson CC: Marek Marczykowski-G=C3=B3recki CC: Daniel De Graaf CC: Christian Lindig CC: Rob Hoes There may be some resulting simplifications which can be made to the heap allocator, but that involves untangling the other address clamping logic first. --- tools/libxc/include/xenctrl.h | 6 ------ tools/libxc/xc_domain.c | 29 ----------------------------- tools/ocaml/libs/xc/xenctrl.ml | 5 ----- tools/ocaml/libs/xc/xenctrl.mli | 5 ----- tools/ocaml/libs/xc/xenctrl_stubs.c | 26 -------------------------- tools/python/xen/lowlevel/xc/xc.c | 23 ----------------------- xen/arch/x86/domctl.c | 12 ------------ xen/include/public/domctl.h | 11 ++--------- xen/xsm/flask/hooks.c | 2 -- xen/xsm/flask/policy/access_vectors | 4 ++-- 10 files changed, 4 insertions(+), 119 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index a36896034a..c92386aab8 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1781,12 +1781,6 @@ int xc_domain_unbind_pt_spi_irq(xc_interface *xch, uint16_t vspi, uint16_t spi); =20 -int xc_domain_set_machine_address_size(xc_interface *xch, - uint32_t domid, - unsigned int width); -int xc_domain_get_machine_address_size(xc_interface *xch, - uint32_t domid); - /* Set the target domain */ int xc_domain_set_target(xc_interface *xch, uint32_t domid, diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 64ca513aae..e544218d2e 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -2161,35 +2161,6 @@ int xc_domain_subscribe_for_suspend( return do_domctl(xch, &domctl); } =20 -int xc_domain_set_machine_address_size(xc_interface *xch, - uint32_t domid, - unsigned int width) -{ - DECLARE_DOMCTL; - - memset(&domctl, 0, sizeof(domctl)); - domctl.domain =3D domid; - domctl.cmd =3D XEN_DOMCTL_set_machine_address_size; - domctl.u.address_size.size =3D width; - - return do_domctl(xch, &domctl); -} - - -int xc_domain_get_machine_address_size(xc_interface *xch, uint32_t domid) -{ - DECLARE_DOMCTL; - int rc; - - memset(&domctl, 0, sizeof(domctl)); - domctl.domain =3D domid; - domctl.cmd =3D XEN_DOMCTL_get_machine_address_size; - - rc =3D do_domctl(xch, &domctl); - - return rc =3D=3D 0 ? domctl.u.address_size.size : rc; -} - int xc_domain_debug_control(xc_interface *xc, uint32_t domid, uint32_t sop= , uint32_t vcpu) { DECLARE_DOMCTL; diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index a57130a3c3..35958b94d5 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -241,11 +241,6 @@ external domain_set_memmap_limit: handle -> domid -> i= nt64 -> unit external domain_memory_increase_reservation: handle -> domid -> int64 -> u= nit =3D "stub_xc_domain_memory_increase_reservation" =20 -external domain_set_machine_address_size: handle -> domid -> int -> unit - =3D "stub_xc_domain_set_machine_address_size" -external domain_get_machine_address_size: handle -> domid -> int - =3D "stub_xc_domain_get_machine_address_size" - external domain_cpuid_set: handle -> domid -> (int64 * (int64 option)) -> string option array -> string option array diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.= mli index 476bbecb90..6c4268d453 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -202,11 +202,6 @@ val pages_to_mib : int64 -> int64 external watchdog : handle -> int -> int32 -> int =3D "stub_xc_watchdog" =20 -external domain_set_machine_address_size: handle -> domid -> int -> unit - =3D "stub_xc_domain_set_machine_address_size" -external domain_get_machine_address_size: handle -> domid -> int - =3D "stub_xc_domain_get_machine_address_size" - external domain_cpuid_set: handle -> domid -> (int64 * (int64 option)) -> string option array -> string option array diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index c4fdc58b2d..2e1b29ce33 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -759,32 +759,6 @@ CAMLprim value stub_xc_domain_memory_increase_reservat= ion(value xch, CAMLreturn(Val_unit); } =20 -CAMLprim value stub_xc_domain_set_machine_address_size(value xch, - value domid, - value width) -{ - CAMLparam3(xch, domid, width); - uint32_t c_domid =3D _D(domid); - int c_width =3D Int_val(width); - - int retval =3D xc_domain_set_machine_address_size(_H(xch), c_domid, c_wid= th); - if (retval) - failwith_xc(_H(xch)); - CAMLreturn(Val_unit); -} - -CAMLprim value stub_xc_domain_get_machine_address_size(value xch, - value domid) -{ - CAMLparam2(xch, domid); - int retval; - - retval =3D xc_domain_get_machine_address_size(_H(xch), _D(domid)); - if (retval < 0) - failwith_xc(_H(xch)); - CAMLreturn(Val_int(retval)); -} - CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid, value input, value config) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/= xc/xc.c index 7e831a26a7..f0430ca85e 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -770,22 +770,6 @@ static PyObject *pyxc_dom_set_cpuid(XcObject *self, =20 return pyxc_create_cpuid_dict(regs_transform); } - -static PyObject *pyxc_dom_set_machine_address_size(XcObject *self, - PyObject *args, - PyObject *kwds) -{ - uint32_t dom, width; - - if (!PyArg_ParseTuple(args, "ii", &dom, &width)) - return NULL; - - if (xc_domain_set_machine_address_size(self->xc_handle, dom, width) != =3D 0) - return pyxc_error_to_exception(self->xc_handle); - - Py_INCREF(zero); - return zero; -} #endif /* __i386__ || __x86_64__ */ =20 static PyObject *pyxc_gnttab_hvm_seed(XcObject *self, @@ -2413,13 +2397,6 @@ static PyMethodDef pyxc_methods[] =3D { "Set the default cpuid policy for a domain.\n" " dom [int]: Identifier of domain.\n\n" "Returns: [int] 0 on success; exception on error.\n" }, - - { "domain_set_machine_address_size", - (PyCFunction)pyxc_dom_set_machine_address_size, - METH_VARARGS, "\n" - "Set maximum machine address size for this domain.\n" - " dom [int]: Identifier of domain.\n" - " width [int]: Maximum machine address width.\n" }, #endif =20 { "dom_set_memshr",=20 diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 34a6f88b8a..1e98fc8009 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -643,18 +643,6 @@ long arch_do_domctl( ASSERT_UNREACHABLE(); break; =20 - case XEN_DOMCTL_set_machine_address_size: - if ( d->tot_pages > 0 ) - ret =3D -EBUSY; - else - d->arch.physaddr_bitsize =3D domctl->u.address_size.size; - break; - - case XEN_DOMCTL_get_machine_address_size: - domctl->u.address_size.size =3D d->arch.physaddr_bitsize; - copyback =3D true; - break; - case XEN_DOMCTL_sendtrigger: { struct vcpu *v; diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 726ce675e8..72d5133cba 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -691,13 +691,6 @@ struct xen_domctl_subscribe { uint32_t port; /* IN */ }; =20 -/* - * Define the maximum machine address size which should be allocated - * to a guest. - */ -/* XEN_DOMCTL_set_machine_address_size */ -/* XEN_DOMCTL_get_machine_address_size */ - /* XEN_DOMCTL_debug_op */ #define XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_OFF 0 #define XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_ON 1 @@ -1165,8 +1158,8 @@ struct xen_domctl { #define XEN_DOMCTL_unbind_pt_irq 48 #define XEN_DOMCTL_set_cpuid 49 #define XEN_DOMCTL_get_device_group 50 -#define XEN_DOMCTL_set_machine_address_size 51 -#define XEN_DOMCTL_get_machine_address_size 52 +/* #define XEN_DOMCTL_set_machine_address_size 51 - Obsolete */ +/* #define XEN_DOMCTL_get_machine_address_size 52 - Obsolete */ /* #define XEN_DOMCTL_suppress_spurious_page_faults 53 - Obsolete */ #define XEN_DOMCTL_debug_op 54 #define XEN_DOMCTL_gethvmcontext_partial 55 diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index fd5ec992cf..6800f2d9a0 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -684,11 +684,9 @@ static int flask_domctl(struct domain *d, int cmd) return current_has_perm(d, SECCLASS_HVM, HVM__GETHVMC); =20 case XEN_DOMCTL_set_address_size: - case XEN_DOMCTL_set_machine_address_size: return current_has_perm(d, SECCLASS_DOMAIN, DOMAIN__SETADDRSIZE); =20 case XEN_DOMCTL_get_address_size: - case XEN_DOMCTL_get_machine_address_size: return current_has_perm(d, SECCLASS_DOMAIN, DOMAIN__GETADDRSIZE); =20 case XEN_DOMCTL_mem_sharing_op: diff --git a/xen/xsm/flask/policy/access_vectors b/xen/xsm/flask/policy/acc= ess_vectors index c9ebd0f37e..76f3d60ddd 100644 --- a/xen/xsm/flask/policy/access_vectors +++ b/xen/xsm/flask/policy/access_vectors @@ -166,9 +166,9 @@ class domain set_target # SCHEDOP_remote_shutdown shutdown -# XEN_DOMCTL_set{,_machine}_address_size +# XEN_DOMCTL_set_address_size setaddrsize -# XEN_DOMCTL_get{,_machine}_address_size +# XEN_DOMCTL_get_address_size getaddrsize # XEN_DOMCTL_sendtrigger trigger --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel