From nobody Tue Feb 10 01:59:06 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; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1571154565; cv=none; d=zoho.com; s=zohoarc; b=X+IFAJwhVifT6OY6wolxj8nXCBenLpr//W4h681XOQbwak4HACT29Xp/e/YOLs/LdV4L1yODQQA9squ5zOS7ZSYcZCHK7xzM1On2I2IIb8jXDoNslM6sO3oZNA2r0ml0CubzJAy4VkAhDk/NlQ4Xo+12yA88ci4QmrOk7zX5hVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571154565; 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=3JxO4kSLeiv3yCW/jQua0aGMqeitF2kFQsU7TvJa1j0=; b=LQiCKLsVfTRsclL6F03CE234F7jtlcuqXFnZW4PeyjBYOXb1HF3r3pLQYpra79ewwJLz8p+AjnASG8KvXgbByMQnRYi+wzcUWXMVFhVJ8gjSEF/ndWMmbv/u5ZztPbDj6Dzk7NNGvrsdmPP+Ow/Oo86kIcRyCNvrG6mxWW0BFBw= 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; 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 1571154565932910.5639777274964; Tue, 15 Oct 2019 08:49:25 -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 1iKP3i-0006uQ-BX; Tue, 15 Oct 2019 15:48:26 +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 1iKP3g-0006u8-Ua for xen-devel@lists.xenproject.org; Tue, 15 Oct 2019 15:48:24 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 338a037f-ef63-11e9-9396-12813bfff9fa; Tue, 15 Oct 2019 15:48:16 +0000 (UTC) X-Inumbo-ID: 338a037f-ef63-11e9-9396-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1571154496; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CwG9FoDNNaNrnAzwi1LDXmD0Mhp0qmEEwxaNTwdnO6I=; b=hQhuFvy68vtkUXgmq94YW10qcmIJH1Hf5CP2rrMxDFHSl3DVDa+evBK/ LmpSertAZEia9gM+/oDmSrD8NM7SVyKfEM1AT1unCGoYq6Wu1QA9BcTXE H2Y32XSzFJeUL3D+JK+fuxufU3n21K7Dcd+sXSXZ92Z7r+zv/EvUqxEAY E=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@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 (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@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 (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: CypyybIhGXy+DnSwugSYaLxDky0P8mB01N9i6dxeoE7/3NGpId1CEPIVq4wqWZJokYaECbKK2s J/Xi6Wg/wNr/896CsJU7LtfXqN7twarZeHTR9t+hjr6wGu84i9/S2ambYKmRr7t9/6R83ILse+ hmFOVbIqLFCOJsASNO1wSYUs5WkrILYHfZ7iqOUkTNmzWgW+HoXBs1XhHsKXdJOqsceVsny6uV YZ80yqhhRws5WVXk7DRkYU53BtoPFmRncQ64RGlhkY5Lo+BaSKRqfY904gN2AubCRY1GvoE6SB rvM= X-SBRS: 2.7 X-MesageID: 7228589 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.67,300,1566878400"; d="scan'208";a="7228589" From: Roger Pau Monne To: Date: Tue, 15 Oct 2019 17:47:34 +0200 Message-ID: <20191015154736.19882-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191015154736.19882-1-roger.pau@citrix.com> References: <20191015154736.19882-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 2/4] x2APIC: simplify resume 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: Juergen Gross , Wei Liu , Andrew Cooper , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Roger Pau Monne 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) There's no need to save and restore the IO-APIC entries, the entries prior to suspension have already been saved by ioapic_suspend, and will be restored by ioapic_resume. Note that at the point where resume_x2apic gets called the IO-APIC has not yet resumed, and hence all entries should be masked. Note this shouldn't introduce any functional change. Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Jan Beulich Tested-by: Marek Marczykowski-G=C3=B3recki --- I'm Ccing Marek since I think he usually tests suspend/resume. Could you give this patch a try? --- Cc: Marek Marczykowski-G=C3=B3recki Cc: Juergen Gross --- Changes since v2: - New in this version. --- xen/arch/x86/apic.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 6cdb50cf41..0607eb92a8 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -492,35 +492,8 @@ static void __enable_x2apic(void) =20 static void resume_x2apic(void) { - struct IO_APIC_route_entry **ioapic_entries =3D NULL; - - ASSERT(x2apic_enabled); - - ioapic_entries =3D alloc_ioapic_entries(); - if ( !ioapic_entries ) - { - printk("Allocate ioapic_entries failed\n"); - goto out; - } - - if ( save_IO_APIC_setup(ioapic_entries) ) - { - printk("Saving IO-APIC state failed\n"); - goto out; - } - - mask_8259A(); - mask_IO_APIC_setup(ioapic_entries); - iommu_enable_x2apic(); __enable_x2apic(); - - restore_IO_APIC_setup(ioapic_entries); - unmask_8259A(); - -out: - if ( ioapic_entries ) - free_ioapic_entries(ioapic_entries); } =20 void setup_local_APIC(void) --=20 2.23.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel