From owner-svn-src-head@freebsd.org Thu Sep 13 07:07:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE07110A7C9F; Thu, 13 Sep 2018 07:07:13 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E67A834CB; Thu, 13 Sep 2018 07:07:13 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 880C0122B6; Thu, 13 Sep 2018 07:07:13 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8D77D3l022765; Thu, 13 Sep 2018 07:07:13 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8D77DrV022764; Thu, 13 Sep 2018 07:07:13 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201809130707.w8D77DrV022764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 13 Sep 2018 07:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338625 - head/sys/x86/xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/x86/xen X-SVN-Commit-Revision: 338625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 07:07:14 -0000 Author: royger Date: Thu Sep 13 07:07:13 2018 New Revision: 338625 URL: https://svnweb.freebsd.org/changeset/base/338625 Log: xen: fix PV IPI setup So that it's done when the vcpu_id has been set. For the BSP the vcpu_id is set at SUB_INTR, while for the APs it's done in init_secondary_tail that's called at SUB_SMP order FIRST. Reported and tested by: cperciva Approved by: re (gjb) Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D17013 Modified: head/sys/x86/xen/xen_apic.c Modified: head/sys/x86/xen/xen_apic.c ============================================================================== --- head/sys/x86/xen/xen_apic.c Thu Sep 13 07:05:51 2018 (r338624) +++ head/sys/x86/xen/xen_apic.c Thu Sep 13 07:07:13 2018 (r338625) @@ -592,6 +592,6 @@ xen_setup_cpus(void) apic_ops.ipi_vectored = xen_pv_lapic_ipi_vectored; } -/* We need to setup IPIs before APs are started */ -SYSINIT(xen_setup_cpus, SI_SUB_SMP-1, SI_ORDER_FIRST, xen_setup_cpus, NULL); +/* Switch to using PV IPIs as soon as the vcpu_id is set. */ +SYSINIT(xen_setup_cpus, SI_SUB_SMP, SI_ORDER_SECOND, xen_setup_cpus, NULL); #endif /* SMP */