#
2c253072 |
| 20-Aug-2022 |
riastradh <riastradh@NetBSD.org> |
x86: Move definition of struct pmap to pmap_private.h.
This makes pmap_resident_count and pmap_wired_count out-of-line functions instead of inline. No functional change intended otherwise.
|
#
9f5c3dd3 |
| 07-Oct-2021 |
msaitoh <msaitoh@NetBSD.org> |
KNF. No functional change.
|
#
faa6c9ac |
| 19-Jun-2020 |
maxv <maxv@NetBSD.org> |
localify
|
#
22e594a0 |
| 25-Apr-2020 |
bouyer <bouyer@NetBSD.org> |
Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM guests in GENERIC. Xen support can be disabled at runtime with boot -c disable hypervisor
|
#
0ce48697 |
| 24-Apr-2020 |
maxv <maxv@NetBSD.org> |
Give the ldt a fixed size of one page (512 slots), and drop the variable- sized mechanism that was too complex.
This fixes a race between USER_LDT and SVS: during context switches, the way SVS insta
Give the ldt a fixed size of one page (512 slots), and drop the variable- sized mechanism that was too complex.
This fixes a race between USER_LDT and SVS: during context switches, the way SVS installs the new ldt relies on the ldt pointer AND the ldt size, but both cannot be accessed atomically at the same time.
show more ...
|
#
ddc3b45d |
| 21-Apr-2020 |
jdolecek <jdolecek@NetBSD.org> |
two more files to convert to newer HYPERVISOR_physdev_op() interface
|
#
70747dc1 |
| 10-Nov-2019 |
chs <chs@NetBSD.org> |
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen.
|
#
bf5abc14 |
| 11-Feb-2019 |
cherry <cherry@NetBSD.org> |
We reorganise definitions for XEN source support as follows:
XEN - common sources required for baseline XEN support. XENPV - sources required for support of XEN in PV mode. XENPVHVM - sources requir
We reorganise definitions for XEN source support as follows:
XEN - common sources required for baseline XEN support. XENPV - sources required for support of XEN in PV mode. XENPVHVM - sources required for support for XEN in HVM mode. XENPVH - sources required for support for XEN in PVH mode.
show more ...
|
#
7167be19 |
| 08-Nov-2018 |
maxv <maxv@NetBSD.org> |
Simplify the ifdefs, and error out if XEN and USER_LDT are both defined.
|
#
a8a5c538 |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
1345af3b |
| 13-Jul-2018 |
maxv <maxv@NetBSD.org> |
Remove the X86PMC code I had written, replaced by tprof. Many defines become unused in specialreg.h, so remove them. We don't want to add defines all the time, there are countless PMCs on many genera
Remove the X86PMC code I had written, replaced by tprof. Many defines become unused in specialreg.h, so remove them. We don't want to add defines all the time, there are countless PMCs on many generations, and it's better to just inline the event/unit values.
show more ...
|
#
07c13b08 |
| 12-Jul-2018 |
maxv <maxv@NetBSD.org> |
Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:
* Removes "options PERFCTRS", the associated includes, and the associated ifdefs. In doing so, it removes several XXXSMPs
Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:
* Removes "options PERFCTRS", the associated includes, and the associated ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is good.
* Removes the PMC code of ARM XSCALE.
* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.
* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The definitions are put in sysarch.h.
* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control and sys_pmc_get_info syscalls. They are marked as OBSOL in kern, netbsd32 and rump.
* Removes the pmc_evid_t and pmc_ctr_t types.
* Removes all the associated man pages. The sets are marked as obsolete.
show more ...
|
#
d8a4c9c8 |
| 04-Jan-2018 |
maxv <maxv@NetBSD.org> |
Declare IOMAP_VALIDOFF, not to use ci_tss pointers.
|
#
36f76841 |
| 04-Jan-2018 |
maxv <maxv@NetBSD.org> |
Allocate the TSS area dynamically. This way cpu_info and cpu_tss can be put in separate pages.
|
#
6825d8ad |
| 04-Jan-2018 |
maxv <maxv@NetBSD.org> |
Group the different TSSes into a cpu_tss structure. And pack this structure to make sure there is no padding between 'tss' and 'iomap'.
|
#
be7dee3e |
| 21-Oct-2017 |
maxv <maxv@NetBSD.org> |
Forbid 64bit entries. That's it, now we support USER_LDT on amd64.
|
#
30e916fa |
| 21-Oct-2017 |
maxv <maxv@NetBSD.org> |
Improve our segregs model. Pass 3/3.
Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs.
On Xen however, its behavior does not change, because we need to do an hy
Improve our segregs model. Pass 3/3.
Treat %gs the same way we treat %ds/%es/%fs: restore it in INTRFASTEXIT on 32bit LWPs.
On Xen however, its behavior does not change, because we need to do an hypercall before INTR_RESTORE_GPRS, and that's too complicated for now.
As a side effect, this change fixes a bug in the ACPI wakeup code; %fs/%gs were not restored on 32bit LWPs, and chances are they would segfault shortly afterwards.
Support for USER_LDT on amd64 is almost complete now.
show more ...
|
#
8428b60f |
| 19-Oct-2017 |
maxv <maxv@NetBSD.org> |
Improve our segregs model. Pass 2/3.
Treat %fs the same way we treat %ds and %es. For a new 32bit LWP %fs is set to GUDATA32_SEL, and always updated in INTRFASTEXIT.
This solves an important issue
Improve our segregs model. Pass 2/3.
Treat %fs the same way we treat %ds and %es. For a new 32bit LWP %fs is set to GUDATA32_SEL, and always updated in INTRFASTEXIT.
This solves an important issue we had until now: we couldn't handle the faults generated by the "movw $val,%fs" instructions, because they were deep into the kernel context. Now %fs can fault only in INTRFASTEXIT, which is safe.
Note that it also fixes a bug I believe affected the kernel: on AMD CPUs, setting %fs to zero does not flush the internal register state, and therefore we could leak the %fs base address when context-switching. This being said, I couldn't trigger the issue on the AMD cpu I have. Whatever, it's fixed now, since we first set %fs to GUDATA32 - which does flush the register state.
show more ...
|
#
4c573704 |
| 15-Oct-2017 |
maxv <maxv@NetBSD.org> |
Remove this #undef on native amd64, but keep it on Xen.
|
#
01f055b8 |
| 15-Oct-2017 |
maxv <maxv@NetBSD.org> |
Add setusergs on Xen, and simplify.
|
#
71b4a94a |
| 30-Aug-2017 |
maxv <maxv@NetBSD.org> |
Don't allow userland to create 286/386 call gates anymore - they are not used by Wine. While here, don't allow it to overwrite the static entries either, don't allow unknown entry types, remove LDT_D
Don't allow userland to create 286/386 call gates anymore - they are not used by Wine. While here, don't allow it to overwrite the static entries either, don't allow unknown entry types, remove LDT_DEBUG, and style.
show more ...
|
#
e017aec5 |
| 12-Aug-2017 |
maxv <maxv@NetBSD.org> |
Remove vm86.
Pass 3.
|
#
a5cb3465 |
| 12-Jul-2017 |
maxv <maxv@NetBSD.org> |
include opt_pmc.h
|
#
8bf7800c |
| 10-Mar-2017 |
maxv <maxv@NetBSD.org> |
PMCs for amd64 - still disabled, like i386.
|
#
6dc981ea |
| 18-Feb-2017 |
maxv <maxv@NetBSD.org> |
There is currently an ugly mix between the PERFCTRS subsystem (MI), and i386's own PMC interface (MD). Stop using PERFCTRS and use PMC instead. While here remove some unused flags, which are wrong on
There is currently an ugly mix between the PERFCTRS subsystem (MI), and i386's own PMC interface (MD). Stop using PERFCTRS and use PMC instead. While here remove some unused flags, which are wrong on the latest CPUs anyway.
show more ...
|