CVS commit: src/sys/arch/x86/x86

2021-07-24 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jul 24 20:45:45 UTC 2021

Modified Files:
src/sys/arch/x86/x86: bios32.c

Log Message:
Build fix: vtophys takes vaddr_t, not a ptr


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/bios32.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-07-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Jul 10 17:33:28 UTC 2021

Modified Files:
src/sys/arch/x86/x86: procfs_machdep.c

Log Message:
 Add v_spec_ctrl, avx512_fp16, sme, sev and sev_es. Tested by nonaka@.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x86/x86/procfs_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-06-01 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Jun  2 06:48:10 UTC 2021

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
when warning about TSC going backwards, provide advice to the sysadmin.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-05-12 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed May 12 22:17:40 UTC 2021

Modified Files:
src/sys/arch/x86/x86: mpacpi.c

Log Message:
In mpacpi_pci_attach_hook(), set the device handle of the PCI bus instance
to the associated ACPI handle if a device handle is not already set.

XXX This is a mess. Sure would be nice if it looked / worked more like
XXX the ARM code.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/x86/x86/mpacpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-04-17 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Apr 17 18:03:21 UTC 2021

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Make pat_init() a NOOP on XENPV; it causes a trap with Xen 4.15


To generate a diff of this commit:
cvs rdiff -u -r1.409 -r1.410 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-04-11 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Apr 12 02:23:02 UTC 2021

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
make a numeric literal unsigned as it is bit-negated.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-03-06 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Mar  6 19:16:45 UTC 2021

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
return early from identify_hypervisor() if we already know we're running
Xen PV or PVH, as this was before 1.119.
Trying to read the BIOS faults (as expected, as there's no BIOS in this case).
Problem pointed out and fix tested by Brian Marcotte


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Feb 19 05:34:37 UTC 2021

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
Fix x86's pci_intr_disestablish clean up routine.  Pointed out by t-kusaba@IIJ, 
thanks.

Fix panic on x86 by the following code.

sc_ih = pci_intr_establish_xname(sc_pc, ...);
pci_intr_disestablish(sc_pc, sc_ih);
sc_ih = pci_intr_establish(sc_pc, ...);

ena(4) do such processing when ifconfig down/up.

XXX pullup-8,9


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 03:28:53 UTC 2021

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
It is not VirtualBo give some more space.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 02:18:10 UTC 2021

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
add VirtualBox


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 02:15:58 UTC 2021

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
Penalize TSC on VirtualBox because it is not accurate enough.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-16 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Feb 17 06:33:48 UTC 2021

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
x86/tsc: fix double space in warning about TSC going backwards


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-02-06 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Feb  6 21:24:20 UTC 2021

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
use __builtin_assume_aligned() on places where the memset() or memcpy()
parameters are known to be PAGE_SIZE-aligned, so compiler doesn't need
to emit atrocious alignment check code when inlining them

this particularly improves pmap_zero_page() and pmap_copy_page(),
which are now reduced to only 'rep stosq', and close to what a hand-written
assembly would do

Note: on CPUs supporting ERMS, 'rep stosb' would still be slightly faster, but
this is a solid stop-gap improvement

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html


To generate a diff of this commit:
cvs rdiff -u -r1.408 -r1.409 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2021-01-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Jan 16 15:26:23 UTC 2021

Modified Files:
src/sys/arch/x86/x86: identcpu_subr.c

Log Message:
trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov 30 00:04:03 UTC 2020

Modified Files:
src/sys/arch/x86/x86: procfs_machdep.c

Log Message:
 Add sgx, sgx_lc, serialize and tsxldtrk.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x86/x86/procfs_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-11-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Nov 18 16:36:43 UTC 2020

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
Preserve Xen SIR slots for VM_GUEST_XENPVH.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-10-15 Thread Michał Górny
Module Name:src
Committed By:   mgorny
Date:   Thu Oct 15 17:43:30 UTC 2020

Modified Files:
src/sys/arch/x86/x86: convert_xmm_s87.c

Log Message:
Remove unnecessary  include


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/convert_xmm_s87.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-10-15 Thread Michał Górny
Module Name:src
Committed By:   mgorny
Date:   Thu Oct 15 17:42:31 UTC 2020

Added Files:
src/sys/arch/x86/x86: convert_xmm_s87.c

Log Message:
Revert "Merge convert_xmm_s87.c into fpu.c"

I am going to add ATF tests for these two functions, and having them
in a separate file will make it more convenient to build and run them
in userspace.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.5 src/sys/arch/x86/x86/convert_xmm_s87.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-10-12 Thread Ryo ONODERA
Module Name:src
Committed By:   ryoon
Date:   Mon Oct 12 12:11:03 UTC 2020

Modified Files:
src/sys/arch/x86/x86: hyperv.c

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/x86/hyperv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-10-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct  9 21:14:05 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Don't do extra work finding the power of 2 for values we are not going to
use. Explain that cpu_hatch has not been called yet, so no cpu_probe either
so the cache info is 0 for AP's.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-09-02 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Sep  2 17:37:57 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
pmap_enter_gnt():
An empty PTP has a wire_count of 1, so KASSERT > 1 if we're sure we have
at last one entry.


To generate a diff of this commit:
cvs rdiff -u -r1.405 -r1.406 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-09-02 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Sep  2 17:07:45 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
pmap_enter_gnt(): call pmap_free_ptp() if needed. We can have a 0 wire count
if we had an old mapping and grant map hypercall failed, and this was the
only page in this ptp.
while there remove ptp != NULL checks for gnt operations: we always have
a ptp here.


To generate a diff of this commit:
cvs rdiff -u -r1.404 -r1.405 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-09-01 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Sep  1 11:24:14 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Fix braino in pmap_find_gnt(), really return the gnt entry covering the range
and not one that starts just after.
Fixes a KASSERT in pmap_remove_gnt().


To generate a diff of this commit:
cvs rdiff -u -r1.403 -r1.404 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-08-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug  9 15:32:44 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c x86_machdep.c

Log Message:
move lcall sniffer to x86_machdep since xen/pv has its own cpu.c


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-08-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug  4 06:23:46 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.402 -r1.403 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-08-03 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug  4 06:22:55 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.401 -r1.402 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-08-02 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug  2 18:23:33 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Revert "Add kthread_fpu_enter/exit support to x86." for now.

Need to find all the paths out of interrupts back into _kernel_
context to add HANDLE_DEFERRED_FPU, I think, before this can be
enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-31 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  1 02:13:34 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Add kthread_fpu_enter/exit support to x86.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-30 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jul 30 17:26:24 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Cite Cryptography Research evaluation of VIA RNG and give live URL.

(URL verified to be archived in the Internet Archive for posterity)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x86/x86/cpu_rng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-28 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Tue Jul 28 14:49:55 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Use CPU_IS_PRIMARY macro in cpu_stop(), cpu_resume(), and cpu_get_tsc_freq()
on x86.

OK kamil@


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 25 22:44:02 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
Nix outdated comment.

The substance of the change that introduced it was reverted, but I
neglected to revert the comment when reverting the substance.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jul 25 22:10:34 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Tweak VIA CPU RNG.

- Cite source for documentation.
- Omit needless kpreempt_disable/enable.
- Explain what's going on.
- Use "D"(out) rather than "+D"(out) -- no REP so no register update.
- Fix interpretation of number of bytes returned.

The last one is likely to address

[   4.0518619] aes: VIA ACE

[  11.7018582] cpu_rng via: failed repetition test
[  12.4718583] entropy: ready

reported by Andrius V.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x86/x86/cpu_rng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 16:45:41 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
Revert 1.112 "Disable x86 in-kernel AES temporarily."

The bug in fpu_kern_enter motivating this appears to have been fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 16:43:03 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Fix fpu_kern_enter in a softint that interrupted a softint.

We need to find the lwp that was originally interrupted to save its
fpu state.

With this, fpu-heavy programs (like firefox) are once again stable,
at least under modest stress testing, on systems configured to use
wifi with WPA2 and CCMP.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 16:41:18 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Save fpu state at IPL_VM to exclude fpu_kern_enter/leave.

This way fpu_kern_enter/leave cannot interrupt the transition, so the
transition from state-on-CPU to state-in-memory (with TS set) is
atomic whether in an interrupt or not.

(I am not 100% convinced that this is necessary, but it makes
reasoning about the transition simpler.)


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 16:38:47 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Revert 1.66 "Fix race in fpu save with fpu_kern_enter in softint."

This only fixed part of the race, and we can do it more simply.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 16:37:35 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Revert 1.67 "Restore the lwp's fpu state, not zeros, and leave with fpu 
enabled."

This didn't actually avoid double-restore, and it doesn't solve the
problem anyway, and made it harder to detect in-kernel fpu abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 20 15:11:29 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
Disable x86 in-kernel AES temporarily.

There's a bug in the FPU state handling that it triggers -- likely
limited to the softint path since I've only ever seen it on a system
using wifi configured with WPA2 and CCMP, which uses AES heavily in
softint.

This is to be reverted once we diagnose the bug.  (There is also a
performance regression on wifi with WPA2 and CCMP, which I plan to
fix too once we figure out the FPU state handling bug.)


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-19 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Jul 19 13:58:27 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
we're already in an #ifdef USER_LDT block, so no need to #ifdef again


To generate a diff of this commit:
cvs rdiff -u -r1.400 -r1.401 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-14 Thread Lars Reichardt
Module Name:src
Committed By:   para
Date:   Tue Jul 14 15:59:21 UTC 2020

Modified Files:
src/sys/arch/x86/x86: idt.c

Log Message:
mark diagused variable as such

fixing non DIAGNOSTIC builds


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x86/x86/idt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul 13 16:51:51 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Limit x86 fpu_kern_enter/leave to IPL_VM or below.

There are no users of crypto at IPL_SCHED or IPL_HIGH as far as I
know, and although we generally limit the amount of time spent in any
one crypto operation -- e.g., cgd is usually limited to processing
512 or 4096 bytes at a time -- it's better not to block IPL_SCHED and
IPL_HIGH interrupts at all.  This should make ddb a little more
accessible during crypto-heavy workloads.

This means the aes_* API cannot be used at IPL_SCHED or IPL_HIGH; the
same will go for any new crypto subsystems, like the ChaCha and
Poly1305 ones I'm drafting.  It might be better to prohibit them
altogether in hard interrupt context, but right now cprng_fast and
cprng_strong are both technically allowed at IPL_VM and are sometimes
used there (e.g., for opencrypto CBC IV generation).

KASSERT the ilevel to detect violation of this constraint in case I'm
wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jul 10 06:15:23 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu_subr.c

Log Message:
Add missing NetBSD RCS Id.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Jul  9 22:45:54 UTC 2020

Modified Files:
src/sys/arch/x86/x86: x86_autoconf.c

Log Message:
Adapt to proplib api changes


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/x86/x86/x86_autoconf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  6 18:30:48 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Restore the lwp's fpu state, not zeros, and leave with fpu enabled.

We need to clear the fpu state anyway because it is likely to contain
secrets at this point.  Previously we set it to zeros, and then issued
stts to disable the fpu in order to detect the mistake of further use
of the fpu in kernel.  But there must be some path I haven't identified
yet that doesn't do fpu_handle_deferred, leading to fpudna panics.

In any case, there's no benefit to restoring the fpu state twice
(once with zeros and once with the real data).  The downside is,
although this avoids spurious fpudna traps, using fpu_kern_enter in a
softint has the side effect that -- until the next userland context
switch triggering stts -- we no longer detect misuse of fpu in the
kernel in that lwp.  This will serve for now, but we should find
another way to issue clts/stts judiciously to detect such misuse.

May improve the continued symptoms of
https://mail-index.netbsd.org/current-users/2020/07/02/msg039051.html
although may not fix everything.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  6 01:08:15 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Fix race in fpu save with fpu_kern_enter in softint.

Likely source of:

https://mail-index.netbsd.org/current-users/2020/07/02/msg039051.html


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-04 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jul  4 09:03:55 UTC 2020

Modified Files:
src/sys/arch/x86/x86: idt.c

Log Message:
Fix unset_idtgate() for XENPV, pointed out by yamaguchi@


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/x86/idt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-07-03 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Jul  3 16:17:25 UTC 2020

Modified Files:
src/sys/arch/x86/x86: vm_machdep.c

Log Message:
In cpu_uarea_{alloc,free}:

 - My previous change in this file was not correct, kremove does not free
   the underlying PA, which caused a very slow leak under memory pressure.
   Rework to correctly free the PA.
 - Add a second redzone, this time after the stack, to catch several stack
   overflows. The main concern is read overflows which leak the heap that
   follows the stack.
 - UVM_KMF_WAITVA doesn't fail, so remove error check.
 - Add KASSERTs.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/x86/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Jun 25 17:24:31 UTC 2020

Modified Files:
src/sys/arch/x86/x86: multiboot2.c

Log Message:
rearrange code to remove need for the scratch space variable, simply put
the data to destination bootinfo buffer directly

XXX compile tested only, needs confirmation that it still works


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/multiboot2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-24 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Jun 24 22:28:08 UTC 2020

Modified Files:
src/sys/arch/x86/x86: multiboot2.c

Log Message:
don't try allocating 16KB of scratch space on stack

it's too early for kmem_alloc(), so use static variable in BSS; it's used
post reloc, so don't need to use the RELOC() macros

XXX compile-tested only on i386


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/multiboot2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-14 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun 15 01:24:21 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Count down bits of entropy, not bits of data, in x86 cpu_rng.

Fixes logic in this loop for XSTORERNG on VIA CPUs, which are deemed
to have half the entropy per bit of data as RDSEED on Intel CPUs, so
that it gathers enough entropy on the first request, not on the
second request.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/x86/cpu_rng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-14 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jun 15 01:23:44 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Use x86_read_psl/x86_disable_intr/x86_read_psl to defer interrupts.

Using x86_disable_intr/x86_enable_intr causes a bit of a snag when we
try it early at boot before we're ready to handle interrupts, because
it has the effect of enabling interrupts!

Fixes instant reset at boot on VIA CPUs.  The instant reset on boot
is new since the entropy rework, which initialized the x86 CPU RNG
earlier than before, but in principle this could also cause other
problems while not early at boot too.

XXX pullup


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/cpu_rng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-14 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Jun 14 23:24:20 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
tsc_get_timecount(): disable the "clock goes backwards" check on i386 for
the moment since it requires 64-bit store to be atomic because of nesting
via interrupt.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-14 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jun 14 23:20:15 UTC 2020

Modified Files:
src/sys/arch/x86/x86: via_padlock.c

Log Message:
padlock(4): Don't use prev msg's last block as IV for next msg in CBC.

This violates the security contract of the CBC construction, which
requires that the IV be unpredictable in advance; an adaptive adversary
can exploit this to verify plaintext guesses.

XXX Compile-tested only.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/x86/via_padlock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jun 13 19:01:11 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Add comments over fpu_kern_enter/leave.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-13 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Jun 13 19:00:18 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Zero the fpu registers on fpu_kern_leave.

Avoid Spectre-class attacks on any values left in them.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun  9 05:07:13 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu_subr.c

Log Message:
Add braces.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun  9 05:06:27 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu_subr.c

Log Message:
Remove debug printf.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-05 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Jun  5 21:48:04 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu_rng.c

Log Message:
Change const unsigned to preprocessor define

Fixes GCC -O0 build with the stack protector.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/x86/cpu_rng.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-04 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Jun  4 19:53:55 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Call clts/stts in fpu_kern_enter/leave so they work.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/x86/x86/fpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-06-02 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Jun  3 00:27:46 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Revert most of 1.396 and go back to using memset()/memcpy().
Do not restore pageidlezero stuff though.


To generate a diff of this commit:
cvs rdiff -u -r1.397 -r1.398 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-29 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May 29 22:40:16 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Reported-by: syzbot+fd9be59aa613bbf4e...@syzkaller.appspotmail.com
Reported-by: syzbot+15dd4dbac6ed159fa...@syzkaller.appspotmail.com
Reported-by: syzbot+38fa02d3b0e46e57c...@syzkaller.appspotmail.com

pmap_remove_all(): need to drain PV pages only after the PTEs are unmapped,
otherwise there can be a context switch with them mapped in.  XXX amd64
should use the direct map.


To generate a diff of this commit:
cvs rdiff -u -r1.396 -r1.397 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-27 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed May 27 19:40:30 UTC 2020

Modified Files:
src/sys/arch/x86/x86: svs.c

Log Message:
svs_pdir_switch(): Use MOVS to copy the PTES.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/svs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-27 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed May 27 19:26:43 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Reported-by: syzbot+c1770938bb3fa7c08...@syzkaller.appspotmail.com
Reported-by: syzbot+ae26209c7d7f06e0b...@syzkaller.appspotmail.com

Can't defer freeing PV entries for the kernel's pmap until pmap_update(),
as that means taking locks and potentially recursing, and pmap_update()
for the kernel is used in all sorts of sensitive places.


To generate a diff of this commit:
cvs rdiff -u -r1.394 -r1.395 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-27 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed May 27 19:15:08 UTC 2020

Modified Files:
src/sys/arch/x86/x86: svs.c

Log Message:
svs_pmap_sync(): Fast-path the curcpu case.  Could be improved further
with a kcpuset iterator thing.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x86/x86/svs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-27 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed May 27 18:46:15 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
tsc_delay(): use tsc_freq in preference to cpu_frequency().


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu May 21 22:01:42 UTC 2020

Modified Files:
src/sys/arch/x86/x86: lapic.c

Log Message:
Fix merge error


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/x86/x86/lapic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed May 20 20:19:02 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
The boot CPU suffers a cache miss during TSC sync, before RDTSC.  Make the
secondary CPU take a miss as well to try and delay it an equal amount.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 20 02:23:35 UTC 2020

Modified Files:
src/sys/arch/x86/x86: lapic.c

Log Message:
 Temporary back to lapic_initclocks() from lapci_reset() to avoid compile
error.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/x86/x86/lapic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:56:52 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
Ignore x86_delay, for xen


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:43:36 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
If the the TSC timecounter is good then use the TSC for DELAY() too.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:39:11 UTC 2020

Modified Files:
src/sys/arch/x86/x86: lapic.c

Log Message:
lapic_delay() disable preemption since the state is very CPU dependent.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/x86/x86/lapic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-19 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 19 21:14:20 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Comment


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Sun May 17 11:54:40 UTC 2020

Modified Files:
src/sys/arch/x86/x86: hyperv.c

Log Message:
Fixed a problem that caused a page fault when attaching vmbus(4).

Dynamically allocate a page of memory with uvm_km_alloc(kernel_map, ...)
for Hyper-V hypercall.  However, this method can no longer be used to
make an executable page.
So we prevent it by using statically allocated memory for text segment.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/hyperv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May 15 22:22:44 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
PTP pages are zeroed before free again.


To generate a diff of this commit:
cvs rdiff -u -r1.391 -r1.392 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May 15 22:22:06 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
Reported-by: syzbot+0f38e4aed17c14cf0...@syzkaller.appspotmail.com
Reported-by: syzbot+c1770938bb3fa7c08...@syzkaller.appspotmail.com
Reported-by: syzbot+92ca248f1137c4b34...@syzkaller.appspotmail.com
Reported-by: syzbot+acfd688740461f7ed...@syzkaller.appspotmail.com

Be careful with pmap_lock in pmap_update().  It can happen that pmap_kernel
has work pending that gets noticed in interrupt context, before process
context has a chance to deal with it.


To generate a diff of this commit:
cvs rdiff -u -r1.390 -r1.391 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May 15 22:19:01 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
PR kern/55268: tmpfs is slow

pmap_clear_attrs(): if a brand new page with no mappings just zap pp_attrs.


To generate a diff of this commit:
cvs rdiff -u -r1.389 -r1.390 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue May 12 06:32:05 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c identcpu_subr.c

Log Message:
Don't use TSC freq value from CPUID if calibration works.

 - When it's the first call of cpu_get_tsc_freq() the HPET is not initialized,
   so try to use CPUID to get TSC freq.
 - If it's the 2nd call, don't use CPUID. Instead, print the difference
   between the calibrated value and CPUID's value if the verbose mode is set.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-08 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri May  8 21:43:54 UTC 2020

Modified Files:
src/sys/arch/x86/x86: x86_softintr.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/x86/x86_softintr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-07 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu May  7 18:13:05 UTC 2020

Modified Files:
src/sys/arch/x86/x86: patch.c

Log Message:
Fix LOCKDEBUG compilation on i386.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/x86/patch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-03 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun May  3 17:22:03 UTC 2020

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
If hvm_start_info has no memmap_entries, fall back to XENMEM_memory_map
hypercall.


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-02 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat May  2 16:25:47 UTC 2020

Modified Files:
src/sys/arch/x86/x86: patch.c

Log Message:
Remove the D bit as part of the hotpatch cleanup procedure.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/x86/patch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-05-01 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Fri May  1 14:16:15 UTC 2020

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
Use PRIxPADDR for paddr_t to make i386/ALL compile.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-30 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Apr 30 22:09:32 UTC 2020

Modified Files:
src/sys/arch/x86/x86: x86_machdep.c

Log Message:
Change module path to xen-* only for XENPV


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-29 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Apr 29 22:03:10 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Back out HPET delay & TSC changes to rule them out as the cause for recent
hangs during boot etc.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 24 07:50:24 UTC 2020

Modified Files:
src/sys/arch/x86/x86: procfs_machdep.c

Log Message:
 Lowercase ppin.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/x86/x86/procfs_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 24 02:27:59 UTC 2020

Modified Files:
src/sys/arch/x86/x86: procfs_machdep.c

Log Message:
 Add AMD protected processor identification number (PPIN).


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/procfs_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Apr 23 21:35:18 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
- Install HPET based DELAY() before going multiuser then recalibrate the TSC.
  Idea from joerg@.

- Take overhead into account when computing CPU frequency.

- Don't flush cache before computing TSC skew.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu Apr 23 20:38:33 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
When computing TSC skew make 8 measurements and use the average.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-21 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Apr 21 20:20:39 UTC 2020

Modified Files:
src/sys/arch/x86/x86: bus_space.c sys_machdep.c

Log Message:
two more files to convert to newer HYPERVISOR_physdev_op() interface


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x86/x86/bus_space.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/x86/sys_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr 21 07:08:12 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu_subr.c

Log Message:
 Print "Hz".


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/x86/identcpu_subr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Apr 21 05:18:14 UTC 2020

Modified Files:
src/sys/arch/x86/x86: i8259.c

Log Message:
Whitespace fix. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/x86/i8259.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Apr 20 04:23:24 UTC 2020

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
 Whitespace fix. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Apr 20 04:17:52 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
Whitespace fix. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  9 02:07:01 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
flip the comparison again


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  9 01:55:58 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
use __arraycount, and fix comparison


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Apr  9 01:49:26 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c

Log Message:
Add EX2 for Vortex86 SoCs (Andrius V)


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Apr  4 14:49:36 UTC 2020

Modified Files:
src/sys/arch/x86/x86: identcpu.c x86_machdep.c

Log Message:
Enable MONITOR/MWAIT idle on AMD chips, except some buggy Ryzens.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/x86/x86/identcpu.c
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/x86/x86/x86_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-04-02 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Apr  3 03:05:39 UTC 2020

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
Fix TSC drift is observed almost every time wrongly.

Ths "TSC drift" in tsc_tc_init() means the cpu_cc_skew delta between
first measurement (in cpu_start_secondary) and second measurement
(in cpu_boot_secondary), that is, the TSC drift is expected to be
almost zero.  However, the second measument in current implementation
is added extra cpu_cc_skew accidentally, so current delta value means
almost cpu_cc_skew wrongly.

tsc_sync_bp and tsc_sync_ap should use rdtsc() to get raw values.

Advised by nonaka@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x86/x86/tsc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-03-27 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 27 09:47:03 UTC 2020

Modified Files:
src/sys/arch/x86/x86: coretemp.c

Log Message:
 Add special handling for model 0x0f stepping >=2 or mode 0x0e to get Tjmax.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/x86/coretemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2020-03-20 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Mar 20 19:06:14 UTC 2020

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
- pmap_extract(): This needs to take the pmap's lock, to allow for
  concurrent removal of pages (a new requirement).

- pmap_remove_pv(): Keep hold time of pp_lock as short as possible.

- pmap_get_ptp(): Don't re-init struct pmap_page for PD PTPs.  Would
  have no ill effects but is wrong regardless.


To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   3   4   5   6   7   8   >