CVS commit: src/sys/dev/nvmm/x86

2020-05-21 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu May 21 07:36:16 UTC 2020

Modified Files:
src/sys/dev/nvmm/x86: nvmm_x86_vmx.c

Log Message:
Improve the CPUID emulation on nvmm-intel: limit the highest basic and
hypervisor leaves.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

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



CVS commit: src/sys/dev/nvmm

2020-05-21 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu May 21 07:43:23 UTC 2020

Modified Files:
src/sys/dev/nvmm: nvmm.c

Log Message:
Complete rev1.26: reset nvmm_impl to NULL in nvmm_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/nvmm/nvmm.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/amd64/stand/prekern

2020-05-21 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu May 21 08:20:25 UTC 2020

Modified Files:
src/sys/arch/amd64/stand/prekern: prng.c

Log Message:
Mmh, should check cpuid_level first.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/stand/prekern/prng.c

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



CVS commit: src/usr.bin/calendar/calendars

2020-05-21 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu May 21 08:43:58 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars: calendar.music

Log Message:
The Hacienda must be rebuilt.
https://twitter.com/McrHistory/status/1263386700249776130
https://twitter.com/Mr_Dave_Haslam/status/1263373996172640256


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/calendar/calendars/calendar.music

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



CVS commit: src/sys/dev/ata

2020-05-21 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu May 21 09:11:33 UTC 2020

Modified Files:
src/sys/dev/ata: ata_wdc.c

Log Message:
stop timeout handler while scheduling another part of partial I/O,
to avoid race between the timeout and I/O submission; the I/O
submission can sleep with xfer while waiting for the controller to
be ready once it gets to thread context, and timeout might cause
the xfer to be freed, leading to crashes due to use-after-free

this fixes another type of crashes with slow devices under QEMU reported
by Paul Ripke - thanks a lot with extensive debugging help


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/ata/ata_wdc.c

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



CVS commit: src/sys/dev/ic

2020-05-21 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu May 21 09:24:17 UTC 2020

Modified Files:
src/sys/dev/ic: wdc.c

Log Message:
in wdctimeout(), do not schedule another timeout handler, as that only
creates race with eventual xfer resubmission - the c_intr()
method does all the necessary handling, including re-scheduling of the
timeout handler if appropriate

also make sure to clear ATACH_IRQ_WAIT before calling c_intr(), same
as real interrupt does; this is important so that eventual spurious timeout
would not interfere with xfer handling in the atabus thread

fixes another race in the atabus thread found by KASAN, reported by Paul Ripke


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 src/sys/dev/ic/wdc.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/amd64/conf

2020-05-21 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu May 21 09:36:24 UTC 2020

Modified Files:
src/sys/arch/amd64/conf: kern.ldscript.Xen

Log Message:
update Xen ldscript to add kASan .ctors section, so that Xen kernel with
enabled KASAN option at least compiles; no promises on it actually working
though


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amd64/conf/kern.ldscript.Xen

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



CVS commit: [netbsd-9] src/sys/dev/nvmm

2020-05-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May 21 10:52:58 UTC 2020

Modified Files:
src/sys/dev/nvmm [netbsd-9]: nvmm.c
src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86.c nvmm_x86_svm.c
nvmm_x86_vmx.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #919):

sys/dev/nvmm/x86/nvmm_x86.c: revision 1.9
sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.60
sys/dev/nvmm/x86/nvmm_x86_svm.c: revision 1.61
sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.56
sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.57
sys/dev/nvmm/x86/nvmm_x86_vmx.c: revision 1.58
sys/dev/nvmm/nvmm.c: revision 1.29

Improve the CPUID emulation of basic leaves:
 - Hide DCA and PQM, they cannot be used in guests.
 - On Intel, explicitly handle each basic leaf until 0x16.
 - On AMD, explicitly handle each basic leaf until 0x0D.

Respect the convention for the hypervisor information: return the highest
hypervisor leaf in 0x4000.EAX.

Improve the CPUID emulation on nvmm-intel: limit the highest basic and
hypervisor leaves.

Complete rev1.26: reset nvmm_impl to NULL in nvmm_fini().


To generate a diff of this commit:
cvs rdiff -u -r1.22.2.3 -r1.22.2.4 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.7.4.1 -r1.7.4.2 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.46.4.4 -r1.46.4.5 src/sys/dev/nvmm/x86/nvmm_x86_svm.c
cvs rdiff -u -r1.36.2.6 -r1.36.2.7 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c

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



CVS commit: [netbsd-9] src/doc

2020-05-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May 21 10:53:23 UTC 2020

Modified Files:
src/doc [netbsd-9]: CHANGES-9.1

Log Message:
Ticket #919


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-9.1

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



CVS commit: src/sys/dev/usb

2020-05-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu May 21 12:46:45 UTC 2020

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
xhci(4): Be more concise in putting the setup request in TRB immediate data.

Or: memcpy(),htole64() is replaced by functionally-identical le64dec().


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/usb/xhci.c

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



CVS commit: src/sys/dev/usb

2020-05-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu May 21 13:23:38 UTC 2020

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
xhci(4): Check for overflows with KASSERT when putting TRBs on xfer TRB buffer.

Also more-correctly check for overruns when putting TRBs on a ring.


To generate a diff of this commit:
cvs rdiff -u -r1.126 -r1.127 src/sys/dev/usb/xhci.c

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



CVS commit: src/sys/dev/usb

2020-05-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu May 21 13:47:11 UTC 2020

Modified Files:
src/sys/dev/usb: xhci.c xhcivar.h

Log Message:
xhci(4): dynamically allocate xhci_xfer->xx_trb buffer

Allocation size remains the same for now.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/xhcivar.h

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



CVS commit: src/sys/dev/usb

2020-05-21 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu May 21 15:28:35 UTC 2020

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
xhci(4): only usbd_xfer_trycomplete() if certain to usb_transfer_complete()

Previously we'd cancel the timeout after the data stage of control xfers, and
then hope that the status stage would eventually interrupt.


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/dev/usb/xhci.c

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



CVS commit: src/sys/uvm

2020-05-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu May 21 16:50:25 UTC 2020

Modified Files:
src/sys/uvm: uvm_swap.c

Log Message:
Let's not waste time decrypting garbage, shall we?

Skip to the end if the transfer failed.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/uvm/uvm_swap.c

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



CVS commit: src/sys/conf

2020-05-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May 21 18:44:19 UTC 2020

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Do the chmod last so that the kernels get consistent permissions for MKREPRO
Reported by wiz@.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/conf/Makefile.kern.inc

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-05-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu May 21 20:43:23 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Fix bugs in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.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

2020-05-21 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Thu May 21 21:12:31 UTC 2020

Modified Files:
src/sys/arch/x86/acpi: acpi_wakeup.c
src/sys/arch/x86/include: i82489var.h
src/sys/arch/x86/x86: cpu.c lapic.c x86_machdep.c
src/sys/arch/xen/x86: cpu.c
src/sys/arch/xen/xen: hypervisor.c xen_clock.c

Log Message:
- Recalibrate the APIC timer using the TSC, once the TSC has in turn been
  recalibrated using the HPET.  This gets the clock interrupt firing more
  closely to HZ.

- Undo change with recent Xen merge and go back to starting the clocks in
  initclocks() on the boot CPU, and in cpu_hatch() on secondary CPUs.

- On reflection don't use HPET delay any more, it works very well but means
  going over the bus.  It's enough to use HPET to calibrate the TSC and
  APIC.

Tested on amd64 native, xen and xen PVH.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/include/i82489var.h
cvs rdiff -u -r1.191 -r1.192 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/x86/x86/lapic.c
cvs rdiff -u -r1.142 -r1.143 src/sys/arch/x86/x86/x86_machdep.c
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/xen/x86/cpu.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/xen/xen/hypervisor.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/xen/xen/xen_clock.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/dev/pci

2020-05-21 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu May 21 22:55:48 UTC 2020

Modified Files:
src/sys/dev/pci: gffb.c r128fb.c

Log Message:
prune unneeded includes


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/gffb.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/r128fb.c

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



CVS commit: src/sys/dev/pci

2020-05-21 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu May 21 22:58:46 UTC 2020

Modified Files:
src/sys/dev/pci: files.pci

Log Message:
- remove i2cbus etc. on drivers that don't use iic
- for private iic buses pull in only what we need and skip the bus attachment


To generate a diff of this commit:
cvs rdiff -u -r1.427 -r1.428 src/sys/dev/pci/files.pci

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



CVS commit: src/bin/getfacl

2020-05-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 22 01:28:00 UTC 2020

Modified Files:
src/bin/getfacl: getfacl.c

Log Message:
Don't return from dead functions.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/bin/getfacl/getfacl.c

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



CVS commit: src/bin/setfacl

2020-05-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 22 01:28:45 UTC 2020

Modified Files:
src/bin/setfacl: setfacl.c

Log Message:
Mark usage as dead


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/bin/setfacl/setfacl.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/aarch64/aarch64

2020-05-21 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri May 22 04:46:26 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: db_machdep.c

Log Message:
instead of reading memory directly, db_read_bytes() is used to avoid faults in 
ddb.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/aarch64/aarch64/db_machdep.c

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