Age | Commit message (Collapse) | Author |
|
This is set by many hypervisors, including kvm, vmware, hyper-v.
|
|
backed out because of libkvm breakage, recommitting now with libkvm fix.
ok deraadt@
|
|
find a different way.
|
|
user of these was hibernate, which now gets its own PD_MASK (since
the resume time PD_MASK is essentially disjoint from the runtime
PD_MASK). No functional change, just moving the deck chairs around in
preparation for an upcoming change.
ok deraadt
|
|
|
|
.rodata (kernel copies to the RW page), protect the code page with RX
permissions, protect the code page with RW permissions.
ok deraadt@
|
|
|
|
a common #defined location for both i386 and amd64. This diff fixes i386 to
match.
Also fix a tab/space issue in amd64 hibernate_var.h
discussed with deraadt
|
|
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
|
sys/arch/i386/i386/bios.c, ok deraadt
|
|
| i386/bus_space.c:1.5->1.6
| i386/machdep.c:1.551->1.552
| include/bus.h:1.61->1.62
|
|
src/sys/arch/amd64/amd64/bus_space.c r1.22
src/sys/arch/amd64/include/bus.h r1.27
instead of using the tag as an identifier for IO or memory mappings
that was checked inside the api, turn it into a pointer to a structure
of function pointers. the api then generally becomes a set of macros
that deref the function pointers on the callers behalf. the idea
is that following a pointer to very small functions is cheap compared
to doing compares continuously.
the kernel is smaller and the api is more cache friendly now.
the porting of this code from amd64 to i386 was done by kimberley manning
requested by and ok tedu@
|
|
Virtio needs the MP memory barriers even on SP kernels.
OK kettenis@
|
|
from hibernate code that were already defined in pte.h (with different
names). No functional change.
ok sf@, deraadt@
|
|
Spinning inside an IPI handler is generally a bad idea as it is very hard to
avoid deadlocks. As far as I can tell the synchronization isn't necessary.
Multi-core CPUs have hardware mechanisms to do the appropropriate coordination
between cores and coordination between sockets isn't necessary either.
This seems to fix the various hangs and suspend/resume failures that people
have been seeing when running apmd -A or apmd -C.
Tested by many.
ok kspillner@, mpi@
|
|
ok matthew@, guenther@
|
|
* you can #include <sys/endian.h> instead of <machine/endian.h>,
and ditto <endian.h> (fixes code that pulls in <sys/endian.h> first)
* those will always export the symbols that POSIX specified for
<endian.h>, including the new {be,le}{16,32,64}toh() set. c.f.
http://austingroupbugs.net/view.php?id=162
if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)
* when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
<arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
and betoh*
ok deraadt@
|
|
on the 2nd of February 2011 in NetBSD.
http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2
http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2
http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2
http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2
http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2
http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2
http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2
http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2
|
|
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce
power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To
start minimally, use PAUSE on i386/amd64 and empty on others. The name is
chosen following the existing cpu_idle_*() functions. Naming and API may be
polished later.
OK kettenis@
|
|
ok mlarkin
|
|
don't need anymore.
|
|
ok dlg@ mpi@ deraadt@
|
|
|
|
native size, so eliminate the #defines.
ok miod@
|
|
|
|
fairer access to the kernel lock between logical cpus, especially
in multi socket systems.
i first wrote this diff in 2011.
ok n2k14 for post 5.5 (deraadt@ and kettenis@ in particular)
|
|
namespace, so stop changing behavior when it's #defined
ok beck@ krw@
|
|
faults to avoid sleeping. Implement this functionality for i386 and amd64
for faults in the user address space. If the ci_inatomic flag is set in
struct cpu_info, copyin(9) and copyout(9) will return EFAULT when a user-space
address needs to be faulted in. Use this to properly implement
__copy_to_user_inatomic() and __copy_from_user_inatomic_nocache() in the
inteldrm(4) code.
ok krw@, guenther@
|
|
<machine/pmap.h> where it belongs, and compensate in <uvm/uvm_extern.h>
by including <uvm/uvm_pmap.h> before <uvm/uvm_page.h>. Tested on all
MACHINE_ARCH but amd64 and i386 (and hppa64).
|
|
suspend work on some machines.
ok deraadt@, mlarkin@
|
|
|
|
Also move it from pmap.h to pmap.c because it is an internal detail.
|
|
hibernate goo up after 64KB to avoid posible corruption by buggy BIOS SMM
code. Diff also ensures the first 64KB doesn't get handed to UVM either.
ok deraadt@, tested by many with no regressions reported
|
|
ok deraadt@
|
|
|
|
ok krw@, deraadt@
|
|
instead of the cache line containing the local variable used to specify the
address. Fixes the gnome corruption and hangs people have been experiencing
for the last couple of months or so.
ok deraadt@, mlarkin@
|
|
(at least BOOT 3.20 on amd64 and BOOT 3.18 on i386) or you'll risk losing
your serial console.
ok deraadt@
|
|
|
|
ok miod
|
|
if it can tell the target CPU isn't actually idling and introduce cpu_kick()
for the cases where we want to force a non-idle CPU into the kernel.
just a port of the amd64 version; testing by many
|
|
1. Makes amd64 and i386 MTRR code nearly identical
2. Removes support for per-process MTRRs (which were never implemented)
3. Treat "unknown" MTRR types as uncacheable instead of trying to preserve
bogus settings made by the BIOS
4. Various KNF cleanups
Should be no functional change.
ok jsg@, deraadt@
|
|
sure that SIZE_MAX and SSIZE_MAX are defined as constants with a matching
type on all are architectures.
ok millert@, matthew@
|
|
|
|
ok miod kettenis
|
|
we block all interrupts that can grab the kernel lock. The simplest way to
achieve this is to make sure mutexes always raise the ipl to the highest
level that has interrupts that grab the kernel lock. This will allow us
to have "mpsafe" interrupt handlers at lower priority levels.
No change for non-MULTIPROCESSOR kernels.
ok matthew@
|
|
type definitions that are the same across all archs from
<machine/_types.h> to <sys/_types.h>
ok deraadt@ kettenis@ otto@
|
|
breakage lurking; ok kettenis@
|
|
the same across all archs from <machine/_types.h> to <sys/_types.h>
ok deraadt@
|
|
removed at n2k13 but a few errant references still remained. No functional
change. Spot tested by my on i386 and amd64 UP environments, no regressions
seen.
noticed by deraadt@
|