Go to file
maxv 27a60aeb62 Harmonize the handling of the CPL between AMD and Intel.
AMD has a separate guest CPL field, because on AMD, the SYSCALL/SYSRET
instructions do not force SS.DPL to predefined values. On Intel they do,
so the CPL on Intel is just the guest's SS.DPL value.

Even though technically possible on AMD, there is no sane reason for a
guest kernel to set a non-three SS.DPL, doing that would mess up several
common segmentation practices and wouldn't be compatible with Intel.

So, force the Intel behavior on AMD, by always setting SS.DPL<=>CPL.
Remove the now unused CPL field from nvmm_x64_state::misc[]. This actually
increases performance on AMD: to detect interrupt windows the virtualizer
has to modify some fields of misc[], and because CPL was there, we had to
flush the SEG set of the VMCB cache. Now there is no flush necessary.

While here remove the CPL check for XSETBV on Intel, contrary to AMD
Intel checks the CPL before the intercept, so if we receive an XSETBV
VMEXIT, we are certain that it was executed at CPL=0 in the guest. By the
way my check was wrong in the first place, it was reading SS.RPL instead
of SS.DPL.
2019-02-14 14:30:20 +00:00
bin DEBUG mode only change. When pretty-printing a word from a parse 2019-02-14 13:27:59 +00:00
common Fix kUBSan build with GCC7 2019-02-13 17:17:02 +00:00
compat don't build kernel grovelling tools as n64 on sgimips - we don't actually have 2018-09-20 02:51:21 +00:00
crypto - bump buffer sizes to avoid potential truncation issues 2019-02-04 04:36:41 +00:00
dist/pf - enlarge buffer to avoid snprintf() truncation 2019-02-03 10:48:46 +00:00
distrib Sort, and add a couple obsolete files for binutils=231. 2019-02-14 12:49:28 +00:00
doc new nsd 2019-02-12 16:13:23 +00:00
etc separate out the arch-specific and compat-specific subdirs. 2019-02-09 21:43:23 +00:00
external put joerg's varasm.c patch back with additional upstream fixes. now 2019-02-14 10:29:58 +00:00
extsrc
games apply -Wno-error=implicit-fallthrough on files that have fallthru 2019-02-04 09:51:47 +00:00
include Provide global variables with C linkage, otherwise they will create 2019-01-08 17:35:42 +00:00
lib Harmonize the handling of the CPL between AMD and Intel. 2019-02-14 14:30:20 +00:00
libexec - bump buffer sizes to avoid potential truncation issues 2019-02-04 04:36:41 +00:00
regress
rescue fix duplicated chunk from merge 2019-01-27 04:33:29 +00:00
sbin Make "gpt migrate" work for disks with FAT32 and NTFS partitions 2019-02-10 10:35:51 +00:00
share Note Intel support. 2019-02-13 16:06:28 +00:00
sys Harmonize the handling of the CPL between AMD and Intel. 2019-02-14 14:30:20 +00:00
tests implement return_one for hppa, mips, ppc64, and vax. 2019-02-14 10:36:33 +00:00
tools - build the gthr*.h files to be installed on the fly, instead of 2019-02-09 03:57:00 +00:00
usr.bin remove the hack to remove .eh_frame -- gcc7 is fixed it seems. 2019-02-14 12:22:06 +00:00
usr.sbin Bump date for previous. 2019-02-13 11:40:41 +00:00
build.sh add aliases for evbarm without saying 'earm': 2019-02-08 02:05:32 +00:00
BUILDING
Makefile .WAIT for tools to complete. 2018-11-11 07:43:35 +00:00
Makefile.inc
README.md Tidy up a bit. 2018-10-23 15:44:42 +00:00
UPDATING add a quick note about gcc 7 likely causing update build failures. 2019-02-08 09:57:01 +00:00

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git