Module Name: src Committed By: rmind Date: Wed Jun 15 19:54:17 UTC 2011
Modified Files: src/sys/arch/xen/x86: cpu.c x86_xpmap.c Log Message: - cpu_hatch: call tlbflushg(), just to make sure that TLB is clean. - xen_bootstrap_tables: call xpq_queue_tlb_flush() for safety. - Initialise cpus_attached and ci_cpumask for primary CPU. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/xen/x86/cpu.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/xen/x86/x86_xpmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.57 src/sys/arch/xen/x86/cpu.c:1.58 --- src/sys/arch/xen/x86/cpu.c:1.57 Sun Jun 12 03:35:50 2011 +++ src/sys/arch/xen/x86/cpu.c Wed Jun 15 19:54:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $ */ +/* $NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $ */ /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ /*- @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -157,6 +157,7 @@ .ci_idepth = -1, .ci_curlwp = &lwp0, .ci_curldt = -1, + .ci_cpumask = 1, #ifdef TRAPLOG .ci_tlog = &tlog_primary, #endif @@ -172,7 +173,7 @@ static void cpu_set_tss_gates(struct cpu_info *ci); -uint32_t cpus_attached = 0; +uint32_t cpus_attached = 1; uint32_t cpus_running = 0; uint32_t phycpus_attached = 0; @@ -739,6 +740,7 @@ /* Because the text may have been patched in x86_patch(). */ wbinvd(); x86_flush(); + tlbflushg(); KASSERT((ci->ci_flags & CPUF_RUNNING) == 0); Index: src/sys/arch/xen/x86/x86_xpmap.c diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.26 src/sys/arch/xen/x86/x86_xpmap.c:1.27 --- src/sys/arch/xen/x86/x86_xpmap.c:1.26 Sun May 8 00:18:25 2011 +++ src/sys/arch/xen/x86/x86_xpmap.c Wed Jun 15 19:54:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $ */ +/* $NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $ */ /* * Copyright (c) 2006 Mathieu Ropert <m...@adviseo.fr> @@ -69,7 +69,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $"); #include "opt_xen.h" #include "opt_ddb.h" @@ -854,6 +854,7 @@ pte++; } xpq_flush_queue(); + xpq_queue_tlb_flush(); }