git: NVMM: Sync with NetBSD #1: copyright headers

2021-07-20 Thread Aaron LI
commit 7f0e1ce2a086ba696ed3a76e19a2333de64781b2 Author: Aaron LI Date: Sat Jun 26 19:14:24 2021 +0800 NVMM: Sync with NetBSD #1: copyright headers Summary of changes: lib/libnvmm/libnvmm.3 | 29 ++-- lib/libnvmm/libnvmm.c

git: kernel - Make kprintf / kputchar more robust

2021-07-20 Thread Aaron LI
commit d9126105909034b7d4010f933837c7db307c8ebf Author: Matthew Dillon Date: Thu Jul 15 14:02:21 2021 -0700 kernel - Make kprintf / kputchar more robust * kprintf() via kputchar() can deadlock due to kprintf()s made from Xinvltlb (which ignores critical sections).

git: testcases/libnvmm: Port to DragonFly

2021-07-20 Thread Aaron LI
commit 80c9a0accdd00a4a3e5aca2096e4021e8bf7e521 Author: Aaron LI Date: Wed Jun 16 22:33:53 2021 +0800 testcases/libnvmm: Port to DragonFly Minor tweaks similar to the porting of libnvmm(3). Summary of changes: test/testcases/libnvmm/h_io_assist.c | 20

git: test/nvmm: Add a Makefile and a test script for 'calc-vm'

2021-07-20 Thread Aaron LI
commit 289ba3dac42be89324e958e1f76ef6c44fb5a1fc Author: Aaron LI Date: Sun Jun 13 15:12:44 2021 +0800 test/nvmm: Add a Makefile and a test script for 'calc-vm' We write the built binary in /tmp instead of current directory. This is useful for building with a NFS-exported

git: nvmm: Reorganize OS-specific code in nvmm_os.c

2021-07-20 Thread Aaron LI
commit df3af4c9b44add09ccedaf63d67d0553bd9e184f Author: Aaron LI Date: Sun Jul 18 18:29:45 2021 +0800 nvmm: Reorganize OS-specific code in nvmm_os.c Split the OS-specific code in 'nvmm_os.c' into two separate source files: nvmm_dragonfly.c and nvmm_netbsd.c, one for each

git: nvmm: Adjust EPT/NPT transform code for NetBSD

2021-07-20 Thread Aaron LI
commit 3f1b1a2b1ab407afd22c9efb41fd2ce2d7852575 Author: Aaron LI Date: Sun Jul 11 22:47:23 2021 +0800 nvmm: Adjust EPT/NPT transform code for NetBSD * Rename variable 'pmap_ept_has_ad' to 'vmx_ept_has_ad' to avoid conflict with the global variable in NetBSD. * Set

git: nvmm: Improve CPUID emulation #4: handle Fn0000_0004 on Intel

2021-07-20 Thread Aaron LI
commit 84a72f96178d4f1c7b995a0517837188deb31dde Author: Aaron LI Date: Sat Jul 3 14:29:15 2021 +0800 nvmm: Improve CPUID emulation #4: handle Fn_0004 on Intel Handle CPUID Fn_0004 (Deterministic Cache Parameters) on Intel CPUs. Summary of changes: sys/dev/virtual/nvmm

git: nvmm: Improve CPUID emulation #5: handle Fn0000_0001:EBX[23:16]

2021-07-20 Thread Aaron LI
commit f8790d01f1150c34ff10a5fe4943e03ff59922fa Author: Aaron LI Date: Sat Jul 3 14:30:35 2021 +0800 nvmm: Improve CPUID emulation #5: handle Fn_0001:EBX[23:16] Handle CPUID Fn_0001:EBX[23:16] to report the logical CPU count. Summary of changes: sys/dev/virtual/nvmm

git: nvmm: Redefine CPUID values to be OS-indenpendent

2021-07-20 Thread Aaron LI
commit c1d369d51a3634213470b453736fbea38700a838 Author: Aaron LI Date: Sat Jul 3 15:14:23 2021 +0800 nvmm: Redefine CPUID values to be OS-indenpendent Redefine all CPUID values locally to be OS-indenpendent. Remove those compat CPUID defines from nvmm_compat.h

git: test/nvmm/demo: Port 'smallkern' to DragonFly

2021-07-20 Thread Aaron LI
commit 20b815aaa70f0fb8a4c815b9686a6de1feb2fa58 Author: Aaron LI Date: Tue Jun 8 14:29:40 2021 +0800 test/nvmm/demo: Port 'smallkern' to DragonFly Summary of changes: test/nvmm/demo/smallkern/locore.S| 1 + test/nvmm/demo/smallkern/main.c | 18 +- test/nvmm

git: test/nvmm/demo: Update 'toyvirt' to current libnvmm(3)

2021-07-20 Thread Aaron LI
commit 2efd87c66f66f8f9b126e05cbe011b7f0ce338ba Author: Aaron LI Date: Fri May 28 07:33:45 2021 +0800 test/nvmm/demo: Update 'toyvirt' to current libnvmm(3) Various adjustments to the demo code to make it work again with the current libnvmm(3) API in NetBSD 9.1

git: nvmm: Port to DragonFly #1: nvmm_x86_{svmfunc,vmxfunc}.S

2021-07-20 Thread Aaron LI
commit 1c2d6221242490208fa2b4ff59ab9615a063bd2a Author: Aaron LI Date: Tue May 11 14:25:17 2021 +0800 nvmm: Port to DragonFly #1: nvmm_x86_{svmfunc,vmxfunc}.S Summary of changes: sys/dev/virtual/nvmm/x86/nvmm_x86_svmfunc.S | 16 +--- sys/dev/virtual/nvmm/x86

git: nvmm: Rewrite vmx_vmx{on,off}() as inline ASM functions

2021-07-20 Thread Aaron LI
commit 7c2420fbd4f1cdecbd0335c4f7b10d4e16a34845 Author: Aaron LI Date: Sat Jul 3 16:11:46 2021 +0800 nvmm: Rewrite vmx_vmx{on,off}() as inline ASM functions Summary of changes: sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 37 - sys/dev/virtual/nvmm/x86

git: nvmm: Implement os_ipi_broadcast() for _change_cpu()

2021-07-20 Thread Aaron LI
commit 5d445d4ccd1cd9a6c8af2fed063bdb0b30bbff86 Author: Aaron LI Date: Sun Jul 11 14:05:26 2021 +0800 nvmm: Implement os_ipi_broadcast() for _change_cpu() os_ipi_broadcast() is used in {svm,vmx}_init() and {svm,vmx}_fini() to enable/disable SVM/VMX on all CPUs. The previous

git: kernel - Expand GDT table to maximum size

2021-07-20 Thread Aaron LI
commit 31815141bcac6910dceb328608728c1824cd7ee5 Author: Matthew Dillon Date: Thu Jul 1 09:32:51 2021 -0700 kernel - Expand GDT table to maximum size * Expand the GDT table from 9 entries to 65536 entries (limit field 0x). * This deals with an Intel quirk in

git: libnvmm: More OS independence

2021-07-20 Thread Aaron LI
commit 6393501742abc2bfe66c490447098c982ce8a82c Author: Aaron LI Date: Sun Jul 4 11:56:40 2021 +0800 libnvmm: More OS independence * Define PTE_* values in 'libnvmm_x86.c' to avoid including some OS headers: , and . * Redefine __BIT() macro to avoid handling its

git: nvmm: Create comm page in nvmm_vcpu_create() rather than via mmap()

2021-07-20 Thread Aaron LI
commit 9aa070ef83dc4a7f702fac98a66ea80e7f4fefb8 Author: Aaron LI Date: Sat Jul 3 22:59:38 2021 +0800 nvmm: Create comm page in nvmm_vcpu_create() rather than via mmap() Create the VCPU comm page in nvmm_vcpu_create() in kernel, rather than via mmap() in userland

git: nvmm: Port to DragonFly #18: kernel memory allocation

2021-07-20 Thread Aaron LI
commit 30d365ffd7dd3ed03eec9b68570e5323d50d169f Author: Aaron LI Date: Sat May 22 12:03:06 2021 +0800 nvmm: Port to DragonFly #18: kernel memory allocation Use kmem_alloc() and kmem_free() to implement uvm_km_alloc() and uvm_km_free() as they're used in svm_vcpu_create

git: pmap: Add some API routines to help NVMM manage guest memory

2021-07-20 Thread Aaron LI
commit f9fa4782687346939b3ab65f7c6cbba9e6da5d56 Author: Aaron LI Date: Fri Jun 25 18:30:26 2021 +0800 pmap: Add some API routines to help NVMM manage guest memory Add the following three routines for NVMM to use. NVMM can use these routines to manipulate the cpumask

git: nvmm: Add SVM CET definitions

2021-07-20 Thread Aaron LI
commit e157fec4eb94b7e1f769f2a838b48a1eee773888 Author: Aaron LI Date: Sat Jul 3 16:00:28 2021 +0800 nvmm: Add SVM CET definitions Not actually used. For completeness. Summary of changes: sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 6 +- 1 file changed, 5 insertions(+), 1

git: libnvmm: Misc cleanups

2021-07-20 Thread Aaron LI
commit b8ee5f9f1cc7c7ef92583156c3eabeef8688c846 Author: Aaron LI Date: Sun Jul 4 09:27:40 2021 +0800 libnvmm: Misc cleanups * Remove unused arguments. * Use literal numbers instead of __BITS(). * Improve two printf()s. * Remove NetBSD VCS markers and update copyright

git: Add group 'nvmm' and GID_NVMM for nvmm(4) & nvmmctl(8)

2021-07-20 Thread Aaron LI
commit 76b1f6231f5abc8d0793b5318f51b7619cf52f77 Author: Aaron LI Date: Mon May 10 07:06:54 2021 +0800 Add group 'nvmm' and GID_NVMM for nvmm(4) & nvmmctl(8) Summary of changes: etc/group | 1 + sys/sys/conf.h | 1 + 2 files changed, 2 insertions(+) http://gitweb.dragonflybsd

git: nvmm - Change max emulated RAM from 128GB to 128TB

2021-07-20 Thread Aaron LI
commit 5d1ebcce7ab757831d293e0e1917097ba7a129a1 Author: Matthew Dillon Date: Tue Jun 22 23:35:30 2021 -0700 nvmm - Change max emulated RAM from 128GB to 128TB * Increase the max emulated RAM from 128GB to 128TB. Ok, I'm not sure what the actual maximum is, but it sure as

git: nvmm: Add #CP (control protection exception)

2021-07-20 Thread Aaron LI
commit 3402e06588aa04d2977f7991611646c506dc5442 Author: Aaron LI Date: Sat Jul 3 09:50:03 2021 +0800 nvmm: Add #CP (control protection exception) Summary of changes: sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 1 + sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c | 1 + 2 files changed, 2

git: nvmm: Improve CPUID emulation #2: mask upper bits of guest EAX/ECX

2021-07-20 Thread Aaron LI
commit 1cc8c8a2fcca3f7d8724ad0bf495c5a54f6ca553 Author: Aaron LI Date: Sat Jul 3 12:04:35 2021 +0800 nvmm: Improve CPUID emulation #2: mask upper bits of guest EAX/ECX Use uint32_t instead of uint64_t for guest EAX/ECX and mask the upper bits, to prevent wrong results

git: nvmm: More OS independence

2021-07-20 Thread Aaron LI
commit 42862644e8ee2665cba60cb87a8169a3292cda97 Author: Aaron LI Date: Sun Jul 4 20:21:09 2021 +0800 nvmm: More OS independence * Abstract out various OS-specific defines and functions and organize them in 'nvmm_os.h' and 'nvmm_os.c'. This provides more flexibility

git: nvmm - Change NVMM_MAX_RAM

2021-07-20 Thread Aaron LI
commit 22b29b22624a19bb59515e8813711a265f1abbc6 Author: Matthew Dillon Date: Sat Jul 10 11:39:00 2021 -0700 nvmm - Change NVMM_MAX_RAM * Add __NetBSD__ conditional back in with original 128GB limit. * Set DragonFly limit to 127TB (down from 128TB) to ensure that

git: nvmm: Add missing comm page unmapping

2021-07-20 Thread Aaron LI
commit 1759ebc3e19ae5ff5bfc6cfa50e1e532a51051b0 Author: Aaron LI Date: Mon Jul 12 22:36:54 2021 +0800 nvmm: Add missing comm page unmapping The comm page mapping has been changed from libnvmm to the kernel side, so I removed the munmap() code from libnvmm, but the kernel

git: NVMM: Update examples and libnvmm tests

2021-07-20 Thread Aaron LI
commit e84206a6156728f25f14aa8391a556add61c2aa0 Author: Aaron LI Date: Sun Jul 4 21:40:14 2021 +0800 NVMM: Update examples and libnvmm tests Summary of changes: test/nvmm/calc-vm.c | 43 +--- test/nvmm/demo/smallkern/main.c | 28 ++--- test

git: nvmm: Fix SVM TSS restore on DragonFly

2021-07-20 Thread Aaron LI
commit aeee078a87aa2ccde9b4ee5c7a9c827eb2b925b1 Author: Aaron LI Date: Tue Jun 15 07:26:03 2021 +0800 nvmm: Fix SVM TSS restore on DragonFly In DragonFly, PCPU(tss_gdt) points directly to the gdt[] entry for the current CPU's TSS descriptor; while NetBSD's CPUVAR(GDT) points

git: nvmm - Fix overflow tests

2021-07-20 Thread Aaron LI
commit 60ec4ed4a90ecd845abb48255a4cb4e904ebec49 Author: Matthew Dillon Date: Sat Jul 10 12:12:35 2021 -0700 nvmm - Fix overflow tests * Overflow tests require special case to ensure that compiler optimizations do not remove the test. * Plus general cleanup.

git: nvmm: Various minor style tweaks

2021-07-20 Thread Aaron LI
commit 1467e8758e0ee9f2b355b16b59f80d963cdfb659 Author: Aaron LI Date: Sun Jul 11 13:14:20 2021 +0800 nvmm: Various minor style tweaks Summary of changes: sys/dev/virtual/nvmm/nvmm_os.c | 4 +--- sys/dev/virtual/nvmm/nvmm_os.h | 18 ++ sys/dev/virtual

git: nvmm - Move M_NVMM definition to nvmm_os.c

2021-07-20 Thread Aaron LI
commit 667b12bfd7ecd9316047c12dd2e0b9475b854a43 Author: Matthew Dillon Date: Sat Jul 10 11:29:15 2021 -0700 nvmm - Move M_NVMM definition to nvmm_os.c Summary of changes: sys/dev/virtual/nvmm/nvmm.c| 4 sys/dev/virtual/nvmm/nvmm_os.c | 4 2 files changed, 4 insertions(+),

git: test/nvmm/demo: Improve progress logs to help test/debug

2021-07-20 Thread Aaron LI
commit ce659a16aa0c5865699bf06e3aa5619646e41b9c Author: Aaron LI Date: Mon Jun 7 21:40:58 2021 +0800 test/nvmm/demo: Improve progress logs to help test/debug * Add several more progress logs. * Reduce accepting trap count to 6, reducing the total test time. * Update

git: nvmm: Port to DragonFly #0: initial nvmm_compat.h

2021-07-20 Thread Aaron LI
commit 550f54fb7c030e3f0cd1f7ae29c3c63851cb74e2 Author: Aaron LI Date: Tue May 25 14:39:10 2021 +0800 nvmm: Port to DragonFly #0: initial nvmm_compat.h Add nvmm_compat.h to hold the major compatibility code for the porting. Currently there are mostly CPUID2_* and CPUID_SEF_

git: kernel - Use higher invltlb synchronization timeout if guest

2021-07-20 Thread Aaron LI
commit 2d20c15fc71e5e5fededb861710511fb82543426 Author: Matthew Dillon Date: Thu Jul 15 19:53:36 2021 -0700 kernel - Use higher invltlb synchronization timeout if guest * Increase the invltlb synchronization timeout from 10 seconds to 60 seconds if running as a guest.

git: test/nvmm/demo: Various cleanups to 'smallkern'

2021-07-20 Thread Aaron LI
commit aaa1e810e6b6a6e4cab5a739def087631750de17 Author: Aaron LI Date: Tue Jun 8 12:47:45 2021 +0800 test/nvmm/demo: Various cleanups to 'smallkern' * Remove unused variables, symbols, function prototypes and functions. * Move function prototypes and 'extern' declarations

git: x86_64/cpu.h: Rename nvmm_break_wanted() to hvm_break_wanted()

2021-07-20 Thread Aaron LI
commit 7f29793ea1fbb95d48086278b39c64deb35e6844 Author: Aaron LI Date: Sun Jul 11 22:44:28 2021 +0800 x86_64/cpu.h: Rename nvmm_break_wanted() to hvm_break_wanted() To avoid confusion with the NVMM code. In addition, this macro checks against RQF_HVM_MASK, so naming

git: doc: Import nvmm TODO note from NetBSD-current

2021-07-20 Thread Aaron LI
commit cf6ae6e9a0e837c15e56bfe3e9658f9cf393c719 Author: Aaron LI Date: Tue Jun 29 22:33:06 2021 +0800 doc: Import nvmm TODO note from NetBSD-current Summary of changes: doc/TODO.nvmm | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 doc/TODO.nvmm http

git: nvmm: Rename a few things for clarity

2021-07-20 Thread Aaron LI
commit 412bdc0a01f3ae8c168f8cceaeac667d46d0c49e Author: Aaron LI Date: Sat Jul 3 18:03:29 2021 +0800 nvmm: Rename a few things for clarity Summary of changes: sys/dev/virtual/nvmm/nvmm.c | 64 - sys/dev/virtual/nvmm/nvmm_internal.h| 4

git: test/nvmm: Enhance error checks in 'calc-vm'

2021-07-20 Thread Aaron LI
commit e15b0a4433947398b0d8b118228d9a07de834da9 Author: Aaron LI Date: Sun May 30 08:51:01 2021 +0800 test/nvmm: Enhance error checks in 'calc-vm' Enhance error checks to help test/debug NVMM/libnvmm. Summary of changes: test/nvmm/calc-vm.c | 25 + 1

git: nvmm: Various misc cleanups and minor updates

2021-07-20 Thread Aaron LI
commit bfc69df088bd6ffec4826015a02e8b5a96b32344 Author: Aaron LI Date: Sun Jul 4 08:56:02 2021 +0800 nvmm: Various misc cleanups and minor updates * Rework header inclusions. * Improve the arguments given to uvmspace_alloc(). * Lowercase "NVMM" in pri

git: nvmm: Clarify the RESET state

2021-07-20 Thread Aaron LI
commit 38c91b8cbcb24b0cbe8b7eb2a14c50eb66e0126c Author: Aaron LI Date: Sat Jul 3 10:03:40 2021 +0800 nvmm: Clarify the RESET state Just use plain values instead of macros. This also eliminates the PAT* compat code in 'nvmm_compat.h'. Summary of changes: sys/dev

git: nvmm: Port to DragonFly #21: virtual address space management

2021-07-20 Thread Aaron LI
commit fe7b14d632ffc4e8b0a257d206a1b547ae6c8604 Author: Aaron LI Date: Sun May 23 18:13:54 2021 +0800 nvmm: Port to DragonFly #21: virtual address space management Adapt the following NetBSD UVM functions to DragonFly: * uvmspace_alloc() -> vmspace_al

git: test/nvmm/demo: Fix ELF load/mmap issue on DragonFly

2021-07-20 Thread Aaron LI
commit f2252fff15e614477b9361f1e13c890db0c28e9d Author: Aaron LI Date: Sun Jun 6 12:02:25 2021 +0800 test/nvmm/demo: Fix ELF load/mmap issue on DragonFly The 'smallkern' ELF built on DragonFly has a zero-sized GNU_STACK segment, which causes mmap() to fail (EINVAL). Add

git: libnvmm: Adapt to also build on NetBSD

2021-07-20 Thread Aaron LI
commit 1e15a2fdfc44655845c4beb0c38b331913cddc0d Author: Aaron LI Date: Sat Jun 12 18:11:10 2021 +0800 libnvmm: Adapt to also build on NetBSD Adapt the libnvmm code to build and work on both DragonFly and NetBSD. So it can help debug the porting issues. Summary of changes

git: nvmmctl(8): Port to DragonFly

2021-07-20 Thread Aaron LI
commit e1cb903ec59cfcf1343cc32cf739cc49e18c250b Author: Aaron LI Date: Wed May 26 07:43:29 2021 +0800 nvmmctl(8): Port to DragonFly * Adjust header inclusions * Add 'XCR0_FLAGS1' macro define * Add several '__unused' attributes * Rename '__dead' to '__dead2' Summary

git: nvmmctl(8): Rewrite makefile and hook to build

2021-07-20 Thread Aaron LI
commit cc0c2bc29becb2f5643eb54d7307ffe0390d22ca Author: Aaron LI Date: Wed May 26 07:43:54 2021 +0800 nvmmctl(8): Rewrite makefile and hook to build Summary of changes: usr.sbin/Makefile | 1 + usr.sbin/nvmmctl/Makefile | 18 -- 2 files changed, 5 insertions

git: libnvmm: Update makefiles and hook to build

2021-07-20 Thread Aaron LI
commit e79c9305184a8c57e9b4a7cba68ea19b3a1b511d Author: Aaron LI Date: Mon May 10 07:05:43 2021 +0800 libnvmm: Update makefiles and hook to build Summary of changes: lib/Makefile | 3 ++- lib/libnvmm/Makefile | 15 --- lib/libnvmm/shlib_version | 5

git: pmap: Implement pmap_ept_transform() for NVMM

2021-07-20 Thread Aaron LI
commit 297019886e36c44b41a02c510e06e635ce29f43e Author: Aaron LI Date: Sun Jun 6 11:30:13 2021 +0800 pmap: Implement pmap_ept_transform() for NVMM The pmap_ept_transform() transforms an initialized pmap structure to be EPT type for Intel VMX hypervisor (e.g., NVMM) use

git: pc64/vmm: Use pmap_ept_transform() to simplify EPT code

2021-07-20 Thread Aaron LI
commit acf17d808e15bcfc7c5691ad2af9ff367e875aa8 Author: Aaron LI Date: Sun Jun 6 12:51:50 2021 +0800 pc64/vmm: Use pmap_ept_transform() to simplify EPT code Summary of changes: sys/platform/pc64/vmm/ept.c | 68 - 1 file changed, 5 insertions

git: pmap: Implement pmap_npt_transform() for NVMM

2021-07-20 Thread Aaron LI
commit bb11cce638499f3152a08842a30640ee016c7b61 Author: Aaron LI Date: Sun Jun 6 20:06:59 2021 +0800 pmap: Implement pmap_npt_transform() for NVMM This function will transform an initialized pmap structure for use by NVMM's AMD SVM backend. AMD's NPT (nested page

git: nvmm: Port to DragonFly #8: kcpuset(9) -> cpumask(9)

2021-07-20 Thread Aaron LI
commit e995879e78cf57b76c7793c2d9ae50be5c2a9c41 Author: Aaron LI Date: Thu May 13 07:25:59 2021 +0800 nvmm: Port to DragonFly #8: kcpuset(9) -> cpumask(9) Translate NetBSD's kcpuset(9) API to our cpumask(9) API. Use the atomic version to avoid possible races betw

git: nvmm: Port to DragonFly #9: atomic operations

2021-07-20 Thread Aaron LI
commit fb89adb49e0f0beb647ecc9cfaf975a5ceb19a53 Author: Aaron LI Date: Fri May 14 08:09:58 2021 +0800 nvmm: Port to DragonFly #9: atomic operations Add compat defines for NetBSD's atomic_inc_64(), atomic_{inc,dec}_uint(). However, we don't have an alternative for the type

git: nvmm: Port to DragonFly #10: cpu_info etc.

2021-07-20 Thread Aaron LI
commit d4ba871f2aa19ca9e23e8ce3de1f36c079cc7e34 Author: Aaron LI Date: Fri May 14 20:10:32 2021 +0800 nvmm: Port to DragonFly #10: cpu_info etc. * Replace 'struct cpu_info' with 'struct globaldata'. * Port cpu_info's ci_tss_sel/ci_tss/ci_gdt. * Port curcpu(), cpu_number

git: nvmm: Port to DragonFly #11: CPU features

2021-07-20 Thread Aaron LI
commit a0b1cadbfeff3984cb3ddd2e88d97ee164fc1d80 Author: Aaron LI Date: Sat May 15 22:37:08 2021 +0800 nvmm: Port to DragonFly #11: CPU features Summary of changes: sys/dev/virtual/nvmm/nvmm_compat.h | 10 -- sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c | 8 +--- sys/dev

git: nvmm: Port to DragonFly #13: debug register save & restore

2021-07-20 Thread Aaron LI
commit 82d3d56f49ebddcffd320029fb683e527b9af497 Author: Aaron LI Date: Sun May 16 17:18:00 2021 +0800 nvmm: Port to DragonFly #13: debug register save & restore Derived from NetBSD's x86_dbregs_save()/x86_dbregs_restore() in 'sys/arch/x86/x86/dbregs.c'. Summary of cha

git: nvmm: Port to DragonFly #12: FPU save & restore

2021-07-20 Thread Aaron LI
commit 614bd53980ffd35595e42d31a529a8f8ec7c38cd Author: Aaron LI Date: Tue May 25 14:40:41 2021 +0800 nvmm: Port to DragonFly #12: FPU save & restore Note that the host FPU state is indeterminant and depends on whether the user program used the FPU or not, so there m

git: nvmm: Port to DragonFly #14: device & module operations

2021-07-20 Thread Aaron LI
commit 990cf76b2a875d261b5d27ad7653d4779010c1b1 Author: Aaron LI Date: Tue May 18 14:05:40 2021 +0800 nvmm: Port to DragonFly #14: device & module operations Replace NetBSD 'cdevsw' and 'fileops' structs with our 'dev_ops' struct, and port NVMM to support both device

git: nvmm: Port to DragonFly #22: pmap EPT/NPT base address

2021-07-20 Thread Aaron LI
commit f027439746a0f39527ba9ccda841bd9fe3bf3a31 Author: Aaron LI Date: Sun May 23 18:21:31 2021 +0800 nvmm: Port to DragonFly #22: pmap EPT/NPT base address Replace NetBSD's pmap->pm_pdirpa[0] with our vtophys(pmap->pm_pml4). In addition, use vmspace_pmap() t

git: nvmm: Port to DragonFly #23: header inclusion adjustments

2021-07-20 Thread Aaron LI
commit db2e0557f8d7cd495508d870a0885df208d54fba Author: Aaron LI Date: Sun May 23 18:52:45 2021 +0800 nvmm: Port to DragonFly #23: header inclusion adjustments Summary of changes: sys/dev/virtual/nvmm/nvmm.c | 24 +++- sys/dev/virtual/nvmm/nvmm.h

git: nvmm: Add to sys/conf/files and LINT64

2021-07-20 Thread Aaron LI
commit 0cb083de2856e69ce0e1eda5c9d00463f76fac9d Author: Aaron LI Date: Mon May 10 07:17:27 2021 +0800 nvmm: Add to sys/conf/files and LINT64 Meanwhile, remove the unused 'files.nvmm'. Summary of changes: sys/conf/files | 10 ++ sys/config/LINT64

git: nvmm: Rewrite makefiles and hook to build

2021-07-20 Thread Aaron LI
commit 634ba0209d91c0c20dd67c906ac4dfc74d304564 Author: Aaron LI Date: Mon May 10 07:35:35 2021 +0800 nvmm: Rewrite makefiles and hook to build Note that kernel header files are install by the top-level 'include/Makefile'. However, it will install all found header files

git: nvmm: Improve makefile to allow standalone build

2021-07-20 Thread Aaron LI
commit 32a277d9deb04ede4ab427de66ef6ae6f9b02a99 Author: Aaron LI Date: Sat May 29 23:14:06 2021 +0800 nvmm: Improve makefile to allow standalone build This change makes the nvmm kernel module is buildable in its own directory. This helps debug the module. Summary

git: libnvmm: Port to DragonFly

2021-07-20 Thread Aaron LI
commit 3a9a09d3f101d9177e693b24ffe3c8dbd8e91672 Author: Aaron LI Date: Mon May 10 07:05:16 2021 +0800 libnvmm: Port to DragonFly * Add 'nvmm_compat.h' to adapt some macros/constants for DragonFly. * Add some '__unused' attributes to fix compilation warnings/errors

git: libnvmm: Fix mmap() failure with 'permission denied'

2021-07-20 Thread Aaron LI
commit 7f94978c70551b3b48544b1ff6f6b22502b5bca1 Author: Aaron LI Date: Mon May 31 07:25:14 2021 +0800 libnvmm: Fix mmap() failure with 'permission denied' The mmap() in nvmm_vcpu_create() was always failing with the EACCES (permission denied) error code. It was because mmap

git: Import nvmm(4) from NetBSD 9-stable

2021-07-20 Thread Aaron LI
commit 6d65b43de2e5d0b7565144d58d8941ac8ed86ab9 Author: Aaron LI Date: Wed May 5 15:35:16 2021 +0800 Import nvmm(4) from NetBSD 9-stable This is the kernel driver that provides support for hardware-accelerated virtualization. It is made of an MI frontend with the following

git: Import libnvmm(3) from NetBSD 9-stable

2021-07-20 Thread Aaron LI
commit 9034eadbf8cb3069bf853cd44e36476f0d55daba Author: Aaron LI Date: Wed May 5 15:58:32 2021 +0800 Import libnvmm(3) from NetBSD 9-stable This is the virtualization API that provides a way for VMM software to effortlessly create and manage virtual machines via NVMM(4

git: Import nvmm.4 manpage from NetBSD 9-stable

2021-07-20 Thread Aaron LI
commit b4c7dfa07e8ef4022ce29018328918d3caa8b80a Author: Aaron LI Date: Wed May 5 16:16:06 2021 +0800 Import nvmm.4 manpage from NetBSD 9-stable Branch: NetBSD 9-stable Date: Fri Apr 30 14:08:16 2021 + Path: share/man/man4/nvmm.4 Summary of changes: .../nvmmctl

git: nvmm: Port to DragonFly #3: CR/MSR defines

2021-07-20 Thread Aaron LI
commit 45b634f8ee03976e6265efad68077902b281ab4c Author: Aaron LI Date: Wed May 12 07:10:55 2021 +0800 nvmm: Port to DragonFly #3: CR/MSR defines Add XCR0 and various MSRs compat defines. Summary of changes: sys/dev/virtual/nvmm/nvmm_compat.h | 37

git: nvmm: Port to DragonFly #4: PAT modes

2021-07-20 Thread Aaron LI
commit 65f614d63e6e3c317c5c5ca5021f42dc229c8387 Author: Aaron LI Date: Sun May 30 16:01:24 2021 +0800 nvmm: Port to DragonFly #4: PAT modes Adapt NetBSD's PATENTRY() and PAT_* modes to ours PAT_VALUE() and PAT_* defines. Summary of changes: sys/dev/virtual/nvmm

git: nvmm: Port to DragonFly #5: constants/functions/macros

2021-07-20 Thread Aaron LI
commit 7456e7cb0e607799555b342259fdb09119cdc424 Author: Aaron LI Date: Sun May 30 16:02:49 2021 +0800 nvmm: Port to DragonFly #5: constants/functions/macros Update nvmm_compat.h to include various compat constant/functions defines. Summary of changes: sys/dev/virtual/nvmm

git: nvmm: Port to DragonFly #6: mutex/rwlock

2021-07-20 Thread Aaron LI
commit ae77b4d70057f49cc0220da5b71266576c51c159 Author: Aaron LI Date: Wed May 12 07:16:23 2021 +0800 nvmm: Port to DragonFly #6: mutex/rwlock Add compat code to adapt NetBSD's mutex and rwlock to use DragonFly's lockmgr(9). Summary of changes: sys/dev/virtual/nvmm

git: nvmm: Port to DragonFly #7: memory allocation

2021-07-20 Thread Aaron LI
commit bdcc0ba07a709a41868281d841bd6c480aeee90d Author: Aaron LI Date: Thu May 13 07:23:04 2021 +0800 nvmm: Port to DragonFly #7: memory allocation Add compat code to adapt NetBSD's kmem_alloc()/kmem_zalloc()/kmem_free(). Summary of changes: sys/dev/virtual/nvmm/nvmm.c

git: nvmm: Bring some minor changes from NetBSD-current

2021-07-20 Thread Aaron LI
commit 7a6db4cc292d40991f22f1fccfdff99706dd1172 Author: Aaron LI Date: Mon May 10 06:52:17 2021 +0800 nvmm: Bring some minor changes from NetBSD-current These changes help port NVMM to DragonFly by reducing the required difference. Summary of changes: sys/dev/virtual/nvmm

git: nvmm.4: Add HISTORY and hook to build

2021-07-20 Thread Aaron LI
commit 6a9485c3fd4ee1522c1be3d5b437717bc0b86d93 Author: Aaron LI Date: Mon May 10 07:03:31 2021 +0800 nvmm.4: Add HISTORY and hook to build Summary of changes: share/man/man4/Makefile | 1 + share/man/man4/nvmm.4 | 10 +- 2 files changed, 10 insertions(+), 1 deletion

git: nvmm: Port to DragonFly #2: CPUID Fn0000_000B for SVM

2021-07-20 Thread Aaron LI
commit 24ee0707117439302c85c247c21d8b13fc22a520 Author: Aaron LI Date: Wed May 12 07:03:56 2021 +0800 nvmm: Port to DragonFly #2: CPUID Fn_000B for SVM Add CPUID Fn_000B (Extended Topology Enumeration) defines for SVM. Obtained from NetBSD. Summary of changes

git: nvmm: Fix building nvmm into kernel

2021-07-21 Thread Aaron LI
commit 11755db6b4ad8e01f32f277b591496121e03fc5d Author: Aaron LI Date: Wed Jul 21 14:53:38 2021 +0800 nvmm: Fix building nvmm into kernel * Remove 'DIAGNOSTIC' define from 'nvmm_os.h'. First, 'DIAGNOSTIC' and 'INVARIANTS' are different options. Secondly, 'DIAGNOSTIC

git: kernel - Rename vm_map_wire() and vm_map_unwire() (3)

2021-07-23 Thread Aaron LI
commit 046fb897988184761d9689559f8405b8844d6961 Author: Aaron LI Date: Fri Jul 23 21:03:36 2021 +0800 kernel - Rename vm_map_wire() and vm_map_unwire() (3) Remove a now obsolete comment. Summary of changes: sys/vm/vm_map.c | 2 -- 1 file changed, 2 deletions(-) http

git: getopt(3): Recognize 'option::' for optional argument

2022-02-16 Thread Aaron LI
commit cf9179eef9dcb2908603f6aed2a14f797a8edb9a Author: Aaron LI Date: Wed Feb 16 14:31:36 2022 +0800 getopt(3): Recognize 'option::' for optional argument If the option is followed by two colons, then the option argument is optional. This is a GNU extension

git: getopt.3: Fix date

2022-02-16 Thread Aaron LI
commit 4cf91089fff1c81fc43377968ea9920d2c6b38e9 Author: Aaron LI Date: Thu Feb 17 07:02:54 2022 +0800 getopt.3: Fix date Reported-by: swildner Summary of changes: lib/libc/stdlib/getopt.3 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) http://gitweb.dragonflybsd.org

git: getopt.3: Clarify option string syntax

2022-02-19 Thread Aaron LI
commit cd85487ee5969aac1c1a34258daf05c3e598d591 Author: Aaron LI Date: Sat Feb 19 17:36:13 2022 +0800 getopt.3: Clarify option string syntax The recently added 'option::' syntax requires the following argument (if present) *must* be in the same word as the option name itself

git: lpr(1): Fix '-i' option with optional argument

2022-02-19 Thread Aaron LI
commit 7a1c99d311f1595cdc33d2ea3804d7fe580e1d87 Author: Aaron LI Date: Sat Feb 19 17:53:05 2022 +0800 lpr(1): Fix '-i' option with optional argument lpr(1)'s '-i' option accepts an optional argument, but the implementation was incomplete. For example, 'lpr -i -#3' errors

git: lpr.1: Tweak a bit about '-i' option

2022-02-19 Thread Aaron LI
commit 6dcbde115ef3af3193b5d80b0f87f916d9d21b65 Author: Aaron LI Date: Sat Feb 19 17:53:05 2022 +0800 lpr.1: Tweak a bit about '-i' option I made a mistake so that I lost this change in a rebase... Reviewed-by: swildner Summary of changes: usr.sbin/lpr/lpr/lpr.1 | 12

git: callout.9: Multiple minor fixes

2022-04-15 Thread Aaron LI
commit 740d86cc2e1e40d6a9ce413790bf0a99e9cbbda7 Author: Aaron LI Date: Fri Apr 15 21:52:09 2022 +0800 callout.9: Multiple minor fixes * Fix prototype of callout_init(); it has only one argument. (reported-by: dczheng) * Fix '.Dt' to 'CALLOUT' * Use 'function

git: libkern: Import timingsafe_bcmp() from FreeBSD

2022-04-15 Thread Aaron LI
commit ee3ffe9a0449377a35ea3d21f28e7ec5522c6c6d Author: Aaron LI Date: Fri Apr 15 22:35:27 2022 +0800 libkern: Import timingsafe_bcmp() from FreeBSD Will be used by WireGuard. Obtained-from: FreeBSD Summary of changes: sys/conf/files

git: pf: Fix 'set skip on' for interface groups

2022-04-30 Thread Aaron LI
commit 1f4644306e2abec3b56e1ef6ef21613ff4c991ad Author: Aaron LI Date: Sun May 1 11:31:41 2022 +0800 pf: Fix 'set skip on' for interface groups Previously if an interface type (without number), e.g. "set skip on vlan" or "set skip on em" was

git: pf: Make ":0" (noalias) also ignore link-local IPv6 addresses

2022-04-30 Thread Aaron LI
commit 6aa338e1205b533679b84dd50b38f5664f0d9cef Author: Aaron LI Date: Sun May 1 12:59:57 2022 +0800 pf: Make ":0" (noalias) also ignore link-local IPv6 addresses When users mark an interface to not use aliases they likely also don't want to use the link-local IP

git: libc/net: Fix b64_pton() for some exact-sized buffer

2022-05-01 Thread Aaron LI
commit 3bf574a91d98898f33673d3b78fb3fe581c3c4e7 Author: Aaron LI Date: Sat Apr 30 21:06:40 2022 +0800 libc/net: Fix b64_pton() for some exact-sized buffer When decoding a base64 string with padding, b64_pton() can fail when the output buffer is exactly the needed size

git: libc/net: Multiple minor cleanups to base64.c

2022-05-01 Thread Aaron LI
commit fe2da4c891f6d5ab555eac0ac3edc3241c50c1c5 Author: Aaron LI Date: Sat Apr 30 21:01:02 2022 +0800 libc/net: Multiple minor cleanups to base64.c * Remove unused but included headers. * Use 'unsigned char' instead of 'u_char'. * Properly cast 'char' to 'unsigned char

git: Add base64(3) man page for b64_ntop() and b64_pton()

2022-05-01 Thread Aaron LI
commit ea3dc9921401b579b2d0f2f0f8e226e392d468fb Author: Aaron LI Date: Sat Apr 30 22:22:20 2022 +0800 Add base64(3) man page for b64_ntop() and b64_pton() Reviewed-and-improved-by: swildner Summary of changes: lib/libc/net/Makefile.inc| 4 +- lib/libc

git: DragonFly_RELEASE_6_2 libc/net: Fix b64_pton() for some exact-sized buffer

2022-05-01 Thread Aaron LI
commit bdf470c4003cab60427283746458a1eddd6486e4 Author: Aaron LI Date: Sat Apr 30 21:06:40 2022 +0800 libc/net: Fix b64_pton() for some exact-sized buffer When decoding a base64 string with padding, b64_pton() can fail when the output buffer is exactly the needed size

<    2   3   4   5   6   7