diff options
| author | Justin T. Gibbs <gibbs@FreeBSD.org> | 2013-09-20 05:06:03 +0000 |
|---|---|---|
| committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 2013-09-20 05:06:03 +0000 |
| commit | 428b7ca290208e6b15d46440cd8d6309dc92dd2d (patch) | |
| tree | 297f8425e6baa2d90b45079c46930ff9d40e9994 /sys/amd64 | |
| parent | e96ca455226e13194d3ac067bc3befbe6bd14394 (diff) | |
Notes
Diffstat (limited to 'sys/amd64')
| -rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 16 | ||||
| -rw-r--r-- | sys/amd64/include/intr_machdep.h | 4 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 0fdb6685e620..1f022116878d 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1468,6 +1468,10 @@ cpususpend_handler(void) cpu = PCPU_GET(cpuid); +#ifdef XENHVM + mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); +#endif + if (savectx(susppcbs[cpu])) { ctx_fpusave(susppcbs[cpu]->pcb_fpususpend); wbinvd(); @@ -1486,11 +1490,23 @@ cpususpend_handler(void) while (!CPU_ISSET(cpu, &started_cpus)) ia32_pause(); +#ifdef XENHVM + /* + * Reset pending bitmap IPIs, because Xen doesn't preserve pending + * event channels on migration. + */ + cpu_ipi_pending[cpu] = 0; + /* register vcpu_info area */ + xen_hvm_init_cpu(); +#endif + /* Resume MCA and local APIC */ mca_resume(); lapic_setup(0); CPU_CLR_ATOMIC(cpu, &started_cpus); + /* Indicate that we are resumed */ + CPU_CLR_ATOMIC(cpu, &suspended_cpus); } /* diff --git a/sys/amd64/include/intr_machdep.h b/sys/amd64/include/intr_machdep.h index c8b454d6d783..fb71b5a5e862 100644 --- a/sys/amd64/include/intr_machdep.h +++ b/sys/amd64/include/intr_machdep.h @@ -102,7 +102,7 @@ struct pic { int (*pic_vector)(struct intsrc *); int (*pic_source_pending)(struct intsrc *); void (*pic_suspend)(struct pic *); - void (*pic_resume)(struct pic *); + void (*pic_resume)(struct pic *, bool suspend_cancelled); int (*pic_config_intr)(struct intsrc *, enum intr_trigger, enum intr_polarity); int (*pic_assign_cpu)(struct intsrc *, u_int apic_id); @@ -170,7 +170,7 @@ struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); int intr_remove_handler(void *cookie); -void intr_resume(void); +void intr_resume(bool suspend_cancelled); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); void nexus_add_irq(u_long irq); |
