Date: Thu, 3 Dec 2015 11:05:35 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291687 - in stable/10/sys: dev/xen/control x86/xen Message-ID: <201512031105.tB3B5ZUO064164@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu Dec 3 11:05:35 2015 New Revision: 291687 URL: https://svnweb.freebsd.org/changeset/base/291687 Log: MFC r291024: xen: fix dropping bitmap IPIs during resume Sponsored by: Citrix Systems R&D Modified: stable/10/sys/dev/xen/control/control.c stable/10/sys/x86/xen/hvm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/control/control.c ============================================================================== --- stable/10/sys/dev/xen/control/control.c Thu Dec 3 10:59:10 2015 (r291686) +++ stable/10/sys/dev/xen/control/control.c Thu Dec 3 11:05:35 2015 (r291687) @@ -127,6 +127,7 @@ __FBSDID("$FreeBSD$"); #include <machine/_inttypes.h> #include <machine/intr_machdep.h> +#include <machine/apicvar.h> #include <vm/vm.h> #include <vm/vm_extern.h> @@ -403,6 +404,8 @@ xctrl_suspend() gnttab_resume(); #ifdef SMP + /* Send an IPI_BITMAP in case there are pending bitmap IPIs. */ + lapic_ipi_vectored(IPI_BITMAP_VECTOR, APIC_IPI_DEST_ALL); if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) { /* * Now that event channels have been initialized, Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Thu Dec 3 10:59:10 2015 (r291686) +++ stable/10/sys/x86/xen/hvm.c Thu Dec 3 11:05:35 2015 (r291687) @@ -72,7 +72,6 @@ static driver_filter_t xen_cpustop_handl static driver_filter_t xen_cpususpend_handler; static driver_filter_t xen_cpustophard_handler; static void xen_ipi_vectored(u_int vector, int dest); -static void xen_hvm_cpu_resume(void); #endif static void xen_hvm_cpu_init(void); @@ -84,9 +83,6 @@ extern void pmap_lazyfix_action(void); extern int pmap_pcid_enabled; #endif -/* Variables used by mp_machdep to perform the bitmap IPI */ -extern volatile u_int cpu_ipi_pending[MAXCPU]; - /*---------------------------------- Macros ----------------------------------*/ #define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) @@ -110,7 +106,7 @@ enum xen_domain_type xen_domain_type = X struct cpu_ops xen_hvm_cpu_ops = { .ipi_vectored = lapic_ipi_vectored, .cpu_init = xen_hvm_cpu_init, - .cpu_resume = xen_hvm_cpu_resume + .cpu_resume = xen_hvm_cpu_init }; #endif @@ -312,21 +308,6 @@ xen_ipi_vectored(u_int vector, int dest) /*---------------------- XEN diverged cpu operations -------------------------*/ static void -xen_hvm_cpu_resume(void) -{ - u_int cpuid = PCPU_GET(cpuid); - - /* - * Reset pending bitmap IPIs, because Xen doesn't preserve pending - * event channels on migration. - */ - cpu_ipi_pending[cpuid] = 0; - - /* register vcpu_info area */ - xen_hvm_cpu_init(); -} - -static void xen_cpu_ipi_init(int cpu) { xen_intr_handle_t *ipi_handle;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512031105.tB3B5ZUO064164>