The NetBSD Project

CVS log for src/sys/arch/xen/xen/Attic/clock.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / xen / xen

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.78.4.2: download - view: text, markup, annotated - select for diffs
Sun Oct 13 14:45:13 2024 UTC (7 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.78.4.1: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.4.1: +3 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #1904):

	sys/arch/xen/xen/xen_clock.c: revision 1.19 (patch)
	(applied to ..../clock.c)

xen_rtc_set: Zero-initialize op before passing to hypervisor.

PR port-xen/58362

Revision 1.78.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 27 16:55:41 2023 UTC (21 months, 2 weeks ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #1668):

	sys/arch/xen/xen/xen_clock.c: revision 1.10
	sys/arch/xen/xen/xen_clock.c: revision 1.12
	(applied to sys/arch/xen/xen/clock.c)

Unmask event after VCPUOP_stop_periodic_timer and
initializing ci->ci_xen_hardclock_systime_ns, to avoid a possible race with
xen_timer_handler()

Unmask event after arming the one-shot timer in clock initialisation,
to avoid a possible race with xen_timer_handler() updating
ci_xen_hardclock_systime_ns while we're reading it.

Pointed out by Taylor R Campbell

Revision 1.82
Sat Apr 25 15:26:18 2020 UTC (5 years ago) by bouyer
Branches: MAIN
CVS tags: thorpej-futex-base, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
FILE REMOVED
Changes since revision 1.81: +2 -2 lines
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

Revision 1.67.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:13 2020 UTC (5 years ago) by martin
Branches: phil-wifi
Diff to: previous 1.67.2.2: preferred, colored; branchpoint 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67.2.2: +4 -8 lines
Sync with HEAD

Revision 1.80.6.3
Thu Apr 16 19:23:50 2020 UTC (5 years ago) by bouyer
Branches: bouyer-xenpvh
FILE REMOVED
Changes since revision 1.80.6.2: +2 -2 lines
Rename xen/xen/clock.c to xen_clock.c, so that it can be compiled
with x86/isa/clock.c
call events_default_setup() from hypervisor_match to that event
arrays are properly initialised.
Use xen_delay() and xen's timecounter for PVHVM.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Mon Apr 13 22:54:12 2020 UTC (5 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +6 -10 lines
By default, events are bound to CPU 0 (exept for IPIs and VTIMERs which
are bound to a different CPU at creation time).
Recent MI changes caused the scheduler to choose a different CPU when
probing and attaching xennet devices (I guess it's the xenbus thread which
runs on a different CPU). This cause the callback to be called on a different
CPU than the one expected by the kernel, and the event is ignored.
It is handled when the clock causes the callback to be called on the right
CPU, which is why xennet still run, but slowly.

Change event_set_handler() to do a EVTCHNOP_bind_vcpu if requested to,
and make sure we don't do it for IPIs and VIRQs (for theses, the op fails).

Revision 1.67.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:12 2020 UTC (5 years, 1 month ago) by martin
Branches: phil-wifi
Diff to: previous 1.67.2.1: preferred, colored; branchpoint 1.67: preferred, colored
Changes since revision 1.67.2.1: +6 -5 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.80.6.2: download - view: text, markup, annotated - select for diffs
Sun Apr 12 17:25:53 2020 UTC (5 years, 1 month ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.80.6.1: preferred, colored; branchpoint 1.80: preferred, colored
Changes since revision 1.80.6.1: +2 -3 lines
Get rid of xen-specific ci_x* interrupt handling:
- use the general SIR mechanism, reserving 3 more slots for IPL_VM, IPL_SCHED
  and IPL_HIGH
- remove specific handling from C sources, or change to ipending
- convert IPL number to SIR number in various places
- Remove XUNMASK/XPENDING in assembly or change to IUNMASK/IPENDING
- remove Xen-specific ci_xsources, ci_xmask, ci_xunmask, ci_xpending from
  struct cpu_info
- for now remove a KASSERT that there are no pending interrupts in
  idle_block(). We can get there with some software interrupts pending
  in autoconf XXX needs to be looked at.

Revision 1.80.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 11 18:26:07 2020 UTC (5 years, 1 month ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +6 -5 lines
Move softint and preemtion-related functions out of x86/x86/intr.c to
  its own file, x86/x86/x86_softintr.c
Add x86/x86/x86_softintr.c for native and XenPV
Make sure XenPV also check ci_ioending, which is used for softints.
Switch XenPV to fast softints and allow kernel preemption.
kpreempt_disable() before calling pmap_changeprot_local()
run  xen_wallclock_time() and xen_global_systime_ns() at splshed() to
  avoid being interrupted.

XXX amd64 lock stubs are racy for XPENDING

Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Oct 16 18:29:49 2019 UTC (5 years, 7 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: bouyer-xenpvh
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -3 lines
Add and use __FPTRCAST, requested by uwe@

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Oct 16 15:01:10 2019 UTC (5 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
add void * casts for the clock interrupt handlers.

Revision 1.67.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:06:56 2019 UTC (5 years, 11 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +819 -402 lines
Sync with HEAD

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sat Mar 9 09:51:29 2019 UTC (6 years, 2 months ago) by kre
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -3 lines

error in xen_resumeclocks() is __diagused.
Avoid compile warning (-->error) when ! options DIAGNOSTIC.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Feb 2 12:32:55 2019 UTC (6 years, 3 months ago) by cherry
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -3 lines
Switch NetBSD/xen to use XEN api tag RELEASE-4.11.1

The headers for this api are in sys/external/mit/xen-include-public/dist/

Revision 1.65.2.5: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:01:46 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.65.2.4: preferred, colored; branchpoint 1.65: preferred, colored; next MAIN 1.66: preferred, colored
Changes since revision 1.65.2.4: +5 -5 lines
Sync with HEAD, resolve a few conflicts

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Dec 25 06:50:12 2018 UTC (6 years, 4 months ago) by cherry
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
Excise XEN specific code out of x86/x86/intr.c into xen/x86/xen_intr.c

While at it, separate the source function tracking so that the interrupt
paths are truly independant.

Use weak symbol exporting to provision for future PVHVM co-existence
of both files, but with independant paths. Introduce assembler code
such that in a unified scenario, native interrupts get first priority
in spllower(), followed by XEN event callbacks. IPL management and
semantics are unchanged - native handlers and xen callbacks are
expected to maintain their ipl related semantics.

In summary, after this commit, native and XEN now have completely
unrelated interrupt handling mechanisms, including
intr_establish_xname() and assembler stubs and intr handler
management.

Happy Christmas!

Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Dec 24 14:55:42 2018 UTC (6 years, 4 months ago) by cherry
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -4 lines
Bifurcate the interrupt establish functions between XEN and non-XEN

Thus intr_establish_xname() becomes xen_intr_establish_xname() etc.

One consequence of this is that dom0 devices expect the native
function calls to be available and we thus provide weak aliasing for
dom0 builds to succeed. XEN and non-XEN devices are distinguished by
the PIC they are established on. XEN interrupts are exclusively
established on xen_pic, while dom0 interrupts are established on
natively available PICs.

This allows us an orthogonal path to xen device management (eg:
xenstore events) in XENPVHVM, without having to worry about unifying
the vector entry paths, etc., which is quite challenging.

Revision 1.65.2.4: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:28 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.65.2.3: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.3: +5 -4 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Nov 18 23:50:48 2018 UTC (6 years, 5 months ago) by cherry
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
On Xen, copy just the bits we need from the trapframe for hardclock(9)
and statclock(9).

Current, the macros that use the trapframe are:
CLKF_USERMODE()
CLKF_PC()
CLKF_INTR()

Of these, CLKF_INTR() already ignores the frame and uses the ci_idepth
variable to do its job.

Convert the two remaining ones to do this, but only for XEN.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sun Nov 18 10:24:10 2018 UTC (6 years, 5 months ago) by cherry
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -2 lines
Save the interrupt trap/clockframe to a per-cpu copy.

We can use this copy to pass on the trapframe to hardclock(9) from
within the xen timer handler. This delinks the current dependency
between MD code and the handler, which is specially prototyped to take
the clockframe unlike any other handler.

This change has performance implications, as each interrupt entry will
copy the entire trapframe over to the per-cpu cached copy. This can be
mitigated by selectively copying just the parts of the clockframe that
are used by hardclock() et. al.

Tested on amd64 XEN domU

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Oct 26 05:33:21 2018 UTC (6 years, 6 months ago) by cherry
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
Decompose hypervisor_enable_event() into functional steps.

The hypervisor_unmask_event() step is relevant for any event.

The pirq related step is only relevant for pirq bound events.

Prune blanket usage of this, so that usage is semantically appropriate.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Oct 24 03:59:33 2018 UTC (6 years, 6 months ago) by cherry
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3 lines
When using the intr_establish_xname() interface to register
XEN events, follow established x86/intr.c conventions - set
the 'legacy' irq value to -1, to indicate that the pic, pin
combination (&xen_pic, port) is used for registration.

Revision 1.65.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:43 2018 UTC (6 years, 9 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.65.2.2: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.2: +817 -401 lines
Sync with HEAD

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Jun 30 14:59:38 2018 UTC (6 years, 10 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +18 -18 lines
Rearm the Xen timer on resume.

This just moves the timer-arming logic from xen_initclocks into
xen_resumeclocks so that it runs on resume too.

I hypothesize that this is necessary for Xen to resume.  Otherwise,
how could the one-shot timer possibly by rearmed?  On the other hand,
it is conceivable that something automatically rearms it.

This also reorders the initialization so that we establish a timer
interrupt handler first, and _then_ arm the timer.  If the order
matters, it is hard to imagine that the other way is correct:
conceivably, the interrupt could arrive before we've established the
handler, and then there's nothing to rearm it.

Whether this is _sufficient_ for Xen to resume, I don't know.
Symptoms recently reported in
<https://mail-index.netbsd.org/port-xen/2018/06/15/msg009207.html>
look different from how I would expect this to manifest, which is as
a system wedged because there's no no hardclock activity.

ok cherry

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat Jun 30 14:21:19 2018 UTC (6 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +9 -28 lines
Just use struct cpu_info members for the Xen clock state.

Silly to use percpu(9) for some things and struct cpu_info for
others.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Fri Jun 29 21:53:12 2018 UTC (6 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +834 -399 lines
Rewrite Xen timecounter and hardclock timer.

With this change, the Xen timecounter should now be globally
monotonic, as every timecounter is supposed to be.  Should also fix a
litany of races in the timecounter logic.

Proposed last year; see mailing list for further details:
https://mail-index.netbsd.org/port-xen/2017/10/31/msg009112.html

ok cherry

Revision 1.65.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:48 2018 UTC (6 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.65.2.1: preferred, colored; branchpoint 1.65: preferred, colored
Changes since revision 1.65.2.1: +9 -4 lines
Sync with HEAD

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Jun 24 13:35:33 2018 UTC (6 years, 10 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +9 -4 lines
add support for kern.intr.list aka intrctl(8) 'list' for xen

event_set_handler() and pirq_establish() now have extra intrname
parameter; shared intr_create_intrid() is used to provide the value

xen drivers were changed to pass the specific driver instance
name as the xname, e.g.  'vcpu0 clock' instead just 'clock', or
'xencons0' instead of 'xencons'

associated evcnt is now changed to use intrname - this matches native x86

Revision 1.65.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:03 2018 UTC (6 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +6 -6 lines
Sync with HEAD

Revision 1.66: download - view: text, markup, annotated - select for diffs
Fri May 11 13:24:46 2018 UTC (7 years ago) by cherry
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +6 -6 lines
Fixes port-xen/53267
re-educate xen_clock_handler() how to use the interrupt stackframe.
The current regs value passed in is *ci, and thus invalid.

Reported and tested by kre@. See PR 53267 for more details.

Revision 1.62.2.1: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:51 2017 UTC (7 years, 5 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62: +31 -14 lines
update from HEAD

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Nov 6 15:27:09 2017 UTC (7 years, 6 months ago) by cherry
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +13 -8 lines
Switch XEN drivers to use intr_establish_xname()/intr_disestablish()

This completes the API transition.

Revision 1.63.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:00 2016 UTC (8 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.63: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63: +19 -7 lines
Sync with HEAD

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Jun 12 09:08:09 2016 UTC (8 years, 11 months ago) by jnemeth
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +19 -7 lines
- add machdep.xen.version sysctl to easily get hypervisor version
- move machdep.xen_timepush_ticks to machdep.xen.timepush_ticks to
  consolidate all Xen related sysctls under machdep.xen

Revision 1.62.14.1: download - view: text, markup, annotated - select for diffs
Mon Sep 22 11:15:57 2014 UTC (10 years, 7 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62: +3 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #115):
	sys/arch/xen/x86/hypervisor_machdep.c: revision 1.28
	sys/arch/xen/xenbus/xenbus_client.c: revision 1.13
	sys/arch/xen/xen/xbdback_xenbus.c: revision 1.60
	sys/arch/xen/xen/clock.c: revision 1.63
Make Xen kernels compile without DIAGNOSTIC

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Sep 21 12:46:15 2014 UTC (10 years, 7 months ago) by bouyer
Branches: MAIN
CVS tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +3 -3 lines
Make Xen kernels compile without DIAGNOSTIC

Revision 1.56.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:11 2012 UTC (13 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56: +195 -151 lines
sync with head

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 22 18:48:45 2012 UTC (13 years, 2 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +8 -5 lines
Pull up following revision(s) (requested by bouyer in ticket #28):
	sys/arch/xen/include/hypervisor.h: revision 1.38
	sys/arch/xen/xen/hypervisor.c: revision 1.61
	sys/arch/xen/xen/clock.c: revision 1.62
- make xen_version globally available, with macros to access major and
  minor xen version.
- In xen_initclocks(), do a VCPUOP_stop_periodic_timer only for Xen 3.1
  and later
Should fix PR port-xen/45961
- make xen_version globally available, with macros to access major and
  minor xen version.
- In xen_initclocks(), do a VCPUOP_stop_periodic_timer only for Xen 3.1
  and later
Should fix PR port-xen/45961

Revision 1.57.4.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:33:45 2012 UTC (13 years, 2 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57: +17 -19 lines
merge to -current.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Feb 17 19:00:45 2012 UTC (13 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, netbsd-7
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +8 -5 lines
- make xen_version globally available, with macros to access major and
  minor xen version.
- In xen_initclocks(), do a VCPUOP_stop_periodic_timer only for Xen 3.1
  and later
Should fix PR port-xen/45961

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Feb 12 14:38:18 2012 UTC (13 years, 3 months ago) by jym
Branches: MAIN
CVS tags: netbsd-6-base
Branch point for: netbsd-6
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +10 -14 lines
Xen clock management routines keep track of CPU (following MP merge).
Reflect this change in the suspend/resume routines so they can cope with
domU CPU suspend, instead of setting their cpu_info pointer to NULL.

Avoid copy/pasting by using the resume routines during attachement.

ok releng@.

No regression observed, and allows domU to suspend successfully again.
Restore is a different beast as PD/PT flags are marked "invalid" by Xen-4
hypervisor, and blocks resuming. Looking into it.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Jan 9 13:35:42 2012 UTC (13 years, 4 months ago) by cherry
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
Remove redundant use of curcpu().

Revision 1.59: download - view: text, markup, annotated - select for diffs
Mon Jan 9 13:33:38 2012 UTC (13 years, 4 months ago) by cherry
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -3 lines
Remove obsolete comment.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Dec 7 15:47:43 2011 UTC (13 years, 5 months ago) by cegger
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3 lines
switch from xen3-public to xen-public.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Nov 18 06:01:50 2011 UTC (13 years, 6 months ago) by cherry
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +194 -148 lines
[merging from cherry-xenmp]
 - Make clock MP aware.
 - Bring in fixes that bouyer@ brought in via:
   cvs rdiff -u -r1.54.6.4 -r1.54.6.5 src/sys/arch/xen/xen/clock.c

Thanks to riz@ for testing on dom0

Revision 1.54.6.7: download - view: text, markup, annotated - select for diffs
Sat Oct 22 22:42:20 2011 UTC (13 years, 6 months ago) by bouyer
Branches: cherry-xenmp
Diff to: previous 1.54.6.6: preferred, colored; branchpoint 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54.6.6: +31 -38 lines
More improvements:
- Precise what tmutex protects
- springle some KASSERT(mutex_owned(&tmutex))
- the system time uses the CPU timecounter to get some precision;
  don't mix local CPU timecounter with VCPU0's time, it won't work well.
  Always use curcpu()'s time.

Revision 1.54.6.6: download - view: text, markup, annotated - select for diffs
Sat Oct 22 21:16:59 2011 UTC (13 years, 6 months ago) by bouyer
Branches: cherry-xenmp
Diff to: previous 1.54.6.5: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.5: +4 -16 lines
Really use HYPERVISOR_block()

Revision 1.54.6.5: download - view: text, markup, annotated - select for diffs
Sat Oct 22 19:26:16 2011 UTC (13 years, 6 months ago) by bouyer
Branches: cherry-xenmp
Diff to: previous 1.54.6.4: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.4: +42 -15 lines
Various clock fixes:
- xen_get_timecount() is CPU specific, so get the time from this
  virtual CPU and not VCPU0. Also keep xen_clock_bias per-cpu.
- The periodic timer looks buggy, we stop receiving events after a (short)
  while. Linux is using the one-shoot timer so use it too (and disable
  the periodic timer), but rearm it from the event handler, not idle_block()
  as the later may not be called if the CPU is busy, resulting it clock
  event loss.
- use  HYPERVISOR_block() in idle_block() again, now that interrupts are
  working properly.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Tue Sep 20 00:12:24 2011 UTC (13 years, 7 months ago) by jym
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +33 -9 lines
Merge jym-xensuspend branch in -current. ok bouyer@.

Goal: save/restore support in NetBSD domUs, for i386, i386 PAE and amd64.

Executive summary:
- split all Xen drivers (xenbus(4), grant tables, xbd(4), xennet(4))
in two parts: suspend and resume, and hook them to pmf(9).
- modify pmap so that Xen hypervisor does not cry out loud in case
it finds "unexpected" recursive memory mappings
- provide a sysctl(7), machdep.xen.suspend, to command suspend from
userland via powerd(8). Note: a suspend can only be handled correctly
when dom0 requested it, so provide a mechanism that will prevent
kernel to blindly validate user's commands

The code is still in experimental state, use at your own risk: restore
can corrupt backend communications rings; this can completely thrash
dom0 as it will loop at a high interrupt level trying to honor
all domU requests.

XXX PAE suspend does not work in amd64 currently, due to (yet again!)
page validation issues with hypervisor. Will fix.

XXX secondary CPUs are not suspended, I will write the handlers
in sync with cherry's Xen MP work.

Tested under i386 and amd64, bear in mind ring corruption though.

No build break expected, GENERICs and XEN* kernels should be fine.
./build.sh distribution still running. In any case: sorry if it does
break for you, contact me directly for reports.

Revision 1.54.6.4: download - view: text, markup, annotated - select for diffs
Sun Sep 18 18:54:32 2011 UTC (13 years, 7 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.54.6.3: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.3: +5 -18 lines
Register the clock handler at the appropriate ipl (IPL_CLOCK). Cleanup the idle_block()

Revision 1.49.2.7: download - view: text, markup, annotated - select for diffs
Sun Aug 28 22:34:25 2011 UTC (13 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.6: preferred, colored; branchpoint 1.49: preferred, colored; next MAIN 1.50: preferred, colored
Changes since revision 1.49.2.6: +11 -7 lines
Put some assertions to check values of the VIRQ <> event channels mappings.

Fix the VIRQ_TIMER per-cpu translations, so that save/restore does not
choke on event channel being "-1" anymore (ends badly 99,9% of the time
when used as an index...)

Some KNF and white space fixes.

Revision 1.49.2.6: download - view: text, markup, annotated - select for diffs
Sat Aug 27 15:37:32 2011 UTC (13 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.5: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.5: +16 -6 lines
Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.54.6.3: download - view: text, markup, annotated - select for diffs
Tue Aug 23 16:19:12 2011 UTC (13 years, 8 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.54.6.2: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.2: +45 -48 lines
MP-fy clock. per-cpu hardclock(). Use the periodic timer, instead of the one-shot reload.

idle_loop() does not block the domain anymore. Instead, it yields to the hypervisor(). We can thus remove the one-shot "wakeup" timer.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Jul 29 22:16:05 2011 UTC (13 years, 9 months ago) by jym
Branches: MAIN
CVS tags: jym-xensuspend-nbase, jym-xensuspend-base
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +16 -6 lines
Move xen.balloon to machdep in the sysctl(7) tree. It does not really
belong to either kern or hw.

Rename machdep.xen_timepush_ticks to xen.timepush_ticks, so it can live
under the same tree as the balloon node, machdep.xen.

ok bouyer@.

Revision 1.54.6.2: download - view: text, markup, annotated - select for diffs
Mon Jul 25 17:29:43 2011 UTC (13 years, 9 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.54.6.1: preferred, colored; branchpoint 1.54: preferred, colored
Changes since revision 1.54.6.1: +5 -3 lines
Do not register the same callback more than once.

Revision 1.54.6.1: download - view: text, markup, annotated - select for diffs
Fri Jun 3 13:27:42 2011 UTC (13 years, 11 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +133 -70 lines
Initial import of xen MP sources, with kernel and userspace tests.
 - this is a source priview.
 - boots to single user.
 - spurious interrupt and pmap related panics are normal

Revision 1.49.2.5: download - view: text, markup, annotated - select for diffs
Sun Oct 24 22:48:22 2010 UTC (14 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.4: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.4: +5 -5 lines
Sync with HEAD

Revision 1.46.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:00 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.46.2.4: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.4: +3 -3 lines
sync with head.

Revision 1.53.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:14 2010 UTC (14 years, 11 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53: +3 -3 lines
sync with head

Revision 1.53.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:40:00 2010 UTC (15 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53: +3 -3 lines
Sync with HEAD.

Revision 1.47.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:33:45 2010 UTC (15 years ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +11 -3 lines
sync to netbsd-5

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Mar 28 20:46:18 2010 UTC (15 years, 1 month ago) by snj
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: cherry-xenmp
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
Spell "enough" properly.

Revision 1.46.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:10 2010 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.46.2.3: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.3: +4 -9 lines
sync with head

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Dec 12 14:44:10 2009 UTC (15 years, 5 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -4 lines
Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()

Revision 1.49.2.4: download - view: text, markup, annotated - select for diffs
Sun Nov 1 21:43:28 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.3: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.3: +29 -9 lines
- Upgrade suspend/resume code to comply with Xen2 removal.
- Add support for PAE domUs suspend/resume.
- Fix an issue regarding initialization of the xbd ring I/O that could end
badly during resume, with invalid block operations submitted to dom0 backend.

NetBSD supports PAE under x86_32 by considering the L2 page as being
4 pages long instead of 1.

Xen validates the page types during resume. Sadly, the hypervisor handles
alternative recursive mappings (== PG/PD entries pointing to pages other
than self) inadequately, which could lead to incorrect page pinning.

As a result, the important change with this patch is to clear these alternative
mappings during suspend, and reset them back to their former self upon
resume. For PAE, approx. all 4 PDIR_SLOT_PTEs could be considered as
alternative recursive mappings.

See comments in pmap.c for further details.

Now, let the testing and bug hunting begin.

Revision 1.49.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 1 13:58:46 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.2: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.2: +3 -84 lines
Sync with HEAD.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Oct 23 02:32:34 2009 UTC (15 years, 6 months ago) by snj
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -7 lines
Remove 3rd and 4th clauses.  OK cl@ (copyright holder).

Revision 1.46.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:46:55 2009 UTC (15 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.2: +3 -65 lines
sync with head.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Jul 29 12:02:09 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -65 lines
remove Xen2 support.
ok bouyer@

Revision 1.49.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:37 2009 UTC (15 years, 9 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49.2.1: preferred, colored; branchpoint 1.49: preferred, colored
Changes since revision 1.49.2.1: +12 -4 lines
Sync with HEAD.

Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:13 2009 UTC (15 years, 10 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +12 -4 lines
sync with head

Revision 1.47.4.1: download - view: text, markup, annotated - select for diffs
Fri Jun 19 21:22:11 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +11 -3 lines
Pull up following revision(s) (requested by bouyer in ticket #816):
	sys/arch/amd64/conf/files.amd64: revision 1.68
	sys/arch/i386/conf/files.i386: revision 1.350
	sys/arch/x86/include/rtc.h: revision 1.1
	sys/arch/x86/isa/clock.c: revision 1.33
	sys/arch/x86/isa/rtc.c: revision 1.1
	sys/arch/xen/conf/files.xen: revision 1.100
	sys/arch/xen/xen/clock.c: revision 1.50 via patch
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.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue Jun 16 21:05:35 2009 UTC (15 years, 11 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +12 -4 lines
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.

Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:14 2009 UTC (16 years ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +24 -12 lines
sync with head.

Revision 1.49.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 9 00:03:55 2009 UTC (16 years, 3 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +16 -2 lines
Initial code for xen save/restore/migrate facilities.

- split the attach code of frontends in two half: one that is only needed
during autoconf(9) attach/detach phases, and one used at each save/restore
of device state (between suspend and resume).

Applies to hypervisor, xencons, xenbus, xbd, and xennet.

- add a rwlock(9) ("ptom_lock") to protect the different parts in the kernel
 that manipulate MFNs (which could change between a suspend and a resume,
without the kernel noticing it). Parts that require MFNs acquire a reader lock,
while suspend code will acquire a writer lock to ensure that no-other parts
in kernel still use MFNs.

- integrate the suspend code with sysmon.

- various things in pmap(9), and clock.

TODO:
- factorize code a bit more inside frontends drivers.
- remove all alternative recursive (APDP_PDE) mappings found in PD/PT during
suspend, as Xen does not support them.
- abstract the ptom_lock locking, it is only required when kernel preemption
is enabled, or on MP systems.

Current code works mostly. You may experience difficulties in some corner
cases (dom0 warnings about xennet interface errors, and Xen tools failing to
 validate NetBSD's alternative pmaps).

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:17:12 2009 UTC (16 years, 3 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +22 -10 lines
Sync with HEAD.

Revision 1.44.6.2: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:39 2009 UTC (16 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.44.6.1: preferred, colored; branchpoint 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44.6.1: +22 -10 lines
Sync with HEAD.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Jan 16 20:16:47 2009 UTC (16 years, 4 months ago) by jym
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base
Branch point for: jym-xensuspend
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +10 -10 lines
Replace x86 memory fences in Xen drivers by their Xen equivalents, to reduce
MD dependency:

x86_lfence() => xen_rmb()
x86_sfence() => xen_wmb()
x86_mfence() => xen_mb()

Discussed in
http://mail-index.netbsd.org/port-xen/2009/01/15/msg004655.html

Ok by bouyer@.

Revision 1.46.8.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:13:43 2008 UTC (16 years, 5 months ago) by haad
Branches: haad-dm
Diff to: previous 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46: +16 -4 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Thu Nov 13 18:44:51 2008 UTC (16 years, 6 months ago) by cegger
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +14 -2 lines
Finish preparation to new interface.
New interface not yet used by default. It needs some testing first.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Oct 21 15:46:32 2008 UTC (16 years, 6 months ago) by cegger
Branches: MAIN
CVS tags: netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -4 lines
introduce two macros: xendomain_is_dom0() and xendomain_is_privileged(). Use them.

Revision 1.44.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:22:54 2008 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +8 -10 lines
Sync with HEAD.

Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:33:08 2008 UTC (17 years ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45: +4 -6 lines
sync with head.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Apr 21 15:15:34 2008 UTC (17 years ago) by cegger
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: yamt-nfs-mp, haad-dm
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -6 lines
Access Xen's vcpu info structure per-CPU.
Tested on i386 and amd64 (both dom0 and domU) by me.
Xen2 tested (both dom0 and domU) by bouyer.
OK bouyer

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Apr 14 13:38:03 2008 UTC (17 years, 1 month ago) by cegger
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +6 -6 lines
- use POSIX integer types
- ansify functions

Revision 1.39.10.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:30 2008 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
Diff to: previous 1.39.10.2: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.10.2: +19 -70 lines
sync with HEAD

Revision 1.41.2.2: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:05:21 2008 UTC (17 years, 2 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.41.2.1: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.1: +19 -70 lines
Sync with HEAD.

Revision 1.13.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:40:33 2008 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13.2.5: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.2.5: +19 -70 lines
sync with head

Revision 1.42.6.2: download - view: text, markup, annotated - select for diffs
Sat Jan 19 12:14:51 2008 UTC (17 years, 3 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.42.6.1: preferred, colored; branchpoint 1.42: preferred, colored; next MAIN 1.43: preferred, colored
Changes since revision 1.42.6.1: +0 -2 lines
Sync with HEAD

Revision 1.44: download - view: text, markup, annotated - select for diffs
Thu Jan 17 01:56:02 2008 UTC (17 years, 4 months ago) by lukem
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: mjf-devfs2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -4 lines
Remove unnecessary references to config_time.h.

Revision 1.42.6.1: download - view: text, markup, annotated - select for diffs
Thu Jan 10 23:44:10 2008 UTC (17 years, 4 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +17 -66 lines
Sync with HEAD

Revision 1.39.10.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:50:17 2008 UTC (17 years, 4 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.39.10.1: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.10.1: +5 -5 lines
sync with HEAD

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Jan 8 20:37:35 2008 UTC (17 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +19 -68 lines
Switch Xen to generic TODR. Tested by Manuel Bouyer.

Revision 1.41.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:18:25 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -5 lines
Sync with HEAD.

Revision 1.13.2.5: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:27:19 2007 UTC (17 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13.2.4: preferred, colored
Changes since revision 1.13.2.4: +5 -5 lines
sync with head

Revision 1.34.8.3: download - view: text, markup, annotated - select for diffs
Mon Dec 3 18:40:40 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.34.8.2: preferred, colored; branchpoint 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.8.2: +6 -6 lines
Sync with HEAD.

Revision 1.39.8.2: download - view: text, markup, annotated - select for diffs
Tue Nov 27 19:36:24 2007 UTC (17 years, 5 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.39.8.1: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.8.1: +5 -5 lines
Sync with HEAD. amd64 Xen support needs testing.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Nov 22 16:17:06 2007 UTC (17 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +5 -5 lines
Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.

Revision 1.39.14.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:00:30 2007 UTC (17 years, 6 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.39.14.1: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.14.1: +3 -3 lines
Sync with HEAD

Revision 1.39.10.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:24:30 2007 UTC (17 years, 6 months ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
sync with HEAD

Revision 1.39.8.1: download - view: text, markup, annotated - select for diffs
Sun Oct 28 20:11:02 2007 UTC (17 years, 6 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
Sync with HEAD.

Revision 1.13.2.4: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:29:26 2007 UTC (17 years, 6 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13.2.3: preferred, colored
Changes since revision 1.13.2.3: +3 -3 lines
sync with head.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Oct 26 13:24:44 2007 UTC (17 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
Match delay/DELAY on x86 with delay(9). It takes an unsigned int as
argument. Use this and replace the inline assembly (mul + div using the
64bit intermediate result) with normal 32bit multiplication and
division. The compiler can turn the division into a multiplication and
shift, making it even cheaper then the original assembly. For extreme
long delays, just use 64bit arithmetic.

Revision 1.39.14.1: download - view: text, markup, annotated - select for diffs
Wed Oct 17 21:08:22 2007 UTC (17 years, 7 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +5 -5 lines
Prepare for xenamd64:
- kill xen/i386/identcpu.c, use i386/i386/identcpu.c instead (with a few
  #ifndef XEN)
- move some files that can be shared between i386 and amd64 from
  xen/i386 to xen/x86 (or to xen/xen for non-cpu-specific code)
- split assembly out of xen/include/hypervisor.h to xen/include/hypercalls.h
- use <xen/...> instead of <machine/...> for cpu-independant include files.

more work needed here, i386-specific files should got out of arch/xen to
arch/xeni386, and more code shared with arch/i386.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Oct 17 19:58:32 2007 UTC (17 years, 7 months ago) by garbled
Branches: MAIN
CVS tags: yamt-x86pmap-base4
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.34.16.3: download - view: text, markup, annotated - select for diffs
Wed Oct 3 19:26:12 2007 UTC (17 years, 7 months ago) by garbled
Branches: ppcoea-renovation
Diff to: previous 1.34.16.2: preferred, colored; branchpoint 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.16.2: +34 -14 lines
Sync with HEAD

Revision 1.13.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:31:36 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13.2.2: preferred, colored
Changes since revision 1.13.2.2: +189 -195 lines
sync with head.

Revision 1.34.18.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 07:04:14 2007 UTC (17 years, 8 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +181 -190 lines
Sync w/ NetBSD-4-RC_1

Revision 1.34.2.2: download - view: text, markup, annotated - select for diffs
Mon Jul 16 10:07:26 2007 UTC (17 years, 10 months ago) by liamjfoy
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.34.2.1: preferred, colored; branchpoint 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.2.1: +29 -12 lines
Pull up following revision(s) (requested by jld in ticket #764):
	sys/arch/xen/xen/clock.c: revision 1.37
Correct regression in xen3 wall-time reading accidentally committed in r1.35.
(Discussed on port-xen.)

Revision 1.34.8.2: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:17:21 2007 UTC (17 years, 10 months ago) by ad
Branches: vmlocking
Diff to: previous 1.34.8.1: preferred, colored; branchpoint 1.34: preferred, colored
Changes since revision 1.34.8.1: +37 -17 lines
Sync with head.

Revision 1.34.10.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:03:35 2007 UTC (17 years, 10 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +189 -195 lines
Sync with head.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Jul 10 16:27:58 2007 UTC (17 years, 10 months ago) by he
Branches: MAIN
CVS tags: yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, ppcoea-renovation-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm, bouyer-xenamd64
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -2 lines
Protect the initialization of xen_timepush_co with #ifdef DOM0OPS,
like its declaration and other uses.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Jul 9 20:52:39 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -4 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Jul 2 06:26:35 2007 UTC (17 years, 10 months ago) by jld
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +29 -12 lines
Correct regression in xen3 wall-time reading accidentally committed in r1.35.
(Discussed on port-xen.)

Revision 1.34.16.2: download - view: text, markup, annotated - select for diffs
Tue Jun 26 18:13:56 2007 UTC (17 years, 10 months ago) by garbled
Branches: ppcoea-renovation
Diff to: previous 1.34.16.1: preferred, colored; branchpoint 1.34: preferred, colored
Changes since revision 1.34.16.1: +5 -5 lines
Sync with HEAD.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Jun 25 19:57:32 2007 UTC (17 years, 10 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -5 lines
Fix race condition in cpu_idle() on ci_want_resched. From YAMAMOTO Takashi.

Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 10 20:48:42 2007 UTC (17 years, 11 months ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +160 -186 lines
Pull up following revision(s) (requested by jld in ticket #711):
	sys/arch/xen/xen/clock.c: revision 1.35 via patch
	sys/arch/xen/include/types.h: revision 1.5 via patch
	sys/arch/xen/i386/machdep.c: revision 1.38 via patch
	sys/arch/xen/conf/files.xen: revision 1.60 via patch
	sys/arch/xen/include/cpu.h: revision 1.19 via patch
Convert the xen port to use timecounters; ok'ed by bouyer@.

Revision 1.34.8.1: download - view: text, markup, annotated - select for diffs
Sun May 27 14:27:09 2007 UTC (17 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +160 -186 lines
Sync with head.

Revision 1.34.16.1: download - view: text, markup, annotated - select for diffs
Tue May 22 17:27:53 2007 UTC (17 years, 11 months ago) by matt
Branches: ppcoea-renovation
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +160 -186 lines
Update to HEAD.

Revision 1.34.4.1: download - view: text, markup, annotated - select for diffs
Thu May 17 13:41:09 2007 UTC (18 years ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +160 -186 lines
sync with head.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat May 12 07:06:55 2007 UTC (18 years ago) by jld
Branches: MAIN
CVS tags: yamt-idlelwp-base8
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +160 -186 lines
Convert the xen port to use timecounters; ok'ed by bouyer@.

Revision 1.13.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:47:25 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13.2.1: preferred, colored
Changes since revision 1.13.2.1: +130 -20 lines
sync with head.

Revision 1.30.2.1: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:16:43 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30: +74 -18 lines
sync with head.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:29:39 2006 UTC (18 years, 6 months ago) by ad
Branches: newlock2
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +119 -15 lines
Sync with head.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Nov 11 23:33:12 2006 UTC (18 years, 6 months ago) by jld
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, wrstuden-fixsa, vmlocking, ppcoea-renovation, netbsd-4, mjf-ufs-trans
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +24 -2 lines
Under Xen2, timestamp updates should happen every 10ms, and a timer
event should be raised every 10ms if we're runnable.  Unfortunately,
there seems to be an intermittent bug in the hypervisor such that,
for about 1<<32 ns (~4.3s) after it manifests, every running domain
continues to run but not get its timer events and new timestamps (nor
is it preempted in favor of other domains on that CPU).  This can cause
strange behavior from our timekeeping; for example, hardclock() is never
called during this interval.

So here's a workaround: if timestamp is allegedly up to date but is more
than 40ms old (this is semi-arbitrary), the domain sets its timer to a
time in the past, which causes it to become immediately pending, and also
results in the publication of a new timestamp.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Nov 5 10:11:55 2006 UTC (18 years, 6 months ago) by jld
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +20 -11 lines
If the timestamp is/becomes stale when computing the current system_time,
obviously shadow_system_time will need to be reread as well.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Fri Nov 3 12:09:46 2006 UTC (18 years, 6 months ago) by jld
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +39 -14 lines
Ensure that the timestamp we use in get_tsc_offset_ns remains valid
until after we do the rdtsc; since Xen3 dynamically adjusts its idea of
the clock frequency, this is important.  (Linux and FreeBSD both do this.)

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Nov 3 09:16:13 2006 UTC (18 years, 6 months ago) by jld
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +8 -8 lines
"static volatile", not "volatile static".

Revision 1.9.2.10: download - view: text, markup, annotated - select for diffs
Sat Sep 16 16:25:26 2006 UTC (18 years, 8 months ago) by ghen
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-1-RELEASE, netbsd-3-1
Diff to: previous 1.9.2.9: preferred, colored; branchpoint 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.2.9: +12 -2 lines
Pull up following revision(s) (requested by jld in ticket #1515):
	sys/arch/xen/xen/clock.c: revision 1.27
inittodr: if xen3, add processed_system_time (system_time) to
shadow_tv (wc_sec/nsec) as linux guest does.

Revision 1.17.4.10: download - view: text, markup, annotated - select for diffs
Thu Sep 14 12:31:22 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.9: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.9: +51 -3 lines
sync with head.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Sep 11 06:57:30 2006 UTC (18 years, 8 months ago) by jld
Branches: MAIN
CVS tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +39 -2 lines
Convert TSC offset to nanoseconds correctly under Xen3.  The hypervisor
appears to dynamically adjust its estimate of the CPU clock speed, and
scaling the TSC as intended is necessary to avoid time anomalies.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Sep 10 22:25:58 2006 UTC (18 years, 8 months ago) by jld
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +14 -3 lines
Re-arm the Xen interval timer in the timer event handler.  This fixes
the case of HZ!=100, and might be beneficial otherwise.

The set_timer_op in idle_block remains, to protect against a system_time
miscalculation's causing us to block without the timer set; so, while
there, spl-protect the processed_system_time read and set_timer_op.

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Sun Sep 10 04:46:48 2006 UTC (18 years, 8 months ago) by riz
Branches: abandoned-netbsd-4
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +0 -4 lines
Pull up following revision(s) (requested by jld in ticket #143):
	sys/arch/xen/xen/clock.c: revision 1.28
don't define XEN_CLOCK_DEBUG automatically for DEBUG.
it isn't safe to do printf in microtime().

Revision 1.16.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:45:05 2006 UTC (18 years, 8 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16: +211 -43 lines
sync with head

Revision 1.9.2.4.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 8 11:12:34 2006 UTC (18 years, 8 months ago) by ghen
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE
Diff to: previous 1.9.2.4: preferred, colored; next MAIN 1.9.2.5: preferred, colored
Changes since revision 1.9.2.4: +3 -3 lines
Pull up following revision(s) (requested by jld in ticket #1506):
	sys/arch/xen/xen/clock.c: revision 1.26 via patch
Fix accidentally unsigned comparison, which was causing the timer event
handler to run ~forever in the face of slightly unexpected input from
Xen (system_time apparently going backwards).  Pointed out by kardel@.

Revision 1.9.2.9: download - view: text, markup, annotated - select for diffs
Fri Sep 8 10:59:33 2006 UTC (18 years, 8 months ago) by ghen
Branches: netbsd-3
Diff to: previous 1.9.2.8: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.8: +3 -3 lines
Pull up following revision(s) (requested by jld in ticket #1506):
	sys/arch/xen/xen/clock.c: revision 1.26
Fix accidentally unsigned comparison, which was causing the timer event
handler to run ~forever in the face of slightly unexpected input from
Xen (system_time apparently going backwards).  Pointed out by kardel@.

Revision 1.9.2.8: download - view: text, markup, annotated - select for diffs
Fri Sep 8 10:54:40 2006 UTC (18 years, 8 months ago) by ghen
Branches: netbsd-3
Diff to: previous 1.9.2.7: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.7: +0 -4 lines
Pull up following revision(s) (requested by jld in ticket #1505):
	sys/arch/xen/xen/clock.c: revision 1.28
don't define XEN_CLOCK_DEBUG automatically for DEBUG.
it isn't safe to do printf in microtime().

Revision 1.17.4.9: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:23:37 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.8: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.8: +2 -6 lines
sync with head.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Aug 16 13:23:33 2006 UTC (18 years, 9 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +0 -4 lines
don't define XEN_CLOCK_DEBUG automatically for DEBUG.
it isn't safe to do printf in microtime().

Revision 1.17.4.8: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:43:16 2006 UTC (18 years, 9 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.7: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.7: +13 -3 lines
sync with head

Revision 1.25.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:06 2006 UTC (18 years, 10 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25: +13 -3 lines
Merge from HEAD.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jul 11 12:26:58 2006 UTC (18 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +12 -2 lines
inittodr: if xen3, add processed_system_time (system_time) to
shadow_tv (wc_sec/nsec) as linux guest does.

Revision 1.17.4.7: download - view: text, markup, annotated - select for diffs
Tue Jul 11 12:26:32 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.6: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.6: +0 -10 lines
revert the previous because it was on a wrong branch.

Revision 1.17.4.6: download - view: text, markup, annotated - select for diffs
Tue Jul 11 12:25:25 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.5: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.5: +12 -2 lines
inittodr: if xen3, add processed_system_time (system_time) to
shadow_tv (wc_sec/nsec) as linux guest does.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jul 4 07:35:28 2006 UTC (18 years, 10 months ago) by jld
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -3 lines
Fix accidentally unsigned comparison, which was causing the timer event
handler to run ~forever in the face of slightly unexpected input from
Xen (system_time apparently going backwards).  Pointed out by kardel@.

Revision 1.17.4.5: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:45:40 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.4: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.4: +2 -3 lines
sync with head.

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 14:58:23 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +228 -38 lines
sync with head.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 03:45:36 2006 UTC (18 years, 11 months ago) by chap
Branches: chap-midi
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +2 -3 lines
Sync with head.

Revision 1.9.2.7: download - view: text, markup, annotated - select for diffs
Thu Jun 15 13:33:25 2006 UTC (18 years, 11 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RC2, netbsd-3-1-RC1
Diff to: previous 1.9.2.6: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.6: +8 -8 lines
Pull up following revision(s) (requested by bouyer in ticket #1374):
	sys/arch/xen/xen/clock.c: revision 1.19
	sys/arch/xen/xen/if_xennet.c: revision 1.45
	sys/arch/xen/xen/ctrl_if.c: revision 1.13
Add some missing memory barriers I noticed.
Discussed on port-xen.

Revision 1.9.2.6: download - view: text, markup, annotated - select for diffs
Thu Jun 15 13:27:51 2006 UTC (18 years, 11 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.9.2.5: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.5: +198 -35 lines
Apply patch (requested by bouyer in ticket #1372):
- Implement a xen-specific cc_microtime, which properly handles the
  Xen clock implementation. The MI cc_microtime could cause the clock
  to jump forward by up to 35mn.
- Have dom0 periodically set the Xen's time of day clock. This makes
  sure domUs start with the right time.

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:35:37 2006 UTC (18 years, 11 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.1: +100 -14 lines
Sync with head.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun May 28 13:36:28 2006 UTC (18 years, 11 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -11 lines
Revert previous. HYPERVISOR_set_timer_op() works fine for domU, and using
HYPERVISOR_yield() cause a domain to busy-wait for some work to do (so
using HYPERVISOR_yield doen't fix the problem for dom0, and makes things much
worse for domU).

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat May 27 19:57:15 2006 UTC (18 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +11 -3 lines
HYPERVISOR_set_timer_op() doesn't seem to work right on a NetBSD Xen3 dom0,
the dom0 is getting a continous stream of clock interrupts. As we want an
interrupt every hz anyway, just use HYPERVISOR_yield() instead.

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Wed May 24 15:48:25 2006 UTC (18 years, 11 months ago) by tron
Branches: peter-altq
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.1: +121 -19 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.17.4.4: download - view: text, markup, annotated - select for diffs
Wed May 24 10:57:23 2006 UTC (18 years, 11 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.3: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.3: +101 -14 lines
sync with head.

Revision 1.17.6.2: download - view: text, markup, annotated - select for diffs
Thu May 11 23:27:14 2006 UTC (19 years ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.17.6.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.6.1: +101 -14 lines
sync with head

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri May 5 19:38:38 2006 UTC (19 years ago) by jld
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, elad-kernelauth-base
Branch point for: chap-midi
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +99 -12 lines
Have our dom0 periodically set Xen's time-of-day clock (much as Linux does).

That time is used by ~all domUs when they boot (or resume), and Linux by
default will pin the local clock to it; so, it's useful to correct its
drift as best we can.  A sysctl (machdep.xen_timepush_ticks) has been
added to allow changing the interval or disabling this feature.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Apr 28 02:30:42 2006 UTC (19 years ago) by jld
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
What corresponds to the last run of hardclock(9), and thus the current
value of time(9), is processed_system_time and not shadow_system_time.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:38:11 2006 UTC (19 years ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +107 -31 lines
Sync with head.

Revision 1.17.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 19 02:34:03 2006 UTC (19 years, 1 month ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +107 -31 lines
sync with head - hopefully this will work

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Apr 18 21:19:01 2006 UTC (19 years, 1 month ago) by jld
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
Raise time limit on sanity-check warning printf to 10s (from 10 ticks),
to avoid false postives on Xen 3, which doesn't update the shared time
info as often.

Revision 1.17.4.3: download - view: text, markup, annotated - select for diffs
Tue Apr 11 11:53:48 2006 UTC (19 years, 1 month ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.2: +22 -7 lines
sync with head

Revision 1.9.2.5: download - view: text, markup, annotated - select for diffs
Fri Apr 7 12:51:26 2006 UTC (19 years, 1 month ago) by tron
Branches: netbsd-3
Diff to: previous 1.9.2.4: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.4: +30 -2 lines
Apply patch (requested by bouyer in ticket #1245):
Pull up Xen3 domU support. This adds support for the Xen-3 memory bootstrap,
xenstore, and block and network device frontend. Xen-3 support is turned
on by 'options XEN3', which disable Xen-2 support.
Changes affecting non-xen3 specific code:
- xbd and xennet at hypervisor now attaches with xbd_hypervisor and
  xennet_hypervisor
- x86_atomic_* renamed to xen_atomic_*
- use genassim.cf to pull in more constant from include files for assembly
- Map the shared info page from locore.S instead of the 0xffffffff hack
  in xen_machdep.c
- remove some unused code
- some __asm__ __volatile__ -> __asm volatile and __inline__ -> inline
- more debug code

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Apr 4 21:08:47 2006 UTC (19 years, 1 month ago) by jld
Branches: MAIN
CVS tags: yamt-pdpolicy-base4
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +22 -7 lines
Change diagnostic assertions to DEBUG-conditionalized printfs.
(Alternately, XEN_CLOCK_DEBUG may be defined to enable just the
checks in this module.)

Revision 1.17.4.2: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:06:36 2006 UTC (19 years, 1 month ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.1: +8 -8 lines
sync with head.

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 28 09:46:22 2006 UTC (19 years, 1 month ago) by tron
Branches: peter-altq
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -8 lines
Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Mar 17 06:04:24 2006 UTC (19 years, 2 months ago) by jld
Branches: MAIN
CVS tags: yamt-pdpolicy-base3
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +8 -8 lines
Add some missing memory barriers I noticed.
Discussed on port-xen.

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Mon Mar 13 09:07:07 2006 UTC (19 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +85 -24 lines
sync with head.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Mar 7 23:08:14 2006 UTC (19 years, 2 months ago) by jld
Branches: MAIN
CVS tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +85 -24 lines
Improve timekeeping under Xen.  Specifically, replace use of
cc_microtime with a MD function that isn't affected by erratic "clock
interrupts" and instead takes more advantage of time information
provided by the hypervisor.  Fixes, most importantly, a case where the
clock as seen by userland would sometimes bounce back and forth by up to
1<<31 us (~35 min).

Approved by bouyer@; explained in more detail in
http://mail-index.netbsd.org/port-xen/2006/02/28/0002.html

Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 18 15:38:59 2006 UTC (19 years, 2 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.15.2.1: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.1: +5 -5 lines
sync with head.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Feb 3 04:59:03 2006 UTC (19 years, 3 months ago) by jld
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, elad-kernelauth
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -5 lines
Use 64-bit intermediate in get_tsc_offset_ns to avoid overflow.
Discussed (3 weeks ago) on port-xen; okayed by yamt@, bouyer@.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 1 14:51:48 2006 UTC (19 years, 3 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +30 -2 lines
sync with head.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jan 15 22:09:52 2006 UTC (19 years, 4 months ago) by bouyer
Branches: MAIN
Branch point for: rpaulo-netinet-merge-pcb
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +30 -2 lines
Snapshot of work in progress on NetBSD port to Xen3:
- kernel (both dom0 and domU) boot, console is functionnal and it can starts
  software from a ramdisk
- there is no driver front-end expect console for domU yet.
- dom0 can probe devices and ex(4) work when Xen3 is booted without acpi
  and apic support. But the on-board IDE doens't get interrupts.
  The PCI code still needs work (it's hardcoded to mode 1). Some of this
  code should be shared with ../x86
  The physical insterrupt code needs to get MPBIOS and ACPI support, and
  do interrupt routing to properly interract with Xen.
To enable Xen-3.0 support, add
options XEN3
to your kernel config file (this will disable Xen2 support)
Changes affecting Xen-2.0 support (no functionnal changes intended):
- get more constants from genassym for assembly code
- remove some unneeded registers move from start()
- map the shared info page from start(), and remove the pte = 0xffffffff hack
- vector.S: in hypervisor_callback() make sure %esi points to
  HYPERVISOR_shared_info before accessing the info page. Remplace some
  hand-written assembly with the equivalent macro defined in frameasm.h
- more debug code, dissabled by default.

while here added my copyright on some files I worked on in 2005.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:19:50 2005 UTC (19 years, 5 months ago) by christos
Branches: MAIN
Branch point for: yamt-uio_vmspace
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
merge ktrace-lwp.

Revision 1.6.2.7: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:00:34 2005 UTC (19 years, 6 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.6: +31 -32 lines
Sync with HEAD. Here we go again...

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Aug 11 20:32:56 2005 UTC (19 years, 9 months ago) by cube
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
Change all archs that did:

#define clockframe somethingelse

to:

struct clockframe {
	struct somethingelse cf_se;
};

and change access macros accordingly.

That means that, at least for that very issue, things will not go
ka-boomy if you don't have the actual definition of struct clockframe
before including systm.h.

Revision 1.9.2.4: download - view: text, markup, annotated - select for diffs
Wed Jun 29 12:23:27 2005 UTC (19 years, 10 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-0
Diff to: previous 1.9.2.3: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.3: +4 -2 lines
Pull up revision 1.13 (requested by bouyer in ticket #510):
Use the time provided by the hypervisor instead of our global time variable
for xen_microtime(). This match more closely what is done on a real i386
(where we read the RTC), and seems to fix gettimeofday() sometime going
backward by several seconds for me.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Jun 25 18:44:59 2005 UTC (19 years, 10 months ago) by bouyer
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -4 lines
Use the time provided by the hypervisor instead of our global time variable
for xen_microtime(). This match more closely what is done on a real i386
(where we read the RTC), and seems to fix gettimeofday() sometime going
backward by several seconds for me.

Revision 1.9.2.3: download - view: text, markup, annotated - select for diffs
Sat May 28 16:23:36 2005 UTC (19 years, 11 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.9.2.2: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.2: +19 -22 lines
Pull up revision 1.12 (requested by bouyer in ticket #354):
Reset the microtime state in inittodr(), so that the next clock tick will
initialise the microtime state again. it was initialised at the first
clock tick before time of day was set. Should fix port-xen/29846.
Also, try harder to call microset() once a second; the clock interrupt handler
can be called more often than HZ in some case.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri May 27 22:02:25 2005 UTC (19 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +21 -24 lines
Reset the microtime state in inittodr(), so that the next clock tick will
initialise the microtime state again. it was initialised at the first
clock tick before time of day was set. Should fix port-xen/29846.
Also, try harder to call microset() once a second; the clock interrupt handler
can be called more often than HZ in some case.

Revision 1.7.6.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:28:30 2005 UTC (20 years ago) by kent
Branches: kent-audio2
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +62 -21 lines
sync with -current

Revision 1.9.2.2: download - view: text, markup, annotated - select for diffs
Thu Apr 28 10:28:05 2005 UTC (20 years ago) by tron
Branches: netbsd-3
Diff to: previous 1.9.2.1: preferred, colored; branchpoint 1.9: preferred, colored
Changes since revision 1.9.2.1: +1 -1 lines
Pull up revision 1.11 (requested by bouyer in ticket #192):
Allow to pass a more descriptive name to event_set_handler() (e.g. IRQ number
for physical IRQ, or device name for xen device drivers). This makes
systat and vmstat output more usable, especially as the channel numbers
change each time a guest reboots.

Revision 1.9.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 28 10:18:48 2005 UTC (20 years ago) by tron
Branches: netbsd-3
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -6 lines
Pull up revision 1.10 (requested by bouyer in ticket #192):
Get rid of the event to pseudo-irq mapping. We are limited to 32 pseudo-irq,
including soft interrupt, and this is way too low in some use (lots of domains,
or domains with lots of xennet, or even hardware with lots of devices at
different interrupts).
Based on idea from YAMAMOTO Takashi, keep one list of handler per-event and
one per-IPL (so the same handler is now in 2 lists). In the common case were
an event is received at low IPL, we can call the handlers quickly (there
is usually only one handler per event, unless the event is mapped to a
physical interrupt and this interrupt is shared by different devices).
Deffered events and software interrupts are handled by a bitmask (as before)
with one bit per IPL. When one IPL has an event pending all handlers for
this IPL will be called.
With this change, it is now possible to have all the 1024 events active.
While here, handle debug event in a special way: the handler is always called,
regardless of the current IPL. Make the handler print usefull informations
about events and IPL states.
Also remove code not used on Xen in files inherited from the x86 port.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Apr 17 14:50:11 2005 UTC (20 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3 lines
Allow to pass a more descriptive name to event_set_handler() (e.g. IRQ number
for physical IRQ, or device name for xen device drivers). This makes
systat and vmstat output more usable, especially as the channel numbers
change each time a guest reboots.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Apr 16 22:49:38 2005 UTC (20 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +6 -6 lines
Get rid of the event to pseudo-irq mapping. We are limited to 32 pseudo-irq,
including soft interrupt, and this is way too low in some use (lots of domains,
or domains with lots of xennet, or even hardware with lots of devices at
different interrupts).
Based on idea from YAMAMOTO Takashi, keep one list of handler per-event and
one per-IPL (so the same handler is now in 2 lists). In the common case were
an event is received at low IPL, we can call the handlers quickly (there
is usually only one handler per event, unless the event is mapped to a
physical interrupt and this interrupt is shared by different devices).
Deffered events and software interrupts are handled by a bitmask (as before)
with one bit per IPL. When one IPL has an event pending all handlers for
this IPL will be called.
With this change, it is now possible to have all the 1024 events active.

While here, handle debug event in a special way: the handler is always called,
regardless of the current IPL. Make the handler print usefull informations
about events and IPL states.
Also remove code not used on Xen in files inherited from the x86 port.

Revision 1.6.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:29:11 2005 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.5: preferred, colored
Changes since revision 1.6.2.5: +61 -20 lines
Sync with HEAD.

Revision 1.7.8.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:33:26 2005 UTC (20 years, 2 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7: +61 -20 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Mar 10 21:44:31 2005 UTC (20 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -2 lines
Report which IRQ is used.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Mar 9 22:39:21 2005 UTC (20 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +59 -20 lines
Merge the bouyer-xen2 branch. This add supports for the Xen 2.0 virtual
machine kernel (both privileged and non-privileged domains), and remove support
for the old xen 1.2.

Revision 1.7.4.2: download - view: text, markup, annotated - select for diffs
Tue Jan 18 14:13:10 2005 UTC (20 years, 4 months ago) by bouyer
Branches: bouyer-xen2
Diff to: previous 1.7.4.1: preferred, colored; branchpoint 1.7: preferred, colored; next MAIN 1.8: preferred, colored
Changes since revision 1.7.4.1: +36 -11 lines
- use the right test for dom0
- shadow_system_time is updated every xen's clock tick, which makes it
  unsuitable for low delay(). For delays less than 0.5s, use cpu_counter()
  instead to get accurate delays.

Revision 1.7.4.1: download - view: text, markup, annotated - select for diffs
Mon Dec 13 17:52:21 2004 UTC (20 years, 5 months ago) by bouyer
Branches: bouyer-xen2
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +26 -12 lines
Commit files from netbsd-2.0-xen-sparse/sys/arch/xen in the Xen-2.0
distribution. These are the files modified from the 2.0 tree to get
NetBSD/xen working with Xen 2.

Revision 1.6.2.5: download - view: text, markup, annotated - select for diffs
Fri Sep 24 10:53:18 2004 UTC (20 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.4: preferred, colored
Changes since revision 1.6.2.4: +32 -6 lines
Sync with HEAD.

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 23 02:41:07 2004 UTC (20 years, 7 months ago) by jmc
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.2: +32 -6 lines
Pullup rev 1.7 (requested by tls in ticket #871)

Changes to improve timekeeping on NetBSD/xen by actually adjusting the time
correctly (calling hardclock as needed, not just blindly every time Xen
schedules us) based on Xens idea of the time in the shared page.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Sep 23 02:24:22 2004 UTC (20 years, 7 months ago) by tls
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1, bouyer-xen2-base
Branch point for: yamt-km, kent-audio2, bouyer-xen2
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +32 -6 lines
Changes from Christian Limpach to improve timekeeping on NetBSD/xen by
actually adjusting the time correctly (calling hardclock as needed, not
just blindly every time Xen schedules us) based on Xen's idea of the
time in the shared page.

Xen source repo change info:
 ChangeSet
   2004/09/22 13:47:22+01:00 cl349@freefall.cl.cam.ac.uk
   Fix time.

 netbsd-2.0-xen-sparse/sys/arch/xen/xen/clock.c
   2004/09/22 13:47:21+01:00 cl349@freefall.cl.cam.ac.uk +28 -3
   Don't call hardclock on spurious timer interrupt and call hardclock
   for missed interrupts.

 netbsd-2.0-xen-sparse/sys/arch/xen/conf/XEN
   2004/09/22 13:47:21+01:00 cl349@freefall.cl.cam.ac.uk +0 -1
   Don't need custom HZ value any longer.

: ----------------------------------------------------------------------

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:24:45 2004 UTC (20 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.3: preferred, colored
Changes since revision 1.6.2.3: +2 -2 lines
Fix the sync with head I botched.

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:42:53 2004 UTC (20 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.2: preferred, colored
Changes since revision 1.6.2.2: +2 -2 lines
Sync with HEAD.

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:43:19 2004 UTC (20 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.6.2.1: preferred, colored
Changes since revision 1.6.2.1: +233 -0 lines
Sync with HEAD

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 17 16:43:56 2004 UTC (20 years, 10 months ago) by he
Branches: netbsd-2-0
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +20 -2 lines
Pull up revision 1.6 (requested by tls in ticket #671):
  Set the system clock (via Xen) in resettodr(), if we are
  running in domain 0, to improve timekeeping.

Revision 1.6.2.1
Fri Jul 16 22:36:33 2004 UTC (20 years, 10 months ago) by skrll
Branches: ktrace-lwp
FILE REMOVED
Changes since revision 1.6: +0 -233 lines
file clock.c was added on branch ktrace-lwp on 2004-08-03 10:43:19 +0000

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 16 22:36:33 2004 UTC (20 years, 10 months ago) by tls
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +20 -2 lines
Set the system clock (via Xen) in resettodr(), if domain 0.

This has a couple of beneficial effects:

1) The TOD time will be preserved across boots, as one would expect.

2) Newly-started VMs will get the correct time according to domain 0.
   Previously, since we never set the time back to Xen, each VM would
   get the uncorrected system clock time, never even seeing any
   changes made since the current startup.

I don't understand how XenoLinux slaves the other domain's clocks to
the Xen "wall clock" time that we're setting here, so I haven't even
tried.  But now we can run ntpd in each domain without a huge offset
at boot caused by never updating the wall clock time at all...

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Sat May 22 15:57:33 2004 UTC (20 years, 11 months ago) by he
Branches: netbsd-2-0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +119 -31 lines
Pull up revisions 1.2-1.5 (requested by cl in ticket #337):
	Upgrade xen support:
	 - add block device driver
	 - network device driver bug fixes
	 - support for vga/keyboard/mouse
	 - support for domain0 operations
	 - fix /dev/mem and i386_iopl, reboot, event dispatch
	 - fix clock support, cpu speed report, lazy fpu switching
	 - add xen12load loader
	 - sys/arch/xen parts of build.sh release support
	[cl, ticket #337]

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Apr 24 19:32:37 2004 UTC (21 years ago) by cl
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3 lines
Let event_set_handler set the void * argument to event handlers.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Apr 17 21:49:55 2004 UTC (21 years, 1 month ago) by cl
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -11 lines
use nanoseconds since boot counter for delay routine

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Apr 17 12:50:45 2004 UTC (21 years, 1 month ago) by cl
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +51 -13 lines
- microtime support
- don't report cpu speed in startrtclock()

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Apr 10 23:50:23 2004 UTC (21 years, 1 month ago) by cl
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +78 -23 lines
get the time from Xen

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Mar 11 21:44:08 2004 UTC (21 years, 2 months ago) by cl
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Add port to the Xen virtual machine monitor.
(see http://www.cl.cam.ac.uk/Research/SRG/netos/xen/)

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>