The NetBSD Project

CVS log for src/sys/arch/x86/x86/x86_tlb.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Fri Dec 8 21:46:02 2023 UTC (4 months, 1 week ago) by andvar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

fix triple s typos in comments.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 20 23:48:51 2022 UTC (19 months, 4 weeks 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-RELEASE, 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
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Thu Oct 7 12:52:27 2021 UTC (2 years, 6 months ago) by msaitoh
Branch: MAIN
Changes since 1.18: +9 -9 lines
Diff to previous 1.18 (colored)

KNF. No functional change.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.2.2.1: +207 -157 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Merge changes from current as of 20200406

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 22 00:16:16 2020 UTC (4 years ago) by ad
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, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.17: +7 -10 lines
Diff to previous 1.17 (colored)

x86 pmap:

- Give pmap_remove_all() its own version of pmap_remove_ptes() that on native
  x86 does the bare minimum needed to clear out PTPs.  Cuts ~4% sys time on
  'build.sh release' for me.

- pmap_sync_pv(): there's no need to issue a redundant TLB shootdown.  The
  caller waits for the competing operation to finish.

- Bring 'options TLBSTATS' up to date.

Revision 1.13.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:33 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.13.2.1: +11 -7 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

Sync with head.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Feb 23 18:57:28 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.16: +7 -3 lines
Diff to previous 1.16 (colored)

Adjustment to previous: TP_SET_DONE() was wiping out the VA to shoot,
instead of ORing the flag into the array element.  This caused the CPU
initiating the shootdown to occasionally miss an INVLPG.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Feb 22 20:12:40 2020 UTC (4 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.15: +7 -7 lines
Diff to previous 1.15 (colored)

add relaxed atomics, ok ad@ riastradh@

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:28 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.13: +69 -62 lines
Diff to previous 1.13 (colored)

Sync with head.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 15 13:22:03 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.14: +69 -54 lines
Diff to previous 1.14 (colored)

Push the INVLPG limit for shootdowns up to 16 (for UBC).

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 12 13:01:11 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.13: +2 -10 lines
Diff to previous 1.13 (colored)

x86 pmap:

- It turns out that every page the pmap frees is necessarily zeroed.  Tell
  the VM system about this and use the pmap as a source of pre-zeroed pages.

- Redo deferred freeing of PTPs more elegantly, including the integration with
  pmap_remove_all().  This fixes problems with nvmm, and possibly also a crash
  discovered during fuzzing.

Reported-by: syzbot+a97186518c84f1d85c0c@syzkaller.appspotmail.com

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 16 19:17:25 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.12: +17 -24 lines
Diff to previous 1.12 (colored)

Align the TLB packet precisely on the stack, and do 7 INVLPG since it's
what fits in a single line.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 2 20:59:56 2019 UTC (4 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Fix tyo in comment

Revision 1.11 / (download) - annotate - [select for diffs], Mon Dec 2 19:49:12 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.10: +5 -3 lines
Diff to previous 1.10 (colored)

Fix a hard hang with Xen MP.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Nov 22 20:04:03 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.9: +3 -4 lines
Diff to previous 1.9 (colored)

Minor correction to previous.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Nov 21 21:48:33 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.8: +174 -126 lines
Diff to previous 1.8 (colored)

x86 TLB shootdown IPI changes:

- Shave some time off processing.
- Reduce cacheline/bus traffic on systems with many CPUs.
- Reduce time spent at IPL_VM.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:54 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.2: +20 -15 lines
Diff to previous 1.2 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Mon May 27 17:32:36 2019 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

Remove 'ci_svs_kpdirpa', unused. While here fix a few comments here and
there, reduces a future diff.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 21 06:37:21 2019 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.6: +8 -8 lines
Diff to previous 1.6 (colored)

Rename the PTE bits.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 21 12:17:52 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Another locking issue in NVMM: the {svm,vmx}_tlb_flush functions take VCPU
mutexes which can sleep, but their context does not allow it.

Rewrite the TLB handling code to fix that. It becomes a bit complex. In
short, we use a per-VM generation number, which we increase on each TLB
flush, before sending a broadcast IPI to everybody. The IPIs cause a
#VMEXIT of each VCPU, and each VCPU Loop will synchronize the per-VM gen
with a per-VCPU copy, and apply the flushes as neededi lazily.

The behavior differs between AMD and Intel; in short, on Intel we don't
flush the hTLB (EPT cache) if a context switch of a VCPU occurs, so now,
we need to maintain a kcpuset to know which VCPU's hTLBs are active on
which hCPU. This creates some redundancy on Intel, ie there are cases
where we flush the hTLB several times unnecessarily; but hTLB flushes are
very rare, so there is no real performance regression.

The thing is lock-less and non-blocking, so it solves our problem.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:33 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.4: +7 -7 lines
Diff to previous 1.4 (colored)

We reorganise definitions for XEN source support as follows:

XEN - common sources required for baseline XEN support.
XENPV - sources required for support of XEN in PV mode.
XENPVHVM - sources required for support for XEN in HVM mode.
XENPVH - sources required for support for XEN in PVH mode.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:24 2019 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.1.2.2: +2 -3 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Synch with HEAD

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jan 6 16:19:12 2019 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)

Flush the host TLB too when dealing with a guest pmap. The pmap is not
active on the host so the pages aren't cached; but the recursive PTE
entries may have been cached by our pmap code.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:28 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.1: +7 -2 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 7 07:14:51 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.2: +7 -2 lines
Diff to previous 1.2 (colored)

Add two pmap fields, will be used by NVMM.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Mon May 21 04:36:03 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1: +2 -4 lines
Diff to previous 1.1 (colored)

Sync with HEAD

Revision 1.2 / (download) - annotate - [select for diffs], Sat May 19 16:51:32 2018 UTC (5 years, 11 months ago) by jakllsch
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.1: +2 -4 lines
Diff to previous 1.1 (colored)

remove more vestiges of uvm_emap_*(), to fix x86 kernel linking

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jan 22 19:37:45 2018 UTC (6 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-base, 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

rename sys/arch/x86/x86/pmap_tlb.c to sys/arch/x86/x86/x86_tlb.c, so that
x86 can eventually use uvm/pmap/pmap_tlb.c; step to future PCID support

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>