From nobody Fri Mar 29 02:39:14 2024 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=1565679214; cv=none; d=zoho.com; s=zohoarc; b=bzHtg9ILe0a+QT9QQ1slAksOPX6fFK/gJY7raOB5dzmqBFbdOE7KqJBVsG3ULU1wnulVmvMCjJg/oyaI0Ng4Mgjl0FPLPhLLdionIzHPsxjsYy/sPo3zR6AuhrnThmrhpAN52yt9We6GX0rZtHDxJA/tAKW7V+lmZcfSgnh9qp4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565679214; 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=2jux2Fj8AfFc0ajPtEpiDsWZnwpMybxf3juuNYIviwM=; b=a0NIOng0EpOJ9YfbMrk56S6x2MkKMpEe16+jmzIq5wKNnvNksrlTu+eMFU4Zej5SiksE0xWuFT/HOYQrAJnU2gT62KRZdFZ9nCDOLw4xbdr+E+wl431M6UR06jGKk8bAqNSH508+Lf8ZT/7kEJFTHF2UCVTDpiZqkhfIfqHpFZg= 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 1565679214289600.1497706555953; Mon, 12 Aug 2019 23:53:34 -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 1hxQg0-0001p1-1A; Tue, 13 Aug 2019 06:53:00 +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 1hxQfy-0001oO-Bz for xen-devel@lists.xenproject.org; Tue, 13 Aug 2019 06:52:58 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 00d605ca-bd2e-11e9-a4bd-4f04aca9e9dc; Mon, 12 Aug 2019 18:21:29 +0000 (UTC) X-Inumbo-ID: 00d605ca-bd2e-11e9-a4bd-4f04aca9e9dc DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1565634090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=InI86ARDp05rfgUT6XN4llH4qPv71cEWM6vgKIKC5FE=; b=Kh22vbo1QcZI1d2vENVkvBxFsp9iIJnOZWYW9hE5vpApltBLFXlQ0j8j SfoHBzbpvWbX56pYEF7YXYoKK2NUxYuSBY66TcqSCrWh/LlLgeY2bGPP4 KG0BRlaLeqCYC8D8EptqAXyw1IKLjLo1X2pROZhgPDzYDF8YRm4/MltjU M=; 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 (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 (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 ~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: VB5UtwPqpcQUD+JyVbb8LpZ1ErfWXoAUQHS5B3npvX0YC/f1l4/bsocYzcYc6Y9tPQ+4z+mRGb yXyFNo37/834NIErHd2t02G1hVDw1zyBQLGZX71SyFl33vkBGEuL0PsP/1b1Vw23ehmbFcvTXJ v2EyT92u8rXSI9q/wvR3vBbDOsZnv7Zj77Gs0lPDBJZE9N6HwWx7pHioA060NALybN64Kvd0vu 9F8KPHYu1DYWFX4x7HKZhK7QqSsLuyMiFwpFU64BGPIQTnOIOKnvbor/2qrdNDuvA1FYXbMB9r 7mI= X-SBRS: 2.7 X-MesageID: 4170047 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.64,378,1559534400"; d="scan'208";a="4170047" From: Andrew Cooper To: Xen-devel Date: Mon, 12 Aug 2019 19:21:23 +0100 Message-ID: <20190812182125.18094-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190812182125.18094-1-andrew.cooper3@citrix.com> References: <20190812182125.18094-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/suspend: Sanity check more properties in enter_state() 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 , 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 logic depends on being run on CPU0, and in IDLE context. Having this explicitly identified allows for simplification of the whole S3 path. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/power.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c index aecc754fdb..d83e8cdd52 100644 --- a/xen/arch/x86/acpi/power.c +++ b/xen/arch/x86/acpi/power.c @@ -174,6 +174,8 @@ static int enter_state(u32 state) return -EBUSY; =20 BUG_ON(system_state !=3D SYS_STATE_active); + BUG_ON(!is_idle_vcpu(current)); + BUG_ON(smp_processor_id() !=3D 0); system_state =3D SYS_STATE_suspend; =20 printk(XENLOG_INFO "Preparing system for ACPI S%d state.\n", state); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel