All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: "Juergen Gross" <jgross@suse.com>, "Wei Liu" <wl@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monne" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH v3 2/4] x2APIC: simplify resume
Date: Tue, 15 Oct 2019 17:47:34 +0200	[thread overview]
Message-ID: <20191015154736.19882-3-roger.pau@citrix.com> (raw)
In-Reply-To: <20191015154736.19882-1-roger.pau@citrix.com>

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 <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
I'm Ccing Marek since I think he usually tests suspend/resume. Could
you give this patch a try?
---
Cc: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Cc: Juergen Gross <jgross@suse.com>
---
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)
 
 static void resume_x2apic(void)
 {
-    struct IO_APIC_route_entry **ioapic_entries = NULL;
-
-    ASSERT(x2apic_enabled);
-
-    ioapic_entries = 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);
 }
 
 void setup_local_APIC(void)
-- 
2.23.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-10-15 15:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 15:47 [Xen-devel] [PATCH v3 0/4] iommu: fixes for interrupt remapping enabling Roger Pau Monne
2019-10-15 15:47 ` [Xen-devel] [PATCH v3 1/4] iommu/amd: support all delivery modes with x2APIC Roger Pau Monne
2019-10-25 13:17   ` Jan Beulich
2019-10-15 15:47 ` Roger Pau Monne [this message]
2019-10-17  8:26   ` [Xen-devel] [PATCH v3 2/4] x2APIC: simplify resume Marek Marczykowski-Górecki
2019-10-17 15:14     ` Roger Pau Monné
2019-10-24  8:42   ` Jan Beulich
2019-10-15 15:47 ` [Xen-devel] [PATCH v3 3/4] x2APIC: translate IO-APIC entries when enabling the IOMMU Roger Pau Monne
2019-10-24  8:43   ` Jan Beulich
2019-10-15 15:47 ` [Xen-devel] [PATCH v3 4/4] iommu: translate IO-APIC pins when enabling interrupt remapping Roger Pau Monne
2019-10-21  5:33 ` [Xen-devel] [PATCH v3 0/4] iommu: fixes for interrupt remapping enabling Jürgen Groß
2019-10-25 13:19 ` Jan Beulich
2019-10-25 13:22   ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015154736.19882-3-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.