The NetBSD Project

CVS log for src/sys/arch/xen/x86/x86_xpmap.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / xen / x86

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.92 / (download) - annotate - [select for diffs], Sat Aug 20 23:48:51 2022 UTC (19 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.91: +3 -2 lines
Diff to previous 1.91 (colored) to selected 1.1.4.1 (colored)

x86: Split most of pmap.h into pmap_private.h or vmparam.h.

This way pmap.h only contains the MD definition of the MI pmap(9)
API, which loads of things in the kernel rely on, so changing x86
pmap internals no longer requires recompiling the entire kernel every
time.

Callers needing these internals must now use machine/pmap_private.h.
Note: This is not x86/pmap_private.h because it contains three parts:

1. CPU-specific (different for i386/amd64) definitions used by...

2. common definitions, including Xenisms like xpmap_ptetomach,
   further used by...

3. more CPU-specific inlines for pmap_pte_* operations

So {amd64,i386}/pmap_private.h defines 1, includes x86/pmap_private.h
for 2, and then defines 3.  Maybe we should split that out into a new
pmap_pte.h to reduce this trouble.

No functional change intended, other than that some .c files must
include machine/pmap_private.h when previously uvm/uvm_pmap.h
polluted the namespace with pmap internals.

Note: This migrates part of i386/pmap.h into i386/vmparam.h --
specifically the parts that are needed for several constants defined
in vmparam.h:

VM_MAXUSER_ADDRESS
VM_MAX_ADDRESS
VM_MAX_KERNEL_ADDRESS
VM_MIN_KERNEL_ADDRESS

Since i386 needs PDP_SIZE in vmparam.h, I added it there on amd64
too, just to keep things parallel.

Revision 1.84.4.2 / (download) - annotate - [select for diffs], Fri May 13 11:12:49 2022 UTC (22 months, 2 weeks ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.84.4.1: +9 -3 lines
Diff to previous 1.84.4.1 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1444):

	sys/arch/xen/x86/x86_xpmap.c: revision 1.91

In bootstrap, after switching to a new page table make sure that
now-unused memory is unmapped.

Revision 1.91 / (download) - annotate - [select for diffs], Wed May 11 16:22:46 2022 UTC (22 months, 2 weeks ago) by bouyer
Branch: MAIN
Changes since 1.90: +9 -3 lines
Diff to previous 1.90 (colored) to selected 1.1.4.1 (colored)

In bootstrap, after switching to a new page table make sure that
now-unused memory is unmapped.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Sep 6 02:18:53 2020 UTC (3 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.1.4.1 (colored)

Fix fallout from previous uvm.h cleanup.

- pmap(9) needs uvm/uvm_extern.h.

- x86/pmap.h is not usable on its own; it is only usable if included
  via uvm/uvm_extern.h (-> uvm/uvm_pmap.h -> machine/pmap.h).

- Make nvmm.h and nvmm_internal.h standalone.

Revision 1.84.4.1 / (download) - annotate - [select for diffs], Sun May 31 10:39:34 2020 UTC (3 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.84: +14 -5 lines
Diff to previous 1.84 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #935):

	sys/arch/xen/x86/x86_xpmap.c: revision 1.89
	sys/arch/x86/include/pmap.h: revision 1.121
	sys/arch/xen/xen/privcmd.c: revision 1.58
	sys/external/mit/xen-include-public/dist/xen/include/public/memory.h: revision 1.2
	sys/arch/xen/include/xenpmap.h: revision 1.44
	sys/arch/xen/include/xenio.h: revision 1.12
	sys/arch/x86/x86/pmap.c: revision 1.394
	(all via patch)

Ajust pmap_enter_ma() for upcoming new Xen privcmd ioctl:
pass flags to xpq_update_foreign()

Introduce a pmap MD flag: PMAP_MD_XEN_NOTR, which cause xpq_update_foreign()
to use the MMU_PT_UPDATE_NO_TRANSLATE flag.
make xpq_update_foreign() return the raw Xen error. This will cause
pmap_enter_ma() to return a negative error number in this case, but the
only user of this code path is privcmd.c and it can deal with it.

Add pmap_enter_gnt()m which maps a set of Xen grant entries at the
specified va in the specified pmap. Use the hooks implemented for EPT to
keep track of mapped grand entries in the pmap, and unmap them
when pmap_remove() is called. This requires pmap_remove() to be split
into a pmap_remove_locked(), to be called from pmap_remove_gnt().

Implement new ioctl, needed by Xen 4.13:
IOCTL_PRIVCMD_MMAPBATCH_V2
IOCTL_PRIVCMD_MMAP_RESOURCE
IOCTL_GNTDEV_MMAP_GRANT_REF
IOCTL_GNTDEV_ALLOC_GRANT_REF

Always enable declarations needed by privcmd.c

Revision 1.89 / (download) - annotate - [select for diffs], Tue May 26 10:10:32 2020 UTC (3 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.88: +14 -5 lines
Diff to previous 1.88 (colored) to selected 1.1.4.1 (colored)

Ajust pmap_enter_ma() for upcoming new Xen privcmd ioctl:
pass flags to xpq_update_foreign()
Introduce a pmap MD flag: PMAP_MD_XEN_NOTR, which cause xpq_update_foreign()
to use the MMU_PT_UPDATE_NO_TRANSLATE flag.
make xpq_update_foreign() return the raw Xen error. This will cause
pmap_enter_ma() to return a negative error number in this case, but the
only user of this code path is privcmd.c and it can deal with it.

Add pmap_enter_gnt()m which maps a set of Xen grant entries at the
specified va in the specified pmap. Use the hooks implemented for EPT to
keep track of mapped grand entries in the pmap, and unmap them
when pmap_remove() is called. This requires pmap_remove() to be split
into a pmap_remove_locked(), to be called from pmap_remove_gnt().

Revision 1.88 / (download) - annotate - [select for diffs], Wed May 6 19:47:05 2020 UTC (3 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.87: +5 -5 lines
Diff to previous 1.87 (colored) to selected 1.1.4.1 (colored)

xpq_queue_* use per-cpu queue; splvm() is enough to protect them.
remove the XXX SMP comments.

Revision 1.87 / (download) - annotate - [select for diffs], Wed May 6 17:28:26 2020 UTC (3 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.86: +8 -5 lines
Diff to previous 1.86 (colored) to selected 1.1.4.1 (colored)

KASSERT() that the per-cpu queues are run at IPL_VM after boot.

Revision 1.86 / (download) - annotate - [select for diffs], Sat May 2 16:44:36 2020 UTC (3 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.85: +2 -3 lines
Diff to previous 1.85 (colored) to selected 1.1.4.1 (colored)

Introduce Xen PVH support in GENERIC.
This is compiled in with
options XENPVHVM
x86 changes:
- add Xen section and xen pvh entry points to locore.S. Set vm_guest
  to VM_GUEST_XENPVH in this entry point.
  Most of the boot procedure (especially page table setup and switch to
  paged mode) is shared with native.
- change some x86_delay() to delay_func(), which points to x86_delay() for
  native/HVM, and xen_delay() for PVH

Xen changes:
- remove Xen bits from init_x86_64_ksyms() and init386_ksyms()
  and move to xen_init_ksyms(), used for both PV and PVH
- set ISA no-legacy-devices property for PVH
- factor out code from Xen's cpu_bootconf() to xen_bootconf()
  in xen_machdep.c
- set up a specific pvh_consinit() which starts with printk()
  (which uses a simple hypercall that is available early) and switch to
  xencons when we can use pmap_kenter_pa().

Revision 1.75.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:12 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.75.2.1: +4 -4 lines
Diff to previous 1.75.2.1 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored) to selected 1.1.4.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.85 / (download) - annotate - [select for diffs], Wed Oct 30 07:40:06 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored) to selected 1.1.4.1 (colored)

Switch to new PTE bits.

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:56 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.75: +132 -151 lines
Diff to previous 1.75 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.84 / (download) - annotate - [select for diffs], Sat Mar 9 08:42:25 2019 UTC (5 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.83: +18 -18 lines
Diff to previous 1.83 (colored) to selected 1.1.4.1 (colored)

Start replacing the x86 PTE bits.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Mar 7 13:26:24 2019 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.82: +8 -9 lines
Diff to previous 1.82 (colored) to selected 1.1.4.1 (colored)

Drop PG_RO, PG_KR and PG_PROT, they are useless and create confusion.

Revision 1.82 / (download) - annotate - [select for diffs], Mon Feb 4 18:14:53 2019 UTC (5 years, 1 month ago) by cherry
Branch: MAIN
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored) to selected 1.1.4.1 (colored)

Bump up XEN source API compatibility to 0x00030208 from 0x00030201,

but maintain backwards source API compilation compatibility.

ie; sources with config(5)
options 	__XEN_INTERFACE_VERSION__=0x00030201 # Xen 3.1 interface

should compile and run without problems.

Not that API version 0x00030201 is the lowest version we support now.

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:44 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.74.2.2: +73 -71 lines
Diff to previous 1.74.2.2 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.81 / (download) - annotate - [select for diffs], Sun Jul 29 08:02:24 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.80: +73 -71 lines
Diff to previous 1.80 (colored) to selected 1.1.4.1 (colored)

Reduce the confusion, rename a bunch of variables and reorg a little.
Tested on i386PAE-domU and amd64-dom0.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:43 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74.2.1: +61 -81 lines
Diff to previous 1.74.2.1 (colored) to branchpoint 1.74 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.80 / (download) - annotate - [select for diffs], Fri Jul 27 10:04:22 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.79: +31 -31 lines
Diff to previous 1.79 (colored) to selected 1.1.4.1 (colored)

Try to reduce the confusion, rename:

	l2_4_count       -> PDIRSZ
	count            -> nL2
	bootstrap_tables -> our_tables
	init_tables      -> xen_tables

No functional change.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jul 26 17:20:09 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.78: +27 -41 lines
Diff to previous 1.78 (colored) to selected 1.1.4.1 (colored)

Remove the non-PAE-i386 code of Xen. The branches are reordered so that
__x86_64__ comes first, eg:

	#if defined(PAE)
		/* i386+PAE */
	#elif defined(__x86_64__)
		/* amd64 */
	#else
		/* i386 */
	#endif

becomes

	#ifdef __x86_64__
		/* amd64 */
	#else
		/* i386+PAE */
	#endif

Tested on i386pae-domU and amd64-dom0.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jul 26 15:46:09 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.77: +4 -8 lines
Diff to previous 1.77 (colored) to selected 1.1.4.1 (colored)

Retire XENDEBUG_LOW, and switch its only user to XENDEBUG.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Jul 26 08:18:25 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.76: +5 -6 lines
Diff to previous 1.76 (colored) to selected 1.1.4.1 (colored)

Merge the blocks. No functional change.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jul 26 08:08:24 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.75: +8 -9 lines
Diff to previous 1.75 (colored) to selected 1.1.4.1 (colored)

Simplify the conditions; (PTP_LEVELS > 3) and (PTP_LEVELS > 2) are for
amd64, so use ifdef __x86_64__. No functional change.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:47 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Sun Jun 24 20:28:57 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored) to selected 1.1.4.1 (colored)

mark with XXXSMP all remaining spl*() and tsleep() calls

Revision 1.48.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.48.2.2: +307 -478 lines
Diff to previous 1.48.2.2 (colored) next main 1.49 (colored) to selected 1.1.4.1 (colored)

update from HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Sat Sep 16 09:28:38 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.73: +8 -10 lines
Diff to previous 1.73 (colored) to selected 1.1.4.1 (colored)

Move xpq_idx into cpu_info, to prevent false sharing between CPUs. Saves
10s when doing a './build.sh -j 3 kernel=GENERIC' on xen-amd64-domU.

Revision 1.53.4.5 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:57 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.53.4.4: +87 -209 lines
Diff to previous 1.53.4.4 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:39 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.69: +106 -236 lines
Diff to previous 1.69 (colored) next main 1.70 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.54.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:23 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.54.2.3: +106 -239 lines
Diff to previous 1.54.2.3 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.73 / (download) - annotate - [select for diffs], Sat Mar 18 13:35:57 2017 UTC (7 years ago) by maxv
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Changes since 1.72: +24 -87 lines
Diff to previous 1.72 (colored) to selected 1.1.4.1 (colored)

Style, and remove debug code that does not work anyway.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Mar 8 18:00:49 2017 UTC (7 years ago) by maxv
Branch: MAIN
Changes since 1.71: +77 -136 lines
Diff to previous 1.71 (colored) to selected 1.1.4.1 (colored)

A few changes:
 * Use markers to reduce false sharing.
 * Remove XENDEBUG_SYNC and several debug messages, they are just useless.
 * Remove xen_vcpu_*. They are unused and not optimized: if we really
   wanted to flush ranges we should pack the VAs in a mmuext_op array
   instead of performing several hypercalls in a loop.
 * Start removing PG_k.
 * KNF, reorder, simplify and remove stupid comments.

Revision 1.53.4.4 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:23 2017 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.53.4.3: +57 -60 lines
Diff to previous 1.53.4.3 (colored) to branchpoint 1.53 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Thu Feb 2 08:57:04 2017 UTC (7 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored) to selected 1.1.4.1 (colored)

Use __read_mostly on these variables, to reduce the probability of false
sharing.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jan 22 19:24:51 2017 UTC (7 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.69: +20 -28 lines
Diff to previous 1.69 (colored) to selected 1.1.4.1 (colored)

Export xpmap_pg_nx, and put it in the page table pages. It does not change
anything, since Xen removes the X bit on these; but it is better for
consistency.

Revision 1.54.2.3 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:28 2017 UTC (7 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.54.2.2: +147 -208 lines
Diff to previous 1.54.2.2 (colored) to branchpoint 1.54 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jan 6 08:32:26 2017 UTC (7 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.68: +20 -32 lines
Diff to previous 1.68 (colored) to selected 1.1.4.1 (colored)

Remove a few #if 0s, and explain what we are doing on PAE: the last two PAs
are entered in reversed order.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Dec 16 19:52:22 2016 UTC (7 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.67: +21 -4 lines
Diff to previous 1.67 (colored) to selected 1.1.4.1 (colored)

The way the xen dummy page is taken care of makes absolutely no sense at
all, with magic offsets here and there in different layers of the system.
It is just blind luck that everything has always worked as expected so
far.

Due to this wrong design we have a problem now: we allocate one physical
page for lapic, and it happens to overlap with the dummy page, which
causes the system to crash.

Fix this by keeping the dummy va directly in a variable instead of magic
offsets. The asm locore now increments the first pa to hide the dummy page
to machdep and pmap.

Revision 1.53.4.3 / (download) - annotate - [select for diffs], Mon Dec 5 10:54:59 2016 UTC (7 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.53.4.2: +112 -181 lines
Diff to previous 1.53.4.2 (colored) to branchpoint 1.53 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Tue Nov 15 17:01:12 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.1.4.1 (colored)

Mmh, apparently I didn't properly test my previous change since it does not
compile anymore

Revision 1.66 / (download) - annotate - [select for diffs], Tue Nov 15 15:37:20 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.65: +34 -57 lines
Diff to previous 1.65 (colored) to selected 1.1.4.1 (colored)

Keep simplifying that stuff. Also, replace plX_pi(KERNTEXTOFF) by
LX_SLOT_KERNBASE: the base address is KERNBASE, and we just start mapping
from KERNTEXTOFF. For symmetry with the normal amd64, does not change
anything.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Nov 11 11:34:51 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored) to selected 1.1.4.1 (colored)

Rename xen_pmap_bootstrap to xen_locore, it really has nothing to do with
pmap and is just a C version of what amd64 and i386 do in asm.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Nov 11 11:12:42 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.63: +92 -139 lines
Diff to previous 1.63 (colored) to selected 1.1.4.1 (colored)

Start simplifying the Xen locore: rename and reorder several things, remove
awful debug messages, use unsigned counters, fix typos and KNF.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:07 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.54.2.1: +6 -5 lines
Diff to previous 1.54.2.1 (colored) to branchpoint 1.54 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.63 / (download) - annotate - [select for diffs], Tue Nov 1 12:16:10 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored) to selected 1.1.4.1 (colored)

Map the PTE space as non-executable on PAE. The same is already done on
amd64.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Nov 1 12:00:21 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.61: +4 -4 lines
Diff to previous 1.61 (colored) to selected 1.1.4.1 (colored)

Map the remaining pages as non-executable. Only text should have X.

Revision 1.53.4.2 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:37 2016 UTC (7 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.53.4.1: +101 -78 lines
Diff to previous 1.53.4.1 (colored) to branchpoint 1.53 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.61 / (download) - annotate - [select for diffs], Thu Aug 25 17:03:57 2016 UTC (7 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.60: +40 -17 lines
Diff to previous 1.60 (colored) to selected 1.1.4.1 (colored)

Revert to 1.59 (adding back the W^X kernel mapings), and move the data+bss
mapping late so that mappings that should be RO (such as page tables) won't
be made RW by accident.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Aug 23 11:03:52 2016 UTC (7 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.59: +17 -40 lines
Diff to previous 1.59 (colored) to selected 1.1.4.1 (colored)

Stopgap measure: revert to rev 1.56. starting with 1.57 an i386PAE Xen
kernel doesn't boot:
(XEN) mm.c:2394:d139v0 Bad type (saw 5400000000000001 != exp 7000000000000000) for mfn 1136f5 (pfn 621)
(XEN) mm.c:887:d139v0 Could not get page type PGT_writable_page
(XEN) mm.c:939:d139v0 Error getting mfn 1136f5 (pfn 621) from L1 entry 00000001136f5003 for l1e_owner=139, pg_owner=139
(XEN) mm.c:1254:d139v0 Failure in alloc_l1_table: entry 33
(XEN) mm.c:2141:d139v0 Error while validating mfn 112f57 (pfn dbf) for type 1000000000000000: caf=8000000000000003 taf=1000000000000001
(XEN) mm.c:947:d139v0 Attempt to create linear p.t. with write perms
(XEN) mm.c:1330:d139v0 Failure in alloc_l2_table: entry 3
(XEN) mm.c:2141:d139v0 Error while validating mfn 112f5b (pfn dbb) for type 2200000000000000: caf=8000000000000003 taf=2200000000000001
(XEN) mm.c:1412:d139v0 Failure in alloc_l3_table: entry 3
(XEN) mm.c:2141:d139v0 Error while validating mfn 112f60 (pfn db6) for type 3000000000000000: caf=8000000000000003 taf=3000000000000001
(XEN) mm.c:3044:d139v0 Error while pinning mfn 112f60
(XEN) traps.c:459:d139v0 Unhandled bkpt fault/trap [#3] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S: fault at ffff82d080231894 compat_create_bounce_frame+0xda/0xf2

Revision 1.59 / (download) - annotate - [select for diffs], Thu Aug 11 15:35:10 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.58: +3 -2 lines
Diff to previous 1.58 (colored) to selected 1.1.4.1 (colored)

Make the I/O area non-executable on Xen.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:06 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.54: +88 -66 lines
Diff to previous 1.54 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.58 / (download) - annotate - [select for diffs], Wed Aug 3 11:51:18 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.57: +17 -12 lines
Diff to previous 1.57 (colored) to selected 1.1.4.1 (colored)

Map the recursive slot and page table pages as non-executable on Xen. Same
as normal x86.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Aug 2 14:21:53 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.56: +23 -6 lines
Diff to previous 1.56 (colored) to selected 1.1.4.1 (colored)

Map the kernel text, rodata and data+bss independently on Xen, with
respectively RX, R and RW.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Aug 2 13:29:35 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored) to selected 1.1.4.1 (colored)

Use PG_RO instead of a magic zero.

Revision 1.55 / (download) - annotate - [select for diffs], Tue Aug 2 13:25:56 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.54: +50 -50 lines
Diff to previous 1.54 (colored) to selected 1.1.4.1 (colored)

KNF, and use PAGE_SIZE instead of NBPG.

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:00 2016 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.53: +4 -2 lines
Diff to previous 1.53 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.54 / (download) - annotate - [select for diffs], Sun May 29 17:06:17 2016 UTC (7 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.53: +4 -2 lines
Diff to previous 1.53 (colored) to selected 1.1.4.1 (colored)

Switch to elf notes for amd64 instead of the old key=value list to describe the
  guest requirements and support.
Add infrastructure to query the hypervisor about features support.
For verbose boot, print the features suppoted by the hypervisor for this
  guest.

Revision 1.48.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:30 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.48.2.1: +35 -10 lines
Diff to previous 1.48.2.1 (colored) to selected 1.1.4.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:11 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.52: +31 -2 lines
Diff to previous 1.52 (colored) next main 1.53 (colored) to selected 1.1.4.1 (colored)

Rebase.

Revision 1.34.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34.2.4: +35 -10 lines
Diff to previous 1.34.2.4 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored) to selected 1.1.4.1 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.49: +35 -10 lines
Diff to previous 1.49 (colored) next main 1.50 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.53 / (download) - annotate - [select for diffs], Tue May 6 04:26:24 2014 UTC (9 years, 10 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.52: +31 -2 lines
Diff to previous 1.52 (colored) to selected 1.1.4.1 (colored)

Use the hypervisor to copy/zero pages. This saves us the extra overheads
of setting up temporary kernel mapping/unmapping.

riz@ reports savings of about 2s on a 120s kernel build.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Nov 10 01:19:13 2013 UTC (10 years, 4 months ago) by jnemeth
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.51: +4 -8 lines
Diff to previous 1.51 (colored) to selected 1.1.4.1 (colored)

Change xpq_flush_cache to just do WBINVD letting the hypervisor trap and
handle it as MMUEXT_FLUSH_CACHE is a privileged hypervisor operation.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Nov 8 02:23:52 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored) to selected 1.1.4.1 (colored)

fix unused variable warnings

Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 6 06:23:15 2013 UTC (10 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.49: +3 -4 lines
Diff to previous 1.49 (colored) to selected 1.1.4.1 (colored)

- move variables inside their #ifdef use
- remove unused and set-but-unused variables
- use __USE() in a particularly ugly case

with these, and a couple of other changes, amd64 gcc 4.8.1 world
is able to complete build.sh release.

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:01:52 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.1.4.1 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.34.2.4 / (download) - annotate - [select for diffs], Tue Oct 30 17:20:36 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.34.2.3: +25 -28 lines
Diff to previous 1.34.2.3 (colored) to branchpoint 1.34 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 16 22:09:34 2012 UTC (11 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.48: +4 -4 lines
Diff to previous 1.48 (colored) to selected 1.1.4.1 (colored)

Rename kcpuset_copybits() to kcpuset_export_u32() and thus be more specific
about the interface.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Aug 21 09:06:02 2012 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.47: +21 -8 lines
Diff to previous 1.47 (colored) to selected 1.1.4.1 (colored)

Redo previous the correct way: Xen expects a u_long * for vcpumask,
so use 2 uint32_t on LP64.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Aug 21 01:17:46 2012 UTC (11 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored) to selected 1.1.4.1 (colored)

Fix Xen build.  Make xcpumask uint32_t, fits 32 CPUs (can increase).

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jun 30 22:50:37 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) to selected 1.1.4.1 (colored)

Extend the xpmap API, as described in [1]. This change is mechanical and
avoids exposing the MD phys_to_machine/machine_to_phys tables directly.
Added:

- xpmap_ptom handles PFN (pseudo physical) to MFN (machine frame number)
translations, and is under control of the domain.
- xpmap_mtop is its counterpart (MFN to PFN), and is under control of
hypervisor.

xpmap_ptom_map()      map a pseudo-phys address to a machine address
xpmap_ptom_unmap()    unmap a pseudo-phys address (invalidation)
xpmap_ptom_isvalid()  check for pseudo-phys address validity

The parameters are physical/machine addresses, like bus_dma/bus_space(9).
As x86 MFNs are tracked by u_long (Xen's choice) while machine addresses
can be 64 bits entities (PAE), use ptoa() to avoid truncation when bit
shifting by PAGE_SHIFT.

I kept the same namespace (xpmap_) to avoid code churn.

[1] http://mail-index.netbsd.org/port-xen/2009/05/09/msg004951.html

XXX will document ptoa/atop/trunc_page separately.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jun 27 00:37:10 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored) to selected 1.1.4.1 (colored)

Retire XEN_COMPAT_030001 as detailed on port-xen@:

http://mail-index.netbsd.org/port-xen/2012/06/25/msg007431.html

The xen_p2m API comes next.

ok bouyer@.
Tested on i386 PAE and amd64 (Xen 3.3 on private test bed, and
Xen 3.4 for Amazon EC2).

FWIW, Amazon always reported:

hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro

multiple times for Europe and US West-1, so I guess they are now at
3.4 (32 and 64 bits).

Revision 1.38.2.5 / (download) - annotate - [select for diffs], Tue Jun 12 19:00:25 2012 UTC (11 years, 9 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.38.2.4: +8 -24 lines
Diff to previous 1.38.2.4 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #314):
	sys/arch/xen/x86/cpu.c: revision 1.92
	sys/kern/subr_kcpuset.c: revision 1.6
	sys/sys/kcpuset.h: revision 1.6
	sys/arch/xen/x86/x86_xpmap.c: revision 1.44
Few fixes for Xen:
- cpu_load_pmap: use atomic kcpuset(9) operations; fixes rare crashes.
- Add kcpuset_copybits(9) and replace xen_kcpuset2bits().  Avoids incorrect
  ncpu problem in early boot.  Also, micro-optimises xen_mcast_invlpg() and
  xen_mcast_tlbflush() routines.
Tested by chs@.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jun 6 22:22:41 2012 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.43: +8 -24 lines
Diff to previous 1.43 (colored) to selected 1.1.4.1 (colored)

Few fixes for Xen:
- cpu_load_pmap: use atomic kcpuset(9) operations; fixes rare crashes.
- Add kcpuset_copybits(9) and replace xen_kcpuset2bits().  Avoids incorrect
  ncpu problem in early boot.  Also, micro-optimises xen_mcast_invlpg() and
  xen_mcast_tlbflush() routines.

Tested by chs@.

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Wed May 23 10:07:52 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34.2.2: +28 -8 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.38.2.4 / (download) - annotate - [select for diffs], Wed May 9 03:22:54 2012 UTC (11 years, 10 months ago) by riz
Branch: netbsd-6
Changes since 1.38.2.3: +28 -8 lines
Diff to previous 1.38.2.3 (colored) to branchpoint 1.38 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #202):
	sys/arch/x86/include/cpuvar.h: revision 1.46
	sys/arch/xen/include/xenpmap.h: revision 1.34
	sys/arch/i386/include/param.h: revision 1.77
	sys/arch/x86/x86/pmap_tlb.c: revision 1.5
	sys/arch/x86/x86/pmap_tlb.c: revision 1.6
	sys/arch/i386/i386/genassym.cf: revision 1.92
	sys/arch/xen/x86/cpu.c: revision 1.91
	sys/arch/x86/x86/pmap.c: revision 1.177
	sys/arch/xen/x86/xen_pmap.c: revision 1.21
	sys/arch/x86/acpi/acpi_wakeup.c: revision 1.31
	sys/kern/subr_kcpuset.c: revision 1.5
	sys/arch/amd64/include/param.h: revision 1.18
	sys/sys/kcpuset.h: revision 1.5
	sys/arch/x86/x86/mtrr_i686.c: revision 1.26
	sys/arch/x86/x86/mtrr_i686.c: revision 1.27
	sys/arch/xen/x86/x86_xpmap.c: revision 1.43
	sys/arch/x86/x86/cpu.c: revision 1.98
	sys/arch/amd64/amd64/mptramp.S: revision 1.14
	sys/kern/sys_sched.c: revision 1.42
	sys/arch/amd64/amd64/genassym.cf: revision 1.50
	sys/arch/i386/i386/mptramp.S: revision 1.24
	sys/arch/x86/include/pmap.h: revision 1.52
	sys/arch/x86/include/cpu.h: revision 1.50
- Convert x86 MD code, mainly pmap(9) e.g. TLB shootdown code, to use
  kcpuset(9) and thus replace hardcoded CPU bitmasks.  This removes the
  limitation of maximum CPUs.
- Support up to 256 CPUs on amd64 architecture by default.
Bug fixes, improvements, completion of Xen part and testing on 64-core
AMD Opteron(tm) Processor 6282 SE (also, as Xen HVM domU with 128 CPUs)
by Manuel Bouyer.
- pmap_tlb_shootdown: do not overwrite tp_cpumask with pm_cpus, but merge
  like pm_kernel_cpus.  Remove unecessary intersection with kcpuset_running.
  Do not reset tp_userpmap if pmap_kernel().
- Remove pmap_tlb_mailbox_t wrapping, which is pointless after recent changes.
- pmap_tlb_invalidate, pmap_tlb_intr: constify for packet structure.
i686_mtrr_init_first: handle the case when there are no variable-size MTRR
registers available (i686_mtrr_vcnt == 0).

Revision 1.36.4.6 / (download) - annotate - [select for diffs], Sun Apr 29 23:04:44 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36.4.5: +28 -8 lines
Diff to previous 1.36.4.5 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored) to selected 1.1.4.1 (colored)

sync to latest -current.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Apr 20 22:23:25 2012 UTC (11 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.42: +28 -8 lines
Diff to previous 1.42 (colored) to selected 1.1.4.1 (colored)

- Convert x86 MD code, mainly pmap(9) e.g. TLB shootdown code, to use
  kcpuset(9) and thus replace hardcoded CPU bitmasks.  This removes the
  limitation of maximum CPUs.

- Support up to 256 CPUs on amd64 architecture by default.

Bug fixes, improvements, completion of Xen part and testing on 64-core
AMD Opteron(tm) Processor 6282 SE (also, as Xen HVM domU with 128 CPUs)
by Manuel Bouyer.

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:11 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34.2.1: +64 -30 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.36.4.5 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:40 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36.4.4: +8 -12 lines
Diff to previous 1.36.4.4 (colored) to branchpoint 1.36 (colored) to selected 1.1.4.1 (colored)

sync to -current

Revision 1.36.4.4 / (download) - annotate - [select for diffs], Tue Mar 6 09:56:12 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36.4.3: +12 -8 lines
Diff to previous 1.36.4.3 (colored) to branchpoint 1.36 (colored) to selected 1.1.4.1 (colored)

sync to -current

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Mon Mar 5 20:18:03 2012 UTC (12 years ago) by sborrill
Branch: netbsd-6
Changes since 1.38.2.2: +8 -12 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored) to selected 1.1.4.1 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #80):
	sys/arch/xen/x86/x86_xpmap.c:	revision 1.42
	sys/arch/x86/include/specialreg.h:	revision 1.56
	sys/arch/amd64/amd64/machdep.c:	revision 1.179
	sys/arch/i386/i386/locore.S:	revision 1.97
	sys/arch/i386/i386/machdep.c:	revision 1.723 via patch
	sys/arch/x86/include/cpu.h:	revision 1.49

Fix possible FPU registers corruption on context switches.
Fix type of pointers passed to some hypercalls.

Revision 1.36.4.3 / (download) - annotate - [select for diffs], Sun Mar 4 00:46:18 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36.4.2: +32 -23 lines
Diff to previous 1.36.4.2 (colored) to branchpoint 1.36 (colored) to selected 1.1.4.1 (colored)

sync to latest -current.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Mar 2 16:37:38 2012 UTC (12 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base4
Changes since 1.41: +8 -12 lines
Diff to previous 1.41 (colored) to selected 1.1.4.1 (colored)

MMUEXT_INVLPG_MULTI and MMUEXT_TLB_FLUSH_MULTI use a long as cpu mask,
not uint32_t, so  pass a pointer of the right type.
While there, cleanup includes and delete local, redundant define of PG_k.

Revision 1.11.4.1 / (download) - annotate - [select for diffs], Fri Feb 24 17:29:32 2012 UTC (12 years, 1 month ago) by sborrill
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.11: +8 -2 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.1.4.1 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1729):
	sys/arch/x86/x86/pmap.c:	revision 1.170 via patch
	sys/arch/xen/x86/x86_xpmap.c:	revision 1.40 via patch

Fix random kernel panic on domains with large memory.
May fix PR port-xen/38699

Revision 1.36.4.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:37 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36.4.1: +8 -2 lines
Diff to previous 1.36.4.1 (colored) to branchpoint 1.36 (colored) to selected 1.1.4.1 (colored)

sync to -current.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 24 08:06:08 2012 UTC (12 years, 1 month ago) by cherry
Branch: MAIN
CVS Tags: jmcneill-usbmp-base5
Changes since 1.40: +28 -15 lines
Diff to previous 1.40 (colored) to selected 1.1.4.1 (colored)

(xen) - remove the (*xpq_cpu)() shim.We hasten the %fs/%gs setup process during boot.Although this is hacky, it lets us use the non-xen specificpmap_pte_xxx() functions in pmap code (and others).

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Thu Feb 23 21:17:25 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.38.2.1: +8 -2 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #39):
	sys/arch/x86/x86/pmap.c: revision 1.170
	sys/arch/xen/x86/x86_xpmap.c: revision 1.40
On Xen, there is variable-sized Xen data after the kernel's text+data+bss
(this include the physical->machine table).
(vaddr_t)(KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2) is after text+data+bss but,
on a domU with lots of RAM (more than 4GB) (so large
xpmap_phys_to_machine_mapping table) this can point to some of Xen's data
setup at bootstrap (either the xpmap_phys_to_machine_mapping table,
some page shared with the hypervisor, or our kernel page table). Using it for
early_zerop will cause of these pages to be unmapped after bootstrap.
This will cause a kernel page fault for the domU, either immediatly or
eventually much later, depending on where early_zerop points to.
To fix this, account for early_zerop when building the bootstrap pages,
and its VA from here.
May fix PR port-xen/38699

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 23 18:59:21 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: jmcneill-usbmp-base3
Changes since 1.39: +8 -2 lines
Diff to previous 1.39 (colored) to selected 1.1.4.1 (colored)

On Xen, there is variable-sized Xen data after the kernel's text+data+bss
(this include the physical->machine table).
(vaddr_t)(KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2) is after text+data+bss but,
on a domU with lots of RAM (more than 4GB) (so large
xpmap_phys_to_machine_mapping table) this can point to some of Xen's data
setup at bootstrap (either the xpmap_phys_to_machine_mapping table,
some page shared with the hypervisor, or our kernel page table). Using it for
early_zerop will cause of these pages to be unmapped after bootstrap.
This will cause a kernel page fault for the domU, either immediatly or
eventually much later, depending on where early_zerop points to.
To fix this, account for early_zerop when building the bootstrap pages,
and its VA from here.

May fix PR port-xen/38699

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Wed Feb 22 18:56:45 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.38: +25 -7 lines
Diff to previous 1.38 (colored) to selected 1.1.4.1 (colored)

Pull up following revision(s) (requested by bouyer in ticket #29):
	sys/arch/xen/x86/x86_xpmap.c: revision 1.39
	sys/arch/xen/include/hypervisor.h: revision 1.37
	sys/arch/xen/include/intr.h: revision 1.34
	sys/arch/xen/x86/xen_ipi.c: revision 1.10
	sys/arch/x86/x86/cpu.c: revision 1.97
	sys/arch/x86/include/cpu.h: revision 1.48
	sys/uvm/uvm_map.c: revision 1.315
	sys/arch/x86/x86/pmap.c: revision 1.165
	sys/arch/xen/x86/cpu.c: revision 1.81
	sys/arch/x86/x86/pmap.c: revision 1.167
	sys/arch/xen/x86/cpu.c: revision 1.82
	sys/arch/x86/x86/pmap.c: revision 1.168
	sys/arch/xen/x86/xen_pmap.c: revision 1.17
	sys/uvm/uvm_km.c: revision 1.122
	sys/uvm/uvm_kmguard.c: revision 1.10
	sys/arch/x86/include/pmap.h: revision 1.50
Apply patch proposed in PR port-xen/45975 (this does not solve the exact
problem reported here but is part of the solution):
xen_kpm_sync() is not working as expected,
leading to races between CPUs.
1 the check (xpq_cpu != &x86_curcpu) is always false because we
  have different x86_curcpu symbols with different addresses in the kernel.
  Fortunably, all addresses dissaemble to the same code.
  Because of this we always use the code intended for bootstrap, which doesn't
  use cross-calls or lock.
2 once 1 above is fixed, xen_kpm_sync() will use xcalls to sync other CPUs,
  which cause it to sleep and pmap.c doesn't like that. It triggers this
  KASSERT() in pmap_unmap_ptes():
  KASSERT(pmap->pm_ncsw == curlwp->l_ncsw);
3 pmap->pm_cpus is not safe for the purpose of xen_kpm_sync(), which
  needs to know on which CPU a pmap is loaded *now*:
  pmap->pm_cpus is cleared before cpu_load_pmap() is called to switch
  to a new pmap, leaving a window where a pmap is still in a CPU's
  ci_kpm_pdir but not in pm_cpus. As a virtual CPU may be preempted
  by the hypervisor at any time, it can be large enough to let another
  CPU free the PTP and reuse it as a normal page.
To fix 2), avoid cross-calls and IPIs completely, and instead
use a mutex to update all CPU's ci_kpm_pdir from the local CPU.
It's safe because we just need to update the table page, a tlbflush IPI will
happen later. As a side effect, we don't need a different code for bootstrap,
fixing 1). The mutex added to struct cpu needs a small headers reorganisation.
to fix 3), introduce a pm_xen_ptp_cpus which is updated from
cpu_pmap_load(), whith the ci_kpm_mtx mutex held. Checking it with
ci_kpm_mtx held will avoid overwriting the wrong pmap's ci_kpm_pdir.
While there I removed the unused pmap_is_active() function;
and added some more details to DIAGNOSTIC panics.
When using uvm_km_pgremove_intrsafe() make sure mappings are removed
before returning the pages to the free pool. Otherwise, under Xen,
a page which still has a writable mapping could be allocated for
a PDP by another CPU and the hypervisor would refuse it (this is
PR port-xen/45975).
For this, move the pmap_kremove() calls inside uvm_km_pgremove_intrsafe(),
and do pmap_kremove()/uvm_pagefree() in batch of (at most) 16 entries
(as suggested by Chuck Silvers on tech-kern@, see also
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012727.html and
followups).
Avoid early use of xen_kpm_sync(); locks are not available at this time.
Don't call cpu_init() twice.
Makes LOCKDEBUG kernels boot again
Revert pmap_pte_flush() -> xpq_flush_queue() in previous.

Revision 1.36.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:33:45 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.36: +27 -8 lines
Diff to previous 1.36 (colored) to selected 1.1.4.1 (colored)

merge to -current.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Feb 17 18:40:20 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: jmcneill-usbmp-base2
Changes since 1.38: +25 -7 lines
Diff to previous 1.38 (colored) to selected 1.1.4.1 (colored)

Apply patch proposed in PR port-xen/45975 (this does not solve the exact
problem reported here but is part of the solution):
xen_kpm_sync() is not working as expected,
leading to races between CPUs.
1 the check (xpq_cpu != &x86_curcpu) is always false because we
  have different x86_curcpu symbols with different addresses in the kernel.
  Fortunably, all addresses dissaemble to the same code.
  Because of this we always use the code intended for bootstrap, which doesn't
  use cross-calls or lock.

2 once 1 above is fixed, xen_kpm_sync() will use xcalls to sync other CPUs,
  which cause it to sleep and pmap.c doesn't like that. It triggers this
  KASSERT() in pmap_unmap_ptes():
  KASSERT(pmap->pm_ncsw == curlwp->l_ncsw);
3 pmap->pm_cpus is not safe for the purpose of xen_kpm_sync(), which
  needs to know on which CPU a pmap is loaded *now*:
  pmap->pm_cpus is cleared before cpu_load_pmap() is called to switch
  to a new pmap, leaving a window where a pmap is still in a CPU's
  ci_kpm_pdir but not in pm_cpus. As a virtual CPU may be preempted
  by the hypervisor at any time, it can be large enough to let another
  CPU free the PTP and reuse it as a normal page.

To fix 2), avoid cross-calls and IPIs completely, and instead
use a mutex to update all CPU's ci_kpm_pdir from the local CPU.
It's safe because we just need to update the table page, a tlbflush IPI will
happen later. As a side effect, we don't need a different code for bootstrap,
fixing 1). The mutex added to struct cpu needs a small headers reorganisation.

to fix 3), introduce a pm_xen_ptp_cpus which is updated from
cpu_pmap_load(), whith the ci_kpm_mtx mutex held. Checking it with
ci_kpm_mtx held will avoid overwriting the wrong pmap's ci_kpm_pdir.

While there I removed the unused pmap_is_active() function;
and added some more details to DIAGNOSTIC panics.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jan 12 19:49:37 2012 UTC (12 years, 2 months ago) by cherry
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.37: +3 -5 lines
Diff to previous 1.37 (colored) to selected 1.1.4.1 (colored)

relocate pte_lock initialisation to the earliest points after %fs is first usable in the XEN bootpath

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jan 9 13:04:13 2012 UTC (12 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.36: +5 -2 lines
Diff to previous 1.36 (colored) to selected 1.1.4.1 (colored)

Make cross-cpu pte access MP safe.
XXX: review cases of use of pmap_set_pte() vs direct use of xpq_queue_pte_update()

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:44 2011 UTC (12 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.34: +59 -66 lines
Diff to previous 1.34 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.36 / (download) - annotate - [select for diffs], Sun Nov 6 15:18:19 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.35: +28 -9 lines
Diff to previous 1.35 (colored) to selected 1.1.4.1 (colored)

[merging from cherry-xenmp] make pmap_kernel() shadow PMD per-cpu and MP aware.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Nov 6 11:40:47 2011 UTC (12 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.34: +33 -59 lines
Diff to previous 1.34 (colored) to selected 1.1.4.1 (colored)

[merging from cherry-xenmp] Make the xen MMU op queue locking api private. Implement per-cpu queues.

Revision 1.26.2.12 / (download) - annotate - [select for diffs], Fri Oct 21 18:08:44 2011 UTC (12 years, 5 months ago) by bouyer
Branch: cherry-xenmp
Changes since 1.26.2.11: +2 -4 lines
Diff to previous 1.26.2.11 (colored) to branchpoint 1.26 (colored) next main 1.27 (colored) to selected 1.1.4.1 (colored)

Make this build without 'options MULTIPROCESSOR'

Revision 1.26.2.11 / (download) - annotate - [select for diffs], Tue Sep 20 18:57:53 2011 UTC (12 years, 6 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.10: +15 -61 lines
Diff to previous 1.26.2.10 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Remove the "xpq lock", since we have per-cpu mmu queues now. This may need further testing. Also add some preliminary locking around queue-ops in the network backend driver

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 20 00:12:24 2011 UTC (12 years, 6 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) to selected 1.1.4.1 (colored)

Merge jym-xensuspend branch in -current. ok bouyer@.

Goal: save/restore support in NetBSD domUs, for i386, i386 PAE and amd64.

Executive summary:
- split all Xen drivers (xenbus(4), grant tables, xbd(4), xennet(4))
in two parts: suspend and resume, and hook them to pmf(9).
- modify pmap so that Xen hypervisor does not cry out loud in case
it finds "unexpected" recursive memory mappings
- provide a sysctl(7), machdep.xen.suspend, to command suspend from
userland via powerd(8). Note: a suspend can only be handled correctly
when dom0 requested it, so provide a mechanism that will prevent
kernel to blindly validate user's commands

The code is still in experimental state, use at your own risk: restore
can corrupt backend communications rings; this can completely thrash
dom0 as it will loop at a high interrupt level trying to honor
all domU requests.

XXX PAE suspend does not work in amd64 currently, due to (yet again!)
page validation issues with hypervisor. Will fix.

XXX secondary CPUs are not suspended, I will write the handlers
in sync with cherry's Xen MP work.

Tested under i386 and amd64, bear in mind ring corruption though.

No build break expected, GENERICs and XEN* kernels should be fine.
./build.sh distribution still running. In any case: sorry if it does
break for you, contact me directly for reports.

Revision 1.26.2.10 / (download) - annotate - [select for diffs], Sun Sep 18 16:48:23 2011 UTC (12 years, 6 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.9: +11 -8 lines
Diff to previous 1.26.2.9 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Make the xpq locking per-cpu

Revision 1.26.2.9 / (download) - annotate - [select for diffs], Fri Sep 9 11:53:43 2011 UTC (12 years, 6 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.8: +4 -4 lines
Diff to previous 1.26.2.8 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

fix amd64 boot.

Revision 1.26.2.8 / (download) - annotate - [select for diffs], Tue Aug 30 12:53:46 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.7: +24 -7 lines
Diff to previous 1.26.2.7 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Add per-cpu mmu queues

Revision 1.12.4.15 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:32 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.14: +185 -10 lines
Diff to previous 1.12.4.14 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Aug 21 10:00:13 2011 UTC (12 years, 7 months ago) by jym
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored) to selected 1.1.4.1 (colored)

Merge err printf with the panic(9) message.

Also fix the if () {...} statement with braces, to avoid calling panic()
every time. Hi cherry!

Revision 1.26.2.7 / (download) - annotate - [select for diffs], Sat Aug 20 19:22:47 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.6: +8 -6 lines
Diff to previous 1.26.2.6 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

PAE MP support (preliminary), amd64 per-cpu L4 model redesigned, i386 pmap_pa_start/end fixup

Revision 1.26.2.6 / (download) - annotate - [select for diffs], Wed Aug 17 09:40:40 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.5: +30 -20 lines
Diff to previous 1.26.2.5 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Pullup relevant changes from -current

Revision 1.32 / (download) - annotate - [select for diffs], Sat Aug 13 20:24:19 2011 UTC (12 years, 7 months ago) by cherry
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored) to selected 1.1.4.1 (colored)

Call the right function
(fix for an egregious error)

Revision 1.31 / (download) - annotate - [select for diffs], Sat Aug 13 12:09:38 2011 UTC (12 years, 7 months ago) by cherry
Branch: MAIN
Changes since 1.30: +8 -3 lines
Diff to previous 1.30 (colored) to selected 1.1.4.1 (colored)

Add locking around ops to the hypervisor MMU "queue".

Revision 1.30 / (download) - annotate - [select for diffs], Sat Aug 13 11:41:57 2011 UTC (12 years, 7 months ago) by cherry
Branch: MAIN
Changes since 1.29: +28 -19 lines
Diff to previous 1.29 (colored) to selected 1.1.4.1 (colored)

remove unnecessary locking overhead for UP

Revision 1.29 / (download) - annotate - [select for diffs], Wed Aug 10 09:50:37 2011 UTC (12 years, 7 months ago) by cherry
Branch: MAIN
Changes since 1.28: +164 -5 lines
Diff to previous 1.28 (colored) to selected 1.1.4.1 (colored)

Introduce locking primitives for Xen pte operations, and xen helper calls for MP related MMU ops

Revision 1.26.2.5 / (download) - annotate - [select for diffs], Sun Jul 31 20:49:11 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.4: +7 -4 lines
Diff to previous 1.26.2.4 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

grow MP support for i386. boots to single user

Revision 1.26.2.4 / (download) - annotate - [select for diffs], Sat Jul 16 10:59:46 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.3: +24 -9 lines
Diff to previous 1.26.2.3 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Introduce a per-cpu "shadow" for pmap_kernel()'s L4 page

Revision 1.26.2.3 / (download) - annotate - [select for diffs], Mon Jun 27 10:23:21 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.2: +4 -2 lines
Diff to previous 1.26.2.2 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Add xpq locking around xpq_queue_tlb_flush()

Revision 1.26.2.2 / (download) - annotate - [select for diffs], Thu Jun 23 14:19:50 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26.2.1: +8 -6 lines
Diff to previous 1.26.2.1 (colored) to branchpoint 1.26 (colored) to selected 1.1.4.1 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jun 15 20:50:02 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.27: +6 -5 lines
Diff to previous 1.27 (colored) to selected 1.1.4.1 (colored)

Few XEN fixes:
- cpu_load_pmap: perform tlbflush() after xen_set_user_pgd().
- xen_pmap_bootstrap: perform xpq_queue_tlb_flush() in the end.
- pmap_tlb_shootdown: do not check PG_G for Xen.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jun 15 19:54:16 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored) to selected 1.1.4.1 (colored)

- 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.

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:07:11 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.23: +16 -35 lines
Diff to previous 1.23 (colored) next main 1.24 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.26.2.1 / (download) - annotate - [select for diffs], Fri Jun 3 13:27:41 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.26: +167 -6 lines
Diff to previous 1.26 (colored) to selected 1.1.4.1 (colored)

Initial import of xen MP sources, with kernel and userspace tests.
 - this is a source priview.
 - boots to single user.
 - spurious interrupt and pmap related panics are normal

Revision 1.19.2.3 / (download) - annotate - [select for diffs], Tue May 31 03:04:24 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.19.2.2: +1 -1 lines
Diff to previous 1.19.2.2 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.26 / (download) - annotate - [select for diffs], Sun May 8 00:18:25 2011 UTC (12 years, 10 months ago) by jym
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.1.4.1 (colored)

Print the PGD address in the debug message.

Revision 1.12.4.14 / (download) - annotate - [select for diffs], Mon May 2 22:49:58 2011 UTC (12 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.13: +0 -0 lines
Diff to previous 1.12.4.13 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with head.

Revision 1.19.2.2 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:34 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.19.2.1: +1 -1 lines
Diff to previous 1.19.2.1 (colored) to branchpoint 1.19 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.12.4.13 / (download) - annotate - [select for diffs], Wed Mar 30 23:15:05 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.12: +2 -2 lines
Diff to previous 1.12.4.12 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with my commits in HEAD.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Mar 29 23:51:32 2011 UTC (13 years ago) by jym
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored) to selected 1.1.4.1 (colored)

Typo fix.

Revision 1.12.4.12 / (download) - annotate - [select for diffs], Tue Mar 29 20:43:01 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.11: +3 -5 lines
Diff to previous 1.12.4.11 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

More sync fixes. And add the mbr_gpt files.

Revision 1.12.4.11 / (download) - annotate - [select for diffs], Mon Mar 28 23:58:12 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.10: +3 -4 lines
Diff to previous 1.12.4.10 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Cure sync hiccups. Code with compile errors is not really useful, heh.

Revision 1.12.4.10 / (download) - annotate - [select for diffs], Mon Mar 28 23:04:56 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.9: +10 -9 lines
Diff to previous 1.12.4.9 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.

Revision 1.19.2.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:52:34 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.19: +33 -47 lines
Diff to previous 1.19 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Thu Feb 17 12:00:07 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.23: +14 -33 lines
Diff to previous 1.23 (colored) next main 1.24 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.24 / (download) - annotate - [select for diffs], Thu Feb 10 00:23:14 2011 UTC (13 years, 1 month ago) by jym
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.23: +14 -33 lines
Diff to previous 1.23 (colored) to selected 1.1.4.1 (colored)

Use only one function to pin pages with Xen, and provide macros to
call it for different levels (L1 => L4).

Replace all calls to xpq_queue_pin_table(...) in MD code with these new
functions, with proper #ifdef'ing depending on $MACHINE.

Rationale:
- only one function to modify for logging
- pushes responsibility to caller for chosing the proper pin level, rather
than Xen internal functions; this makes the pin level explicit rather than
implicit.

Boot tested for dom0 i386/amd64, PAE included. No functional change intended.

Revision 1.12.4.9 / (download) - annotate - [select for diffs], Mon Jan 10 00:37:39 2011 UTC (13 years, 2 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.8: +11 -8 lines
Diff to previous 1.12.4.8 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 20 21:18:45 2010 UTC (13 years, 3 months ago) by jym
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.22: +8 -6 lines
Diff to previous 1.22 (colored) to selected 1.1.4.1 (colored)

Now, get the return error too, in case that could help with EC2
troubleshooting...

Revision 1.22 / (download) - annotate - [select for diffs], Sun Dec 19 23:23:35 2010 UTC (13 years, 3 months ago) by jym
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored) to selected 1.1.4.1 (colored)

Need the successful count (for AMI debugging)

Revision 1.12.4.8 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:22 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.7: +69 -69 lines
Diff to previous 1.12.4.7 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:45:35 2010 UTC (13 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.17.2.1: +11 -9 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.8.4.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:52:59 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.8.4.4: +13 -11 lines
Diff to previous 1.8.4.4 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jul 24 00:45:56 2010 UTC (13 years, 8 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.20: +13 -11 lines
Diff to previous 1.20 (colored) to selected 1.1.4.1 (colored)

Welcome PAE inside i386 current.

This patch is inspired by work previously done by Jeremy Morse, ported by me
to -current, merged with the work previously done for port-xen, together with
additionals fixes and improvements.

PAE option is disabled by default in GENERIC (but will be enabled in ALL in
the next few days).

In quick, PAE switches the CPU to a mode where physical addresses become
36 bits (64 GiB). Virtual address space remains at 32 bits (4 GiB). To cope
with the increased size of the physical address, they are manipulated as
64 bits variables by kernel and MMU.

When supported by the CPU, it also allows the use of the NX/XD bit that
provides no-execution right enforcement on a per physical page basis.

Notes:

- reworked locore.S

- introduce cpu_load_pmap(), used to switch pmap for the curcpu. Due to the
different handling of pmap mappings with PAE vs !PAE, Xen vs native, details
are hidden within this function. This helps calling it from assembly,
as some features, like BIOS calls, switch to pmap_kernel before mapping
trampoline code in low memory.

- some changes in bioscall and kvm86_call, to reflect the above.

- the L3 is "pinned" per-CPU, and is only manipulated by a
reduced set of functions within pmap. To track the L3, I added two
elements to struct cpu_info, namely ci_l3_pdirpa (PA of the L3), and
ci_l3_pdir (the L3 VA). Rest of the code considers that it runs "just
like" a normal i386, except that the L2 is 4 pages long (PTP_LEVELS is
still 2).

- similar to the ci_pae_l3_pdir{,pa} variables, amd64's xen_current_user_pgd
becomes an element of cpu_info (slowly paving the way for MP world).

- bootinfo_source struct declaration is modified, to cope with paddr_t size
change with PAE (it is not correct to assume that bs_addr is a paddr_t when
compiled with PAE - it should remain 32 bits). bs_addrs is now a
void * array (in bootloader's code under i386/stand/, the bs_addrs
is a physaddr_t, which is an unsigned long).

- fixes in multiboot code (same reason as bootinfo): paddr_t size
change. I used Elf32_* types, use RELOC() where necessary, and move the
memcpy() functions out of the if/else if (I do not expect sym and str tables
to overlap with ELF).

- 64 bits atomic functions for pmap

- all pmap_pdirpa access are now done through the pmap_pdirpa macro. It
hides the L3/L2 stuff from PAE, as well as the pm_pdirpa change in
struct pmap (it now becomes a PDP_SIZE array, with or without PAE).

- manipulation of recursive mappings ( PDIR_SLOT_{,A}PTEs ) is done via
loops on PDP_SIZE.

See also http://mail-index.netbsd.org/port-i386/2010/07/17/msg002062.html

No objection raised on port-i386@ and port-xen@R for about a week.

XXX kvm(3) will be fixed in another patch to properly handle both PAE and !PAE
kernel dumps (VA => PA macros are slightly different, and need proper 64 bits
PA support in kvm_i386).

XXX Mixing PAE and !PAE modules may lead to unwanted/unexpected results. This
cannot be solved easily, and needs lots of thinking before being declared
safe (paddr_t/bus_addr_t size handling, PD/PT macros abstractions).

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jul 15 23:20:34 2010 UTC (13 years, 8 months ago) by jym
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.1.4.1 (colored)

With Xen, PDPpaddr should contain a guest physical address (== PFN).

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:40:00 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.17: +57 -59 lines
Diff to previous 1.17 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.8.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:10 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.8.4.3: +57 -69 lines
Diff to previous 1.8.4.3 (colored) to branchpoint 1.8 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.19 / (download) - annotate - [select for diffs], Fri Feb 26 19:25:07 2010 UTC (14 years, 1 month ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.18: +57 -58 lines
Diff to previous 1.18 (colored) to selected 1.1.4.1 (colored)

Fixes regarding paddr_t/pd_entry_t types in MD x86 code, exposed by PAE:

- NBPD_* macros are set to the types that better match their architecture
(UL for i386 and amd64, ULL for i386 PAE) - will revisit when paddr_t is
set to 64 bits for i386 non-PAE.

- type fixes in printf/printk messages (Use PRIxPADDR when printing paddr_t
values, instead of %lx - paddr_t/pd_entry_t being 64 bits with PAE)

- remove casts that are no more needed now that Xen2 support has been dropped

Some fixes are from jmorse@ patches for PAE.

Compile + tested for i386 GENERIC and XEN3 kernels. Only compile tested for
amd64.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/22/msg007373.html

Revision 1.18 / (download) - annotate - [select for diffs], Fri Feb 12 01:55:45 2010 UTC (14 years, 1 month ago) by jym
Branch: MAIN
Changes since 1.17: +2 -3 lines
Diff to previous 1.17 (colored) to selected 1.1.4.1 (colored)

Starting with Xen 3 API, MMU_EXTENDED_COMMAND (tlb flush, cache flush, page
pinning/unpinning, set_ldt, invlpg) operations cannot be queued in the
xpq_queue[] any more, as they use their own specific hypercall, mmuext_op().

Their associated xpq_queue_*() functions already call xpq_flush_queue()
before issuing the mmuext_op() hypercall, which makes these xpq_flush_queue()
calls not necessary.

Rapidly discussed with bouyer@ in private mail. XEN3_DOM0/XEN3PAE_DOM0 tested
through a build.sh release, amd64 was only compile tested. No regression
expected.

Revision 1.12.4.7 / (download) - annotate - [select for diffs], Sun Nov 1 21:43:28 2009 UTC (14 years, 4 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.6: +15 -32 lines
Diff to previous 1.12.4.6 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

- Upgrade suspend/resume code to comply with Xen2 removal.
- Add support for PAE domUs suspend/resume.
- Fix an issue regarding initialization of the xbd ring I/O that could end
badly during resume, with invalid block operations submitted to dom0 backend.

NetBSD supports PAE under x86_32 by considering the L2 page as being
4 pages long instead of 1.

Xen validates the page types during resume. Sadly, the hypervisor handles
alternative recursive mappings (== PG/PD entries pointing to pages other
than self) inadequately, which could lead to incorrect page pinning.

As a result, the important change with this patch is to clear these alternative
mappings during suspend, and reset them back to their former self upon
resume. For PAE, approx. all 4 PDIR_SLOT_PTEs could be considered as
alternative recursive mappings.

See comments in pmap.c for further details.

Now, let the testing and bug hunting begin.

Revision 1.12.4.6 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:46 2009 UTC (14 years, 4 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.5: +33 -179 lines
Diff to previous 1.12.4.5 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Oct 23 02:32:34 2009 UTC (14 years, 5 months ago) by snj
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.16: +2 -7 lines
Diff to previous 1.16 (colored) to selected 1.1.4.1 (colored)

Remove 3rd and 4th clauses.  OK cl@ (copyright holder).

Revision 1.16 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:11 2009 UTC (14 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.15: +2 -7 lines
Diff to previous 1.15 (colored) to selected 1.1.4.1 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.8.4.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:54 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.8.4.2: +6 -103 lines
Diff to previous 1.8.4.2 (colored) to branchpoint 1.8 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jul 29 12:02:08 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.14: +2 -99 lines
Diff to previous 1.14 (colored) to selected 1.1.4.1 (colored)

remove Xen2 support.
ok bouyer@

Revision 1.12.4.5 / (download) - annotate - [select for diffs], Fri Jul 24 11:30:28 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.4: +15 -32 lines
Diff to previous 1.12.4.4 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

- rework the page pinning API, so that now a function is provided for
each level of indirection encountered during virtual memory translations. Update
pmap accordingly. Pinning looks cleaner that way, and it offers the possibility
to pin lower level pages if necessary (NetBSD does not do it currently).

- some fixes and comments to explain how page validation/invalidation take
place during save/restore/migrate under Xen. L2 shadow entries from PAE are now
handled, so basically, suspend/resume works with PAE.

- fixes an issue reported by Christoph (cegger@) for xencons suspend/resume
in dom0.

TODO:

- PAE save/restore is currently limited to single-user only, multi-user
support requires modifications in PAE pmap that should be discussed first. See
the comments about the L2 shadow pages cached in pmap_pdp_cache in this commit.

- grant table bug is still there; do not use the kernels of this branch
to test suspend/resume, unless you want to experience bad crashes in dom0,
and push the big red button.

Now there is light at the end of the tunnel :)

Note: XEN2 kernels will neither build nor work with this branch.

Revision 1.12.4.4 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:37 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.3: +22 -13 lines
Diff to previous 1.12.4.3 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jul 23 15:26:20 2009 UTC (14 years, 8 months ago) by jym
Branch: MAIN
CVS Tags: jymxensuspend-base
Changes since 1.13: +6 -6 lines
Diff to previous 1.13 (colored) to selected 1.1.4.1 (colored)

Fix typos in comments and __PRINTKs.

Revision 1.8.4.2 / (download) - annotate - [select for diffs], Sat Jul 18 14:52:56 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.8.4.1: +18 -9 lines
Diff to previous 1.8.4.1 (colored) to branchpoint 1.8 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jun 20 10:24:28 2009 UTC (14 years, 9 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6
Changes since 1.12: +18 -9 lines
Diff to previous 1.12 (colored) to selected 1.1.4.1 (colored)

sprintf -> snprintf. Wrap long lines.

Revision 1.12.4.3 / (download) - annotate - [select for diffs], Sun May 31 20:15:37 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.2: +7 -5 lines
Diff to previous 1.12.4.2 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Modifications for the Xen suspend/migrate/resume branch:

- introduce xenbus_device_{suspend,resume}() functions. These are routines
used to suspend/resume MI parts of the Xenbus device interfaces, like updating
frontend/backend devices' paths found in XenStore.

- introduce HYPERVISOR_sysctl(), an hypercall used only by Xentools to obtain
information from hypervisor (listing VMs, printing console, etc.). I use it
to query xenconsole from ddb(), as a last resort in case of a panic() in
dom0 (xm being not available). Currently unused in the branch; could be, if
requested.

- disable the rwlock(9) used to protect code that could use transient MFNs.
It could trigger nasty context switches in place it should not to.

- fix some bugs in the xennet/xbd suspend/resume pmf(9) handlers.

- following XenSource's design, talk_to_otherend() is now called
watch_otherend(), and free_otherend_details() is used by Xenbus device
suspend/resume routines.

- some slight modifications in pmap regarding APDP. Introduce an inline
function (pmap_unmap_apdp_pde()) that clears APDP entry for the current pmap.

- similarly, implement pmap_unmap_all_apdp_pdes() that iterates through all
pmaps and tears down APDP, as Xen does not handle them properly.

TODO/XXX:

- pmap_unmap_apdp_pde() does not handle APDP shadow entry of PAE. It will,
once I figure out how PAE uses it.

- revisit the pmap locking issue regarding transient MFNs. As NetBSD does not
use kernel preemption and MP for Xen, this could be skipped momentarily. See
http://mail-index.netbsd.org/port-xen/2009/04/27/msg004903.html for details.

- fix a bug regarding grant tables which could technically DoS a dom0 if
ridiculously high consumer/producer indexes are passed down in the ring during
a resume.

All in all, once the grant table index issue and APDP PAE are fixed, next step
is to torture test this branch.

Tested under i386 PAE and non-PAE, Xen3 dom0 and domU. amd64 is only compile
tested.

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Wed May 13 17:18:50 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.12.4.1: +2 -3 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.8.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:12:14 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.8: +12 -9 lines
Diff to previous 1.8 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Mon Feb 9 00:03:55 2009 UTC (15 years, 1 month ago) by jym
Branch: jym-xensuspend
Changes since 1.12: +58 -3 lines
Diff to previous 1.12 (colored) to selected 1.1.4.1 (colored)

Initial code for xen save/restore/migrate facilities.

- split the attach code of frontends in two half: one that is only needed
during autoconf(9) attach/detach phases, and one used at each save/restore
of device state (between suspend and resume).

Applies to hypervisor, xencons, xenbus, xbd, and xennet.

- add a rwlock(9) ("ptom_lock") to protect the different parts in the kernel
 that manipulate MFNs (which could change between a suspend and a resume,
without the kernel noticing it). Parts that require MFNs acquire a reader lock,
while suspend code will acquire a writer lock to ensure that no-other parts
in kernel still use MFNs.

- integrate the suspend code with sysmon.

- various things in pmap(9), and clock.

TODO:
- factorize code a bit more inside frontends drivers.
- remove all alternative recursive (APDP_PDE) mappings found in PD/PT during
suspend, as Xen does not support them.
- abstract the ptom_lock locking, it is only required when kernel preemption
is enabled, or on MP systems.

Current code works mostly. You may experience difficulties in some corner
cases (dom0 warnings about xennet interface errors, and Xen tools failing to
 validate NetBSD's alternative pmaps).

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:12 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.7.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:39 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.7.6.2: +7 -6 lines
Diff to previous 1.7.6.2 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.8.10.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:43 2008 UTC (15 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.8.10.1: +9 -8 lines
Diff to previous 1.8.10.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.1.4.1 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 13 18:44:51 2008 UTC (15 years, 4 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored) to selected 1.1.4.1 (colored)

Finish preparation to new interface.
New interface not yet used by default. It needs some testing first.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Oct 24 21:09:24 2008 UTC (15 years, 5 months ago) by jym
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.10: +4 -3 lines
Diff to previous 1.10 (colored) to selected 1.1.4.1 (colored)

- rename init_events() to events_init(), to better reflect netbsd semantics

- change unbind_[pv]irq_from_evtch() so that they now return the event
channel the [PV]IRQ was bound to. It reflects the opposite behaviour of the
bind_[pv]irq_to_evtch() functions.

- remove xenbus_suspend() and xenbus_resume() prototypes, as they are not
used anywhere else, and will conflict with the xenbus pmf(9) handlers.

- make start_info aligned on a page boundary, as Xen expects it to be so.

- mask event channel during xbd detach before removing its handler (can
avoid spurious events).

- add the "protocol" entry in xenstore during xbd initialization. Normally
created during domU's boot by xentools, it is under domU's responsibility
in all other cases (save/restore, hot plugging, etc.).

- modifications to xs_init(), so that it can properly return an error.

Reviewed by Christoph (cegger@).

Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 21 15:46:32 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored) to selected 1.1.4.1 (colored)

introduce two macros: xendomain_is_dom0() and xendomain_is_privileged(). Use them.

Revision 1.8.10.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:13 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.8: +5 -3 lines
Diff to previous 1.8 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.7.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:14 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.7.6.1: +3 -1 lines
Diff to previous 1.7.6.1 (colored) to branchpoint 1.7 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:33:39 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.8: +5 -3 lines
Diff to previous 1.8 (colored) next main 1.9 (colored) to selected 1.1.4.1 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Sep 5 13:37:24 2008 UTC (15 years, 6 months ago) by tron
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, haad-dm-base1
Changes since 1.8: +5 -3 lines
Diff to previous 1.8 (colored) to selected 1.1.4.1 (colored)

Compile NetBSD/amd64 kernels with "-Wextra". Patches contributed by
Juan RP in PR port-amd64/39266.

Revision 1.7.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:54 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.7: +17 -17 lines
Diff to previous 1.7 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Apr 14 13:38:03 2008 UTC (15 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa, haad-dm
Changes since 1.7: +17 -17 lines
Diff to previous 1.7 (colored) to selected 1.1.4.1 (colored)

- use POSIX integer types
- ansify functions

Revision 1.3.16.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:30 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.3.16.2: +343 -144 lines
Diff to previous 1.3.16.2 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.4.1 (colored)

sync with HEAD

Revision 1.3.8.5 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:29 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.8.4: +8 -6 lines
Diff to previous 1.3.8.4 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:20 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.1.4.1: +343 -144 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Feb 17 17:39:42 2008 UTC (16 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.6: +8 -6 lines
Diff to previous 1.6 (colored) to selected 1.1.4.1 (colored)

The informations about console and store page number are long, so avoid
overflow on i386PAE when converting to machine address. Fix booting
XEN3PAE kernels when xen maps it above 4Gb.

Revision 1.3.8.4 / (download) - annotate - [select for diffs], Mon Feb 4 09:22:56 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.8.3: +211 -85 lines
Diff to previous 1.3.8.3 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

sync with head.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 23 19:46:46 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.5: +211 -85 lines
Diff to previous 1.5 (colored) to selected 1.1.4.1 (colored)

Merge the bouyer-xeni386 branch. This brings in PAE support to NetBSD xeni386
(domU only). PAE support is enabled by 'options PAE', see the new XEN3PAE_DOMU
and INSTALL_XEN3PAE_DOMU kernel config files.

See the comments in arch/i386/include/{pte.h,pmap.h} to see how it works.
In short, we still handle it as a 2-level MMU, with the second level page
directory being 4 pages in size. pmap switching is done by switching the
L2 pages in the L3 entries, instead of loading %cr3. This is almost required
by Xen, which handle the last L2 page (the one mapping 0xc0000000 - 0xffffffff)
in a very special way. But this approach should also work for native PAE
support if ever supported (in fact, the pmap should almost suport native
PAE, what's missing is bootstrap code in locore.S).

Revision 1.3.8.3 / (download) - annotate - [select for diffs], Mon Jan 21 09:40:33 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.8.2: +143 -72 lines
Diff to previous 1.3.8.2 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.3.12.14 / (download) - annotate - [select for diffs], Sun Jan 20 16:59:04 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.13: +2 -3 lines
Diff to previous 1.3.12.13 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.4.1 (colored)

Remove debug printk()

Revision 1.3.12.13 / (download) - annotate - [select for diffs], Sat Jan 19 12:14:51 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.12: +9 -2 lines
Diff to previous 1.3.12.12 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD

Revision 1.3.12.12 / (download) - annotate - [select for diffs], Fri Jan 18 21:32:28 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.11: +4 -2 lines
Diff to previous 1.3.12.11 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Fix APDP handling. A XEN i386PAE kernel now boots multiuser

Revision 1.3.12.11 / (download) - annotate - [select for diffs], Thu Jan 17 19:15:25 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.10: +34 -18 lines
Diff to previous 1.3.12.10 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

- Fix L2_SLOT_APTE value (not sure how I got this value but it was definitively
  wrong)
- Use global variable for the PAE L3 page adresses, so that pmap.c can get it
  from the bootstrap code
- Extent the size of our virtual PDP from 3 to 4 pages, so that pmap->pm_pdir[]
  is contigous for the whole VA range. The last page is a shadow of
  the kernel's real PDP (L3[3]).
- make pm_pdirpa an array of 4 paddr_t if using PAE. introduce a
  pmap_pdirpa macro to get the physical address of a given PD entry.
- fix pmap_map_pte

The kernel now boots single-user. fsck will cause a kernel fault in
pmap_pdes_invalid() on exit.

Revision 1.3.12.10 / (download) - annotate - [select for diffs], Tue Jan 15 22:15:58 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.9: +45 -25 lines
Diff to previous 1.3.12.9 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Snapshot of work in progress: an Xen i386PAE kernel boots and start init
on a amd64 dom0, but panics when init forks.
This code needs a lot of cleanup, and the pmap handling is minimal to
allow init to start. It's a proof of concept of how PAE on Xen can work.

For PAE guest, the Xen MMU handling differs in some significant way
from the i386 or amd64 Xen.
The L3 page has only 4 entries, the last one mapping 0xc0000000->0xffffffff
(which happens to be our kenrel VM range, that's cool). The L2 page
pointed to by this last entry is handled specially by Xen because it
contains some Xen private mapping, including a recursive mapping. So this
page can only be pointed to by exactly one L3 entry, and nothing else
(it can't be part of a recursive mapping for example). In addition, it
would waste too much VA space to do recursive mapping at the L3 level.

We do pmap switching at the L# level, instead of doing it though %cr3.
%cr3 is static, as is L3[3] which contains only kenrel mappings.
pmap_load() does pmap switching though the first 3 entries for L3.

PTE mapping is done though 4 contigous L2 entries; the last one pointing
to a shadow of L3[3]. This way we can consider we have a 2-level VM system,
but with the L2 being 4 pages in size instead of one. The plx_i()
macros can be used with it to access the PTE without changes.

This can be reused as is for native PAE support (without the L3[3] shadow
which wouldn't be needed here)

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 15 19:55:53 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.4: +11 -4 lines
Diff to previous 1.4 (colored) to selected 1.1.4.1 (colored)

Allocate one more L2 slot in xen_pmap_bootstrap() for i386.
pmap_bootstrap()/init386() wants to map a few additionnal things after
first_avail that we didn't account for, before pmap_growkernel() is
used/functionnal, and if the loaded kernel is close to the end of
the last L2 slot we loose. Should fix port-xen/37761 by YAMAMOTO Takashi.

Fix a XENPRINTF() so that low debug builds again.

Revision 1.3.12.9 / (download) - annotate - [select for diffs], Sun Jan 13 19:02:50 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.8: +114 -27 lines
Diff to previous 1.3.12.8 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Add i386PAE suport for bootstrap.

Revision 1.3.12.8 / (download) - annotate - [select for diffs], Sun Jan 13 11:27:00 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.7: +79 -77 lines
Diff to previous 1.3.12.7 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Work in progress on xeni386 PAE support:
Make xeni386 build with a 64bit paddr_t. For this vaddr_t vs paddr_t vs
pointers usages had to be clarified.
If 'options PAE' is present in a Xen3 kernel, switch paddr_t, pd_entry_t
and pt_entry_t to 64bits, and add the PAE entry in the __xen_guest ELF section.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 11 20:00:52 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.3: +134 -70 lines
Diff to previous 1.3 (colored) to selected 1.1.4.1 (colored)

Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.

Revision 1.3.12.7 / (download) - annotate - [select for diffs], Fri Jan 11 17:06:41 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.3.12.6: +6 -6 lines
Diff to previous 1.3.12.6 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Ops, fix XENPRINTK usage.

Revision 1.3.12.6 / (download) - annotate - [select for diffs], Fri Jan 11 16:40:51 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.5: +5 -5 lines
Diff to previous 1.3.12.5 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

printk -> XENPRINTK

Revision 1.3.12.5 / (download) - annotate - [select for diffs], Wed Jan 9 19:25:08 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.4: +5 -21 lines
Diff to previous 1.3.12.4 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Merge xen bits to i386/i386/gdt.c. Convert remaining uses of PTE_* macros to
pmap_pte_* macros/inlines.
Fix think-o in pmap.c for native i386.

Revision 1.3.16.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:15 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.3.16.1: +807 -0 lines
Diff to previous 1.3.16.1 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

sync with HEAD

Revision 1.3.12.4 / (download) - annotate - [select for diffs], Sat Jan 5 19:31:29 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.3: +6 -5 lines
Diff to previous 1.3.12.3 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Make it build on for XEN2_*

Revision 1.3.12.3 / (download) - annotate - [select for diffs], Sat Dec 15 22:56:55 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.2: +38 -17 lines
Diff to previous 1.3.12.2 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Switch xen/i386 to the x86 xen_pmap_bootstrap().

Revision 1.3.12.2 / (download) - annotate - [select for diffs], Sat Dec 15 16:28:29 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3.12.1: +93 -58 lines
Diff to previous 1.3.12.1 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

Cleanup xen_pmap_bootstrap() and make it build on i386.

Revision 1.3.12.1 / (download) - annotate - [select for diffs], Tue Dec 11 23:03:02 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.3: +31 -8 lines
Diff to previous 1.3 (colored) to selected 1.1.4.1 (colored)

Switch i386 to x86/x86/pmap.c

Revision 1.1.4.1 / (download) - annotate - [selected], Sat Dec 8 18:18:24 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.1: +807 -0 lines
Diff to previous 1.1 (colored)

Sync with HEAD.

Revision 1.3.8.2 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:18 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3.8.1: +807 -0 lines
Diff to previous 1.3.8.1 (colored) to branchpoint 1.3 (colored) to selected 1.1.4.1 (colored)

sync with head

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon Dec 3 19:04:43 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.3.4.1: +1614 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD.

Revision 1.3.2.2 / (download) - annotate - [select for diffs], Tue Nov 27 19:36:22 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3.2.1: +807 -0 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored) to selected 1.1.4.1 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.3.16.1, Fri Nov 23 09:54:33 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
Changes since 1.3: +0 -807 lines
FILE REMOVED

file x86_xpmap.c was added on branch matt-armv6 on 2008-01-09 01:50:15 +0000

Revision 1.3.8.1, Fri Nov 23 09:54:33 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.3: +0 -807 lines
FILE REMOVED

file x86_xpmap.c was added on branch yamt-lazymbuf on 2007-12-07 17:27:18 +0000

Revision 1.3.4.1, Fri Nov 23 09:54:33 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.3: +0 -807 lines
FILE REMOVED

file x86_xpmap.c was added on branch vmlocking on 2007-12-03 19:04:42 +0000

Revision 1.3.2.1, Fri Nov 23 09:54:33 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3: +0 -807 lines
FILE REMOVED

file x86_xpmap.c was added on branch jmcneill-pm on 2007-11-27 19:36:22 +0000

Revision 1.3 / (download) - annotate - [select for diffs], Fri Nov 23 09:54:33 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-lazymbuf, vmlocking, matt-armv6, jmcneill-pm, bouyer-xeni386
Changes since 1.2: +5 -4 lines
Diff to previous 1.2 (colored) to selected 1.1.4.1 (colored)

xpq_flush_queue(): cast values to u_int64_t and use PRIx64 in printf().
Fix build of i386 Xen kernels, reported by Hisashi T Fujinaka.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Nov 22 16:17:05 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.1: +806 -0 lines
Diff to previous 1.1 (colored) to selected 1.1.4.1 (colored)

Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Thu Nov 22 15:29:01 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1.2.5: +38 -23 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.1.4.1 (colored)

Disable debug messages

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Wed Nov 21 20:48:57 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1.2.4: +8 -3 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored) to selected 1.1.4.1 (colored)

When HYPERVISOR_mmu_update_self() fails in xpq_flush_queue(), dump the content
of the queue.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Mon Nov 19 19:50:40 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1.2.3: +334 -3 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) to selected 1.1.4.1 (colored)

Get rid of arch/xenamd64, step 3: merge xenamd64/amd64/xpmap.c in
xen/x86/x86_xpmap.c

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Oct 26 13:46:51 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1.2.2: +2 -4 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) to selected 1.1.4.1 (colored)

Make amd64, i386 and xen kernels build and work again.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Thu Oct 25 23:59:24 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1.2.1: +4 -2 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) to selected 1.1.4.1 (colored)

Finish sync with HEAD. Especially use the new x86 pmap for xenamd64.
For this:
- rename pmap_pte_set() to pmap_pte_testset()
- make pmap_pte_set() a function or macro for non-atomic PTE write
- define and use pmap_pa2pte()/pmap_pte2pa() to read/write PTE entries
- define pmap_pte_flush() which is a nop in x86 case, and flush the
  MMUops queue in the Xen case

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Oct 21 15:41:03 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.1: +455 -0 lines
Diff to previous 1.1 (colored) to selected 1.1.4.1 (colored)

Factorise some Xen pmap code in x86_xpmap.c.
More xpmap_{ptom,mtop} -> xpmap_{ptom,mtop}_masked

The xenamd64 kernel is now good enough to complete a sysinst install from
xennet to xbd.

Revision 1.1, Sun Oct 21 15:41:03 2007 UTC (16 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs, bouyer-xenamd64
FILE REMOVED

file x86_xpmap.c was initially added on branch bouyer-xenamd64.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>