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: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>, Jan Beulich <jbeulich@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v3 1/7] xen/pvshim: map vcpu_info earlier for APs
Date: Thu, 18 Jan 2018 11:02:46 +0000	[thread overview]
Message-ID: <20180118110252.41504-2-roger.pau@citrix.com> (raw)
In-Reply-To: <20180118110252.41504-1-roger.pau@citrix.com>

Or else init_percpu_time is going to dereference a NULL pointer when
trying to access vcpu_info.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Should be backported to the 4.10.0-shim-comet branch.
---
 xen/arch/x86/smpboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 63ca053b35..2cdd431b5f 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -349,6 +349,9 @@ void start_secondary(void *unused)
     else
         microcode_resume_cpu(cpu);
 
+    if ( xen_guest )
+        hypervisor_ap_setup();
+
     smp_callin();
 
     init_percpu_time();
@@ -376,9 +379,6 @@ void start_secondary(void *unused)
     cpumask_set_cpu(cpu, &cpu_online_map);
     unlock_vector_lock();
 
-    if ( xen_guest )
-        hypervisor_ap_setup();
-
     /* We can take interrupts now: we're officially "up". */
     local_irq_enable();
     mtrr_ap_init();
-- 
2.15.1


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

  reply	other threads:[~2018-01-18 11:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 11:02 [PATCH v3 0/7] xen/pvshim: fixes for staging Roger Pau Monne
2018-01-18 11:02 ` Roger Pau Monne [this message]
2018-01-18 11:02 ` [PATCH v3 2/7] xen/pvh: place the trampoline starting at MFN 1 Roger Pau Monne
2018-01-18 11:02 ` [PATCH v3 3/7] xen/pvshim: identity pin shim vCPUs to pCPUs Roger Pau Monne
2018-01-18 11:02 ` [PATCH v3 4/7] xen/pvshim: re-order replace_va_mapping code Roger Pau Monne
2018-01-18 11:02 ` [PATCH v3 5/7] xen/pvshim: fix coding style issues Roger Pau Monne
2018-01-18 11:02 ` [PATCH v3 6/7] firmware/shim: fix build process to use POSIX find options Roger Pau Monne
2018-01-18 11:13   ` Ian Jackson
2018-01-18 11:14   ` Wei Liu
2018-01-18 11:02 ` [PATCH v3 7/7] xen/pvshim: switch shim.c to use typesafe mfn_to_page and virt_to_mfn Roger Pau Monne
2018-01-18 11:06   ` Andrew Cooper
2018-01-18 11:12   ` Wei Liu

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=20180118110252.41504-2-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wei.liu2@citrix.com \
    --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.