summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Allow DTrace to be compiled-in to the kernel.br2015-06-101-0/+17
| | | | | | | | This will require for AArch64 as we dont have modules yet. Sponsored by: HEIF5 Sponsored by: ARM Ltd. Differential Revision: https://reviews.freebsd.org/D1997
* Fixup the build after r284215.mjg2015-06-101-1/+1
| | | | Submitted by: Ivan Klymenko <fidaj ukr.net> [slighly modified]
* Implement lockless resource limits.mjg2015-06-101-1/+1
| | | | | | | | | | Use the same scheme implemented to manage credentials. Code needing to look at process's credentials (as opposed to thred's) is provided with *_proc variants of relevant functions. Places which possibly had to take the proc lock anyway still use the proc pointer to access limits.
* Generalised support for copy-on-write structures shared by threads.mjg2015-06-101-2/+2
| | | | | | | | | Thread credentials are maintained as follows: each thread has a pointer to creds and a reference on them. The pointer is compared with proc's creds on userspace<->kernel boundary and updated if needed. This patch introduces a counter which can be compared instead, so that more structures can use this scheme without adding more comparisons on the boundary.
* Account for superpage mappings that are created by pmap_copy().alc2015-06-091-0/+1
|
* Support guest writes to the TSC by enabling the "use TSC offsetting"tychon2015-06-093-4/+26
| | | | | | | | execution control and writing the difference between the host TSC and the guest TSC into the TSC offset in the VMCS upon encountering a write. Reviewed by: neel
* Futex is an aligned 32-bit integer. Use the proper instruction anddchagin2015-06-081-24/+24
| | | | operand when dereferencing futex pointer.
* Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.alc2015-06-081-3/+2
| | | | | | Differential Revision: https://reviews.freebsd.org/D2712 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
* Update print_INTEL_TLB() by the tag values from the Intel SDMkib2015-06-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rev. 55. The modern CPUs cache and TLB descriptions looked quite questionable without the update, e.g. Haswell i7 4770S reported: Data TLB: 4 KB pages, 4-way set associative, 64 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line After the update, the report is: Data TLB: 1 GByte pages, 4-way set associative, 4 entries Data TLB: 4 KB pages, 4-way set associative, 64 entries Instruction TLB: 2M/4M pages, fully associative, 8 entries Instruction TLB: 4KByte pages, 8-way set associative, 64 entries 64-Byte prefetching Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative, 1024 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line Some tags were apparently removed from the table 3-21, Vol. 2A. Keep them around, but add a comment stating the removal. Update the format line for cpu_stdext_feature according to the bits from the SDM rev.55. It appears that Haswells do not store %cs and %ds values in the FPU save area. Store content of the %ecx register from the CPUID leaf 0x7 subleaf 0 as cpu_stdext_feature2 and print defined bits from it, again acording to SDM rev. 55. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* The 'verify_gla()' function is used to ensure that the effective addressneel2015-06-051-1/+1
| | | | | | | | | | | | | | after decoding the instruction matches the one provided by hardware. Prior to r283293 'vie->num_valid' used to contain the actual length of the instruction whereas now it contains the maximum instruction length possible. This introduced a bug when calculating a RIP-relative base address. Fix this by using 'vie->num_processed' rather than 'vie->num_valid' as the length of the emulated instruction. Reported and tested by: tychon MFC after: 1 week
* Use tunable 'hw.vmm.svm.features' to disable specific SVM features evenneel2015-06-041-5/+10
| | | | | | | | | though they might be available in hardware. Use tunable 'hw.vmm.svm.num_asids' to limit the number of ASIDs used by the hypervisor. MFC after: 1 week
* Remove unneeded NULL checks in amd64's trap_fatal().dim2015-06-011-8/+2
| | | | | | | | | | | | | Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier curproc->p_pid. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D2695
* Remove several write-only variables, all reported by the gcc 4.9kib2015-05-293-11/+3
| | | | | | | | | | | | | | | | buildkernel run. Some of them were write-only under some kernel options, e.g. variables keeping values only used by CTR() macros. It costs nothing to the code readability and correctness to eliminate the warnings in those cases too by removing the local cached values used only for single-access. Review: https://reviews.freebsd.org/D2665 Reviewed by: rodrigc Looked at by: bjk Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Fix non-deterministic delays when accessing a vcpu that was in "running" orneel2015-05-286-34/+132
| | | | | | | "sleeping" state. This is done by forcing the vcpu to transition to "idle" by returning to userspace with an exit code of VM_EXITCODE_REQIDLE. MFC after: 2 weeks
* Enabled rewritten PCID support by default.kib2015-05-271-1/+1
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 month
* When I merged the lemul branch I missied kib@'s r282708 commit.dchagin2015-05-251-9/+0
| | | | | | | This is not the final fix as I need properly cleanup thread resources before other threads suicide. Tested by: Ruslan Makhmatkhanov
* Regen for r283492.dchagin2015-05-2410-16/+40
|
* Implement Linux specific syncfs() system call.dchagin2015-05-244-4/+2
|
* Regen for r283488.dchagin2015-05-2410-20/+138
|
* Implement recvmmsg() and sendmmsg() system calls.dchagin2015-05-244-8/+12
|
* Reduce duplication between MD Linux code by moving msg relateddchagin2015-05-242-32/+0
| | | | struct definitions out into the compat/linux/linux_socket.h
* Regen for r283484.dchagin2015-05-245-7/+7
|
* Implement epoll_pwait() system call.dchagin2015-05-243-3/+1
|
* Regen for r283480.dchagin2015-05-2410-16/+70
|
* Add utimensat() system call.dchagin2015-05-244-4/+4
| | | | | The patch developed by Jilles Tjoelker and Andrew Wilcox and adopted for lemul branch by me.
* The kernel sends signals to the processes via ABI specific sv_sendsig method.dchagin2015-05-242-16/+0
| | | | | | | | Native ABI do not need signal conversion, only emulators may want this. Usually emulators implements its own sv_sendsig method. For now only ibcs2 emulator does not have own sv_sendsig implementation and depends on native sendsig() method. So, remove any extra attempts to convert signal numbers from native sendsig() methods except from i386 where ibsc2 is living.
* Rework signal code to allow using it by other modules, like linprocfs:dchagin2015-05-246-217/+21
| | | | | | | | | | | | | | | | | 1. Linux sigset always 64 bit on all platforms. In order to move Linux sigset code to the linux_common module define it as 64 bit int. Move Linux sigset manipulation routines to the MI path. 2. Move Linux signal number definitions to the MI path. In general, they are the same on all platforms except for a few signals. 3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion tables to avoid conversion errors. 4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside of allowed on Linux signal numbers. PR: 197216
* According to Linux man sigaltstack(3) shall return EINVAL if the ssdchagin2015-05-244-53/+0
| | | | | | | | | | | | | argument is not a null pointer, and the ss_flags member pointed to by ss contains flags other than SS_DISABLE. However, in fact, Linux also allows SS_ONSTACK flag which is simply ignored. For buggy apps (at least mono) ignore other than SS_DISABLE flags as a Linux do. While here move MI part of sigaltstack code to the appropriate place. Reported by: abi at abinet dot ru
* Regen for r283467.dchagin2015-05-248-10/+14
|
* Call nosys in case when the incorrect syscall number is specified.dchagin2015-05-244-5/+10
| | | | Reported by: trinity
* Regen for r283465.dchagin2015-05-2410-14/+68
|
* Add preliminary fallocate system call implementationdchagin2015-05-244-5/+4
| | | | | | | to emulate posix_fallocate() function. Differential Revision: https://reviews.freebsd.org/D1523 Reviewed by: emaste
* Regen for r283451.dchagin2015-05-2410-16/+80
|
* Implement ppoll() system call.dchagin2015-05-244-4/+4
| | | | | Differential Revision: https://reviews.freebsd.org/D1105 Reviewed by: trasz
* Include opt_compat.h, so that COMPAT_LINUX32 is defined, and we candchagin2015-05-241-0/+2
| | | | | | | | | access to the semop structs and functions. Submitted by: cognet@ Differential Revision: https://reviews.freebsd.org/D1095 Reviewed by: trasz
* Regen for r283444.dchagin2015-05-2410-20/+78
|
* Implement eventfd system call.dchagin2015-05-244-8/+4
| | | | | Differential Revision: https://reviews.freebsd.org/D1094 In collaboration with: Jilles Tjoelker
* Put the correct value for the abi_nfdbits parameter of kern_select() fordchagin2015-05-242-0/+2
| | | | | | | all supported Linuxulators. Differential Revision: https://reviews.freebsd.org/D1093 Reviewed by: trasz
* Regen for r283441.dchagin2015-05-2410-38/+258
|
* Implement epoll family system calls. This is a tiny wrapperdchagin2015-05-244-18/+16
| | | | | | | | | | | | around kqueue() to implement epoll subset of functionality. The kqueue user data are 32bit on i386 which is not enough for epoll user data, so we keep user data in the proc emuldata. Initial patch developed by rdivacky@ in 2007, then extended by Yuri Victorovich @ r255672 and finished by me in collaboration with mjg@ and jillies@. Differential Revision: https://reviews.freebsd.org/D1092
* To avoid code duplication move open/fcntl definitions to the MIdchagin2015-05-242-74/+1
| | | | | | | header file. Differential Revision: https://reviews.freebsd.org/D1087 Reviewed by: trasz
* Use the BSD_TO_LINUX_SIGNAL() wherever there is no needdchagin2015-05-241-6/+2
| | | | | | to check the ABI as it is known. Differential Revision: https://reviews.freebsd.org/D1086
* Being exported through vdso the note.Linux section used by glibcdchagin2015-05-242-3/+4
| | | | | | | | | to determine the kernel version (this saves one uname call). Temporarily disable the export of a note.Linux section until I figured out how to change the kernel version in the note.Linux on the fly. Differential Revision: https://reviews.freebsd.org/D1081 Reviewed by: trasz
* Add AT_RANDOM and AT_EXECFN auxiliary vector entries which are used bydchagin2015-05-244-2/+54
| | | | | | glibc. At list since glibc version 2.16 using AT_RANDOM is mandatory. Differential Revision: https://reviews.freebsd.org/D1080
* Regen for r283428.dchagin2015-05-2410-20/+10
|
* Change linux faccessat syscall definition to match actual linux one.dchagin2015-05-242-2/+3
| | | | | | | | | | The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags are specified, then the wrapper function employs fstatat() to determine access permissions. Differential Revision: https://reviews.freebsd.org/D1078 Reviewed by: trasz
* Regen for r283424.dchagin2015-05-245-0/+9225
|
* Add preliminary support for x86-64 Linux binaries.dchagin2015-05-2412-0/+3210
| | | | Differential Revision: https://reviews.freebsd.org/D1076
* Refund the proc emuldata struct for future use. For now move flags fromdchagin2015-05-241-13/+0
| | | | | | | | | | thread emuldata to proc emuldata as it was originally intended. As we can have both 64 & 32 bit Linuxulator running any eventhandler can be called twice for us. To prevent this move eventhandlers code from linux_emul.c to the linux_common.ko module. Differential Revision: https://reviews.freebsd.org/D1073
* Introduce a new module linux_common.ko which is intended for thedchagin2015-05-242-14/+8
| | | | | | | | | | | | | | | | | | | | | | | following primary purposes: 1. Remove the dependency of linsysfs and linprocfs modules from linux.ko, which will be architecture specific on amd64. 2. Incorporate into linux_common.ko general code for platforms on which we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit). 3. Move malloc(9) declaration to linux_common.ko, to enable getting memory usage statistics properly. Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko. Temporarily remove dtrace garbage from linux_mib.c and linux_util.c Differential Revision: https://reviews.freebsd.org/D1072 In collaboration with: Vassilis Laganakos. Reviewed by: trasz
OpenPOWER on IntegriCloud