From nobody Mon Feb 9 11:30:49 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 ARC-Seal: i=1; a=rsa-sha256; t=1576263947; cv=none; d=zohomail.com; s=zohoarc; b=PrPqo7wYmrMGEvWdQ4RlzoTOr05p9KnSr922AvRxVNrS5NHg/RkMq7ZZzUDc4VwUS+SbW9cA6V6gEuB5xzTfP2i0SptHpLOe6DKEkD0lgywIbZpTU/GpLSuxmflLepb5Bzux2MsK/khjjVASECJnedIj+S/DjI9zOtbIkGAXmUk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576263947; 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; bh=XAKhYT+/B9tAf1vqw/PYAWbn/AyChG8OzVAk0REPNFo=; b=lh63n014BMnV7nxUBTVa3U2YIL4K2lTInu2YdlJ6coj0bB2ew9ShRqNHZRXHt+JRX+pRpWoYo7+48EzsRR1C0jAilG/bEh+oSsUQu42ZMvQsB/k2VNQztqF62Ib7I35wrTgZzJPlAPVcWfHhppIxwqA4OTCinXebd05kyiF1SA8= 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 1576263947245615.1621036945281; Fri, 13 Dec 2019 11:05:47 -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 1ifqFG-000096-Nq; Fri, 13 Dec 2019 19:04:58 +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 1ifqFF-00008b-Cm for xen-devel@lists.xenproject.org; Fri, 13 Dec 2019 19:04:57 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6b450204-1ddb-11ea-8fd3-12813bfff9fa; Fri, 13 Dec 2019 19:04:42 +0000 (UTC) X-Inumbo-ID: 6b450204-1ddb-11ea-8fd3-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1576263883; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EJgMFJt/RS3x/ZD3KvpyYE+R3JWErTfXnkRvySsPS6s=; b=FWUCyF3UrO1BHozHiin4pKOTHM3IUl1cyE84AUWDPxOneP9552hxA9Sr iYe2c/h3JlFJs/XLYmj5TGTU4xwMs6k6J7d4bqKDezc/pGkg6N7fVezK9 e8Tk2bEkck7e0AD7ElnPwZFgzXHAiQXbJuFmK+/BWqs4keCETqt68qHAS E=; 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: 8k5xsDKfWOc+feNupSDJ+qIb8M+r/lkd0jA/ySDSYCOJ6QVzpLj3xxEtPY240VYnrZ4ptNONtx sACk54q3vFGUnViGGUUoNoBVyEN4ZtwMO/NeBpNwXUmHCCItWBctBxV01miwhMTLJmRIGiyYDJ eqbacnD2FB2qEHxfez9yQl8aQ4Nmr/SdJf/fUfAJ1jLFn13otiapH3uFLrYXYbaRC4VuZ/XZnQ 3WvQFsmSm5DeCOlF/3C/rlmZyJpIDX0hYIS4VCWJFAsalfgOo+E0VSG1CyINqd3CwgZPF27wVW BMo= X-SBRS: 2.7 X-MesageID: 9794915 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,309,1571716800"; d="scan'208";a="9794915" From: Andrew Cooper To: Xen-devel Date: Fri, 13 Dec 2019 19:04:33 +0000 Message-ID: <20191213190436.24475-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191213190436.24475-1-andrew.cooper3@citrix.com> References: <20191213190436.24475-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 3/6] x86/suspend: Don't save unnecessary GPRs 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) Only the callee-preserved registers need saving/restoring. Spill them to t= he stack like regular functions do. %rsp is now the only GPR which gets stash= ed in .data Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monn=C3=A9 --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/wakeup_prot.S | 59 +++++++++----------------------------= ---- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_pro= t.S index 35fd7a5e9f..2f6c8e18ef 100644 --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -11,24 +11,14 @@ #define REF(x) x(%rip) =20 ENTRY(do_suspend_lowlevel) + push %rbp + push %rbx + push %r12 + push %r13 + push %r14 + push %r15 =20 SAVE_GREG(sp) - SAVE_GREG(ax) - SAVE_GREG(bx) - SAVE_GREG(cx) - SAVE_GREG(dx) - SAVE_GREG(bp) - SAVE_GREG(si) - SAVE_GREG(di) - - SAVE_GREG(8) # save r8...r15 - SAVE_GREG(9) - SAVE_GREG(10) - SAVE_GREG(11) - SAVE_GREG(12) - SAVE_GREG(13) - SAVE_GREG(14) - SAVE_GREG(15) =20 mov %cr0, GREG(ax) mov GREG(ax), REF(saved_cr0) @@ -75,22 +65,13 @@ ENTRY(s3_resume) =20 call restore_rest_processor_state =20 - LOAD_GREG(bp) - LOAD_GREG(ax) - LOAD_GREG(bx) - LOAD_GREG(cx) - LOAD_GREG(dx) - LOAD_GREG(si) - LOAD_GREG(di) - LOAD_GREG(8) # save r8...r15 - LOAD_GREG(9) - LOAD_GREG(10) - LOAD_GREG(11) - LOAD_GREG(12) - LOAD_GREG(13) - LOAD_GREG(14) - LOAD_GREG(15) .Lsuspend_err: + pop %r15 + pop %r14 + pop %r13 + pop %r12 + pop %rbx + pop %rbp ret =20 .data @@ -101,21 +82,5 @@ GLOBAL(saved_magic) =20 .align 8 DECLARE_GREG(sp) -DECLARE_GREG(bp) -DECLARE_GREG(ax) -DECLARE_GREG(bx) -DECLARE_GREG(cx) -DECLARE_GREG(dx) -DECLARE_GREG(si) -DECLARE_GREG(di) - -DECLARE_GREG(8) -DECLARE_GREG(9) -DECLARE_GREG(10) -DECLARE_GREG(11) -DECLARE_GREG(12) -DECLARE_GREG(13) -DECLARE_GREG(14) -DECLARE_GREG(15) =20 saved_cr0: .quad 0 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel