From nobody Sat May 4 11:46:21 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1578082122; cv=none; d=zohomail.com; s=zohoarc; b=DKWNMQPAlBzZrVlbloEUCgqSE2GhrQVaYLApTqwfy4CoBAV2kIWS6n6x6ePnbDa06RfRlKoMtm9FY3jesWKPEWZxV3ucllalmbpoCWPJnNPa/XqCC0OkHsU549yGRsyc6VcAZvSSrC2f5qZKwf2P4tbfpu1b6bjHNhKT25oZLd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578082122; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=7lxZyYLu2/rBFSKJUH1oJPmfpi9JP50/m62+aVBYD9g=; b=iZp0zleoFvX2bo8e9waD383W4fFNr5kSHKEmkGzesjwuxsXIAJgiRcDnptc0RIk/ebtmAXIgjxgubDy93xCDg25+yb0Ti8ifZRDkUEvrerzhywInS2aobdiMrkcbGYbxADBzFV5pkgGQNApnHnEwZ8CqdcTjwOf8R5yQUVc/kZw= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578082122457548.9683880571075; Fri, 3 Jan 2020 12:08:42 -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 1inTEi-0002QJ-8c; Fri, 03 Jan 2020 20:07:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1inTEh-0002QC-1i for xen-devel@lists.xenproject.org; Fri, 03 Jan 2020 20:07:55 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b4f1efcc-2e64-11ea-88e7-bc764e2007e4; Fri, 03 Jan 2020 20:07:46 +0000 (UTC) X-Inumbo-ID: b4f1efcc-2e64-11ea-88e7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578082066; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yqt6N7b0D2X8YE+6hlfLQhsDXx0pGbB1jO3HS0icmSI=; b=OIC1KN26yGkd74MTRfs+GJGaRCVSw2RQ1xexo1+bd83gyFCk/A0wGze3 b2z+SILGg4k+ZZRrv0pEnmytOJou6jMT0X3cemBwBkwsi6S1Ns4Z/UMSG lXV8p7KqUiM/R42E7FH5adI9/4ueyX5/OpiVBMSfn5h/66Hf4VnenV4zU 4=; Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: HjNmba9fZvMdCOvM/JjLZA5jopsshqCeJVoldCGyKxphKHsc0vCrVVLq1WlWu/efEaJ6OXayzx Hkrzv+edxjX1nErZdx8WCsedZrlS94zqP1CZyJimOheLKbJ3QCcixpMb8YOFQjPaj00RdRhdrj BUB++NmP4CsLFkhjuMa2EyxUsX3L1fzlzQFQrYjJ5hjUfW/JdML8AEvD9lZMjIGuPd3m1aUvVG hrQgODL0SEo526cgjA6Y4mfNObR3HFU/Mo/Lgj106/WiBBlez3C/6Gpst7qyOa+o+c7HekpQ2Y CKo= X-SBRS: 2.7 X-MesageID: 10588783 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,391,1571716800"; d="scan'208";a="10588783" From: Andrew Cooper To: Xen-devel Date: Fri, 3 Jan 2020 20:07:42 +0000 Message-ID: <20200103200742.23917-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/shim: Short circuit control/hardware checks in PV_SHIM_EXCLUSIVE builds 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: Andrew Cooper , Sergey Dyasli , Wei Liu , Jan Beulich , =?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) The net diffstat is: add/remove: 0/13 grow/shrink: 25/129 up/down: 6297/-20469 (-14172) With the following objects/functions removed entirely: iommu_hwdom_none 1 - -1 hwdom_max_order 4 - -4 extra_hwdom_irqs 4 - -4 ctldom_max_order 4 - -4 acpi_c1e_quirk 43 - -43 hvm_pirq_eoi 62 - -62 max_order 94 - -94 conring_puts 104 - -104 propagate_node 119 - -119 mmio_ro_emulate_ops 224 - -224 mmcfg_intercept_ops 224 - -224 pci_cfg_ok 295 - -295 p2m_lock 546 - -546 And the following reduced to stubs: arch_iommu_hwdom_init 852 2 -850 p2m_add_foreign 880 16 -864 Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 CC: Sergey Dyasli --- xen/include/xen/sched.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index a2accd90f6..cc942a3621 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -963,10 +963,22 @@ void watchdog_domain_destroy(struct domain *d); * (that is, this would not be suitable for a driver domain) * - There is never a reason to deny the hardware domain access to this */ -#define is_hardware_domain(_d) evaluate_nospec((_d) =3D=3D hardware_domain) +static always_inline bool is_hardware_domain(const struct domain *d) +{ + if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) ) + return false; + + return evaluate_nospec(d =3D=3D hardware_domain); +} =20 /* This check is for functionality specific to a control domain */ -#define is_control_domain(_d) evaluate_nospec((_d)->is_privileged) +static always_inline bool is_control_domain(const struct domain *d) +{ + if ( IS_ENABLED(CONFIG_PV_SHIM_EXCLUSIVE) ) + return false; + + return evaluate_nospec(d->is_privileged); +} =20 #define VM_ASSIST(d, t) (test_bit(VMASST_TYPE_ ## t, &(d)->vm_assist)) =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel