Commit Graph

827 Commits

Author SHA1 Message Date
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
tron
7395068839 Enable SSP (Stack Smash Protection) in x86 kernels by default (except
in i386 *TINY kernels). The NetBSD/i386 "ALL" kernel is unconditionally
compiled with SSP enabled.

Change approved by the core team.
2009-11-25 17:08:08 +00:00
cegger
1b91587f84 Remove X86_MAXPROCS. This fixes PR port-xen/41755.
This also reduces diff to x86/x86/cpu.c as a nice side effect.
'looks good' bouyer@
2009-11-24 13:04:04 +00:00
rmind
448807fa21 Catch-up Xen and usermode with lwp_getpcb() and unbreak Xen build. 2009-11-21 05:54:04 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
dyoung
3976f04982 Use deviter(9) instead of accessing alldevs directly. 2009-11-06 23:09:10 +00:00
dyoung
e48f8429d1 Add a kernel configuration flag, SPLDEBUG, that activates a per-CPU log
of transitions to IPL_HIGH from lower IPLs.  SPLDEBUG is only available
on i386 and Xen kernels, today.

'options SPLDEBUG' adds instrumentation to spllower() and splraise() as
well as routines to start/stop debugging and to record IPL transitions:
spldebug_start(), spldebug_stop(), spldebug_raise(), spldebug_lower().
2009-11-03 05:23:27 +00:00
bouyer
5e31b302a3 When we stall the continuation waiting for the queued I/O to complete
in xbdback_co_cache_flush2(), we don't advance the req pointer. In this
case call xbdi_put() to compensate for the xbdi_get() that will be done again
in xbdback_co_main_loop().
Fix stalled xbdback detach that would stall the whole xenbus thread,
preventing new domU from be created.
2009-10-25 13:47:43 +00:00
snj
264f5ccd6e Drop 3rd and 4th clauses. Approved by cl@ and Keir Fraser (copyright
holders).
2009-10-23 05:10:48 +00:00
snj
0d31d3264f Remove 3rd and 4th clauses. OK cl@ (copyright holder). 2009-10-23 02:32:33 +00:00
bouyer
6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
bouyer
e4821a51fc Don't pass a NULL arg to DIOCCACHESYNC, sd(4) dereferences it.
Pass a pointer to a int initialized to 1, so that a DIOCCACHESYNC will be
forced on sd(4).
Should fix dom0 panic reported by Sarton O'Brien.
2009-10-14 18:54:00 +00:00
rmind
b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
jmcneill
74436af5d8 add dummy opt_via_c7temp.h, spotted by Andreas Gustafsson. 2009-10-03 20:56:39 +00:00
bouyer
c709e72357 Don't disestablish a soft interrupt which has not been established. 2009-09-27 19:48:57 +00:00
bouyer
fc24e4743d Announce feature-rx-copy and feature-rx-flip.
Add support for request-rx-copy. Tested with a Debian lenny install.
Should fix PR port-xen/40650
2009-09-25 23:11:57 +00:00
bouyer
db95bc7f01 xbdback: implement and publish "feature-flush-cache".
xbd: if feature-flush-cache is present, use it for DIOCCACHESYNC.
 If not present, make DIOCCACHESYNC return EOPNOTSUPP and warn on
 first call.
Should improve WAPBL reliability of Xen guests on a NetBSD dom0.
Unfortunably not all linux guests seems to support this feature, and using
feature-write-barrier would require a B_BARRIER flag in the buffer.
2009-09-23 17:48:55 +00:00
cegger
ee0f0893eb fix botch with merging in changes from x86/x86/cpu.c:
don't use wbinvd(). Xen flushes the cache for us.
This makes DomU boot again.
Spotted by bouyer@.
2009-09-22 13:59:42 +00:00
bouyer
bd2f090e7c Allow a xbd to be detached from the domU (e.g. at shutdown). Patch tested
and adjusted by David Young, discussed on port-xen@ early august.
2009-09-21 21:59:30 +00:00
dyoung
a1ac1a18e2 isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t. 2009-08-19 15:04:27 +00:00
dyoung
78e9d89046 Make the 'tags' target work by borrowing stuff from sys/arch/i386/Makefile. 2009-08-18 17:21:51 +00:00
dyoung
47b66b70d9 These are stragglers from my last commit ("Let us safely detach
the ISA bus and devices attaching to the ISA bus").  Define
isa_detach_hook() in MD ISA implementations.  Define isa_dmadestroy().
2009-08-18 17:02:00 +00:00
jmcneill
b0fb7abfad Switch to ACPICA 20090730, and update for API changes. 2009-08-18 16:41:02 +00:00
manu
a693f69b7e Build COMPAT_DARWIN and COMPAT_MACH as a Xen domU too 2009-08-16 15:35:52 +00:00
jym
bba2c41d59 Add Intel SpeedStep and AMD PowerNow! support in Xen dom0. MSR operations
are now compiled in by default.

Note that MSR support in Xen depends on its version. rdmsr() should always
succeed, but wrmsr() to certain registers can end in a NOOP. In that case,
the error will be logged (see xm dmesg).

Setting CPU frequency (SpeedStep) requires Xen 3.3 with the option
cpufreq="dom0-kernel" passed down to hypervisor during boot.

Compiled and tested for SpeedStep under i386 for XEN3_DOM0 and XEN3PAE_DOM0
by jym@. amd64 was tested by Joel Carnat.

See also http://mail-index.netbsd.org/port-xen/2009/08/02/msg005213.html .

Commit requested by bouyer@.
2009-08-05 20:15:36 +00:00
cegger
bd216fbaba from x86/x86/cpu.c:
- use atomic operations to set flags
- Align struct cpu_info to 64b.
2009-07-30 13:56:57 +00:00
cegger
3518084fc6 remove Xen2 support.
ok bouyer@
2009-07-29 12:02:05 +00:00
dyoung
2568e945f9 There's no such file as arch/i386/i386/core_machdep.c, so don't
list it here.
2009-07-24 21:22:22 +00:00
jym
3974d05df6 Fix typos in comments and __PRINTKs. 2009-07-23 15:26:20 +00:00
cegger
5bb3bd9d01 sprintf -> snprintf. Wrap long lines. 2009-06-20 10:24:28 +00:00
bouyer
3ac2dfe9bf Split mc146818-related functions from clock.c into rtc.c.
Call rtc_set_ymdhms() from xen/xen/clock.c:xen_rtc_set() for xen3 dom0
kernels as the Xen3 hypervisor doesn't write the new date/time to the CMOS
by itself.
Now a XEN3_DOM0 kernel properly updates the CMOS time.
2009-06-16 21:05:33 +00:00
bouyer
dbd6b2dcbf Implement DIOCGDISKINFO for xbd disk driver. 2009-06-15 21:11:24 +00:00
cegger
b43858307a Fix crash on Dom0 resume.
A xencons interrupt may occur before xencons device has been resumed.
Fix tested in jym-xensuspend branch.
2009-06-09 16:08:00 +00:00
cegger
b63f2e1e6a from sys/arch/x86/x86/cpu.c:
Implement -1 (RB_MD1) for physical CPUs in the Dom0.
2009-06-08 09:32:33 +00:00
cegger
84dc7c540d Interrupt handling in Xen 3.5 changed. There's no longer
a hardcoded upper limit. So *our* upper limit of 200 may be different from machine to machine now.
So just retry if the hypercall failed.
2009-06-03 12:43:22 +00:00
dyoung
ba38289d56 Revert part of last: .include <bsd.own.mk> for TOOL_SED / TOOL_AWK
definitions instead of using :Used / :Uawk alternates.  Now,
'nbmake-i386 tags' works.
2009-05-20 03:41:25 +00:00
dyoung
3f9760ec8f If TOOL_AWK or TOOL_SED are undefined, then use awk or sed,
respectively.

Use ${FINDCOMM} to avoid too-long arguments lists.
2009-05-20 03:36:36 +00:00
bouyer
10a318e30f Patch from Brian Marcotte on port-xen@:
write a "feature-rx-notify" to the xenstore, which is used by recent
linux dom0 kernels. This reduce packet loss when using a NetBSD domU
on such linux dom0.
This entry is ignored by NetBSD and older linux domUs.
2009-05-02 18:18:44 +00:00
cegger
287d5dd11d struct device * -> device_t 2009-05-01 09:38:24 +00:00
pgoyette
f10549404b Include cpu_topology.c for xen kernels, too. 2009-04-30 04:38:01 +00:00
jym
01d8525951 Do not forget to detach rnd(4) device when removing a xennet device.
Ok by bouyer@ in private mail.
2009-04-29 22:21:49 +00:00
cegger
18c8862fdc sprintf -> snprintf 2009-04-28 05:44:43 +00:00
ad
3a8f4acadc Make xen kernels build again. 2009-04-22 21:16:40 +00:00
cegger
c0eda02abe build mp.c for xen, too.
Fixes linking failures of Dom0 kernels. (Hi dyoung)
2009-04-18 11:26:58 +00:00
mlelstv
6f9ec05f3c mpacpi_scan_pci and mpbios_scan_pci were unified into mp_pci_scan.
See sys/arch/x86/x86/mp.c:1.9.
2009-04-18 09:51:21 +00:00
cegger
39e7d7e12f make xen kernels build again after the merge of syscall.c 2009-04-16 18:00:35 +00:00
ad
c6367674d6 Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)
2009-04-04 10:12:51 +00:00
rmind
f8a1f87074 Sync with recent i386/amd64 source merges - fix Xen builds. 2009-03-31 20:12:19 +00:00
dyoung
098e562dfd Explicitly #include <sys/device.h> and <sys/evcnt.h>. These files only
got the definitions they needed by chance, before.
2009-03-27 15:47:33 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00