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


Default branch: MAIN
Current tag: MAIN


Revision 1.82, Sat Apr 25 15:26:18 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-futex-base, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.81: +2 -2 lines
FILE REMOVED

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.81 / (download) - annotate - [select for diffs], Mon Apr 13 22:54:12 2020 UTC (4 years ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.80: +6 -10 lines
Diff to previous 1.80 (colored)

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.80 / (download) - annotate - [select for diffs], Wed Oct 16 18:29:49 2019 UTC (4 years, 6 months ago) by christos
Branch: 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
Changes since 1.79: +4 -3 lines
Diff to previous 1.79 (colored)

Add and use __FPTRCAST, requested by uwe@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Oct 16 15:01:10 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored)

add void * casts for the clock interrupt handlers.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Mar 9 09:51:29 2019 UTC (5 years, 1 month ago) by kre
Branch: 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
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)


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

Revision 1.77 / (download) - annotate - [select for diffs], Sat Feb 2 12:32:55 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

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.76 / (download) - annotate - [select for diffs], Tue Dec 25 06:50:12 2018 UTC (5 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

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) - annotate - [select for diffs], Mon Dec 24 14:55:42 2018 UTC (5 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

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.74 / (download) - annotate - [select for diffs], Sun Nov 18 23:50:48 2018 UTC (5 years, 4 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

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) - annotate - [select for diffs], Sun Nov 18 10:24:10 2018 UTC (5 years, 4 months ago) by cherry
Branch: MAIN
Changes since 1.72: +3 -2 lines
Diff to previous 1.72 (colored)

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) - annotate - [select for diffs], Fri Oct 26 05:33:21 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

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) - annotate - [select for diffs], Wed Oct 24 03:59:33 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

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.70 / (download) - annotate - [select for diffs], Sat Jun 30 14:59:38 2018 UTC (5 years, 9 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.69: +18 -18 lines
Diff to previous 1.69 (colored)

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) - annotate - [select for diffs], Sat Jun 30 14:21:19 2018 UTC (5 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.68: +9 -28 lines
Diff to previous 1.68 (colored)

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) - annotate - [select for diffs], Fri Jun 29 21:53:12 2018 UTC (5 years, 9 months ago) by riastradh
Branch: MAIN
Changes since 1.67: +834 -399 lines
Diff to previous 1.67 (colored)

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.67 / (download) - annotate - [select for diffs], Sun Jun 24 13:35:33 2018 UTC (5 years, 9 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.66: +9 -4 lines
Diff to previous 1.66 (colored)

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.66 / (download) - annotate - [select for diffs], Fri May 11 13:24:46 2018 UTC (5 years, 11 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.65: +6 -6 lines
Diff to previous 1.65 (colored)

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.65 / (download) - annotate - [select for diffs], Mon Nov 6 15:27:09 2017 UTC (6 years, 5 months ago) by cherry
Branch: 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
Changes since 1.64: +13 -8 lines
Diff to previous 1.64 (colored)

Switch XEN drivers to use intr_establish_xname()/intr_disestablish()

This completes the API transition.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jun 12 09:08:09 2016 UTC (7 years, 10 months ago) by jnemeth
Branch: 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-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
Changes since 1.63: +19 -7 lines
Diff to previous 1.63 (colored)

- 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.63 / (download) - annotate - [select for diffs], Sun Sep 21 12:46:15 2014 UTC (9 years, 6 months ago) by bouyer
Branch: 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
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Make Xen kernels compile without DIAGNOSTIC

Revision 1.62 / (download) - annotate - [select for diffs], Fri Feb 17 19:00:45 2012 UTC (12 years, 2 months ago) by bouyer
Branch: 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
Changes since 1.61: +8 -5 lines
Diff to previous 1.61 (colored)

- 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) - annotate - [select for diffs], Sun Feb 12 14:38:18 2012 UTC (12 years, 2 months ago) by jym
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.60: +10 -14 lines
Diff to previous 1.60 (colored)

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) - annotate - [select for diffs], Mon Jan 9 13:35:42 2012 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

Remove redundant use of curcpu().

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jan 9 13:33:38 2012 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.58: +2 -3 lines
Diff to previous 1.58 (colored)

Remove obsolete comment.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Dec 7 15:47:43 2011 UTC (12 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

switch from xen3-public to xen-public.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Nov 18 06:01:50 2011 UTC (12 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.56: +194 -148 lines
Diff to previous 1.56 (colored)

[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.56 / (download) - annotate - [select for diffs], Tue Sep 20 00:12:24 2011 UTC (12 years, 6 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.55: +33 -9 lines
Diff to previous 1.55 (colored)

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.55 / (download) - annotate - [select for diffs], Fri Jul 29 22:16:05 2011 UTC (12 years, 8 months ago) by jym
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.54: +16 -6 lines
Diff to previous 1.54 (colored)

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 / (download) - annotate - [select for diffs], Sun Mar 28 20:46:18 2010 UTC (14 years ago) by snj
Branch: 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
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Spell "enough" properly.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Dec 12 14:44:10 2009 UTC (14 years, 4 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

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.52 / (download) - annotate - [select for diffs], Fri Oct 23 02:32:34 2009 UTC (14 years, 5 months ago) by snj
Branch: MAIN
Changes since 1.51: +2 -7 lines
Diff to previous 1.51 (colored)

Remove 3rd and 4th clauses.  OK cl@ (copyright holder).

Revision 1.51 / (download) - annotate - [select for diffs], Wed Jul 29 12:02:09 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.50: +3 -65 lines
Diff to previous 1.50 (colored)

remove Xen2 support.
ok bouyer@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 16 21:05:35 2009 UTC (14 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.49: +12 -4 lines
Diff to previous 1.49 (colored)

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.49 / (download) - annotate - [select for diffs], Fri Jan 16 20:16:47 2009 UTC (15 years, 3 months ago) by jym
Branch: 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
Changes since 1.48: +10 -10 lines
Diff to previous 1.48 (colored)

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.48 / (download) - annotate - [select for diffs], Thu Nov 13 18:44:51 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.47: +14 -2 lines
Diff to previous 1.47 (colored)

Finish preparation to new interface.
New interface not yet used by default. It needs some testing first.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Oct 21 15:46:32 2008 UTC (15 years, 5 months ago) by cegger
Branch: 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
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

introduce two macros: xendomain_is_dom0() and xendomain_is_privileged(). Use them.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Apr 21 15:15:34 2008 UTC (15 years, 11 months ago) by cegger
Branch: 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
Changes since 1.45: +4 -6 lines
Diff to previous 1.45 (colored)

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) - annotate - [select for diffs], Mon Apr 14 13:38:03 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.44: +6 -6 lines
Diff to previous 1.44 (colored)

- use POSIX integer types
- ansify functions

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jan 17 01:56:02 2008 UTC (16 years, 3 months ago) by lukem
Branch: 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
Changes since 1.43: +2 -4 lines
Diff to previous 1.43 (colored)

Remove unnecessary references to config_time.h.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Jan 8 20:37:35 2008 UTC (16 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.42: +19 -68 lines
Diff to previous 1.42 (colored)

Switch Xen to generic TODR. Tested by Manuel Bouyer.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Nov 22 16:17:06 2007 UTC (16 years, 4 months ago) by bouyer
Branch: 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
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored)

Pull up the bouyer-xenamd64 branch to HEAD. This brings in amd64 support
to NetBSD/Xen, both Dom0 and DomU.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Oct 26 13:24:44 2007 UTC (16 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

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.40 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:32 2007 UTC (16 years, 6 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

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.39 / (download) - annotate - [select for diffs], Tue Jul 10 16:27:58 2007 UTC (16 years, 9 months ago) by he
Branch: 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
Changes since 1.38: +4 -2 lines
Diff to previous 1.38 (colored)

Protect the initialization of xen_timepush_co with #ifdef DOM0OPS,
like its declaration and other uses.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jul 9 20:52:39 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.37: +5 -4 lines
Diff to previous 1.37 (colored)

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) - annotate - [select for diffs], Mon Jul 2 06:26:35 2007 UTC (16 years, 9 months ago) by jld
Branch: MAIN
Changes since 1.36: +29 -12 lines
Diff to previous 1.36 (colored)

Correct regression in xen3 wall-time reading accidentally committed in r1.35.
(Discussed on port-xen.)

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jun 25 19:57:32 2007 UTC (16 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored)

Fix race condition in cpu_idle() on ci_want_resched. From YAMAMOTO Takashi.

Revision 1.35 / (download) - annotate - [select for diffs], Sat May 12 07:06:55 2007 UTC (16 years, 11 months ago) by jld
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.34: +160 -186 lines
Diff to previous 1.34 (colored)

Convert the xen port to use timecounters; ok'ed by bouyer@.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Nov 11 23:33:12 2006 UTC (17 years, 5 months ago) by jld
Branch: 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
Changes since 1.33: +24 -2 lines
Diff to previous 1.33 (colored)

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) - annotate - [select for diffs], Sun Nov 5 10:11:55 2006 UTC (17 years, 5 months ago) by jld
Branch: MAIN
Changes since 1.32: +20 -11 lines
Diff to previous 1.32 (colored)

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) - annotate - [select for diffs], Fri Nov 3 12:09:46 2006 UTC (17 years, 5 months ago) by jld
Branch: MAIN
Changes since 1.31: +39 -14 lines
Diff to previous 1.31 (colored)

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) - annotate - [select for diffs], Fri Nov 3 09:16:13 2006 UTC (17 years, 5 months ago) by jld
Branch: MAIN
Changes since 1.30: +8 -8 lines
Diff to previous 1.30 (colored)

"static volatile", not "volatile static".

Revision 1.30 / (download) - annotate - [select for diffs], Mon Sep 11 06:57:30 2006 UTC (17 years, 7 months ago) by jld
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.29: +39 -2 lines
Diff to previous 1.29 (colored)

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) - annotate - [select for diffs], Sun Sep 10 22:25:58 2006 UTC (17 years, 7 months ago) by jld
Branch: MAIN
Changes since 1.28: +14 -3 lines
Diff to previous 1.28 (colored)

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.28 / (download) - annotate - [select for diffs], Wed Aug 16 13:23:33 2006 UTC (17 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.27: +0 -4 lines
Diff to previous 1.27 (colored)

don't define XEN_CLOCK_DEBUG automatically for DEBUG.
it isn't safe to do printf in microtime().

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jul 11 12:26:58 2006 UTC (17 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.26: +12 -2 lines
Diff to previous 1.26 (colored)

inittodr: if xen3, add processed_system_time (system_time) to
shadow_tv (wc_sec/nsec) as linux guest does.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 4 07:35:28 2006 UTC (17 years, 9 months ago) by jld
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

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.25 / (download) - annotate - [select for diffs], Sun May 28 13:36:28 2006 UTC (17 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.24: +2 -11 lines
Diff to previous 1.24 (colored)

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) - annotate - [select for diffs], Sat May 27 19:57:15 2006 UTC (17 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.23: +11 -3 lines
Diff to previous 1.23 (colored)

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.23 / (download) - annotate - [select for diffs], Fri May 5 19:38:38 2006 UTC (17 years, 11 months ago) by jld
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.22: +99 -12 lines
Diff to previous 1.22 (colored)

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) - annotate - [select for diffs], Fri Apr 28 02:30:42 2006 UTC (17 years, 11 months ago) by jld
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

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.21 / (download) - annotate - [select for diffs], Tue Apr 18 21:19:01 2006 UTC (18 years ago) by jld
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

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.20 / (download) - annotate - [select for diffs], Tue Apr 4 21:08:47 2006 UTC (18 years ago) by jld
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4
Changes since 1.19: +22 -7 lines
Diff to previous 1.19 (colored)

Change diagnostic assertions to DEBUG-conditionalized printfs.
(Alternately, XEN_CLOCK_DEBUG may be defined to enable just the
checks in this module.)

Revision 1.19 / (download) - annotate - [select for diffs], Fri Mar 17 06:04:24 2006 UTC (18 years, 1 month ago) by jld
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored)

Add some missing memory barriers I noticed.
Discussed on port-xen.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Mar 7 23:08:14 2006 UTC (18 years, 1 month ago) by jld
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq
Changes since 1.17: +85 -24 lines
Diff to previous 1.17 (colored)

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.17 / (download) - annotate - [select for diffs], Fri Feb 3 04:59:03 2006 UTC (18 years, 2 months ago) by jld
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, elad-kernelauth
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)

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.16 / (download) - annotate - [select for diffs], Sun Jan 15 22:09:52 2006 UTC (18 years, 3 months ago) by bouyer
Branch: MAIN
Branch point for: rpaulo-netinet-merge-pcb
Changes since 1.15: +30 -2 lines
Diff to previous 1.15 (colored)

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) - annotate - [select for diffs], Sun Dec 11 12:19:50 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

merge ktrace-lwp.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 11 20:32:56 2005 UTC (18 years, 8 months ago) by cube
Branch: 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
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

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.13 / (download) - annotate - [select for diffs], Sat Jun 25 18:44:59 2005 UTC (18 years, 9 months ago) by bouyer
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.12: +6 -4 lines
Diff to previous 1.12 (colored)

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.12 / (download) - annotate - [select for diffs], Fri May 27 22:02:25 2005 UTC (18 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.11: +21 -24 lines
Diff to previous 1.11 (colored)

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.11 / (download) - annotate - [select for diffs], Sun Apr 17 14:50:11 2005 UTC (19 years ago) by bouyer
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

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) - annotate - [select for diffs], Sat Apr 16 22:49:38 2005 UTC (19 years ago) by bouyer
Branch: MAIN
Changes since 1.9: +6 -6 lines
Diff to previous 1.9 (colored)

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.9 / (download) - annotate - [select for diffs], Thu Mar 10 21:44:31 2005 UTC (19 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.8: +4 -2 lines
Diff to previous 1.8 (colored)

Report which IRQ is used.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Mar 9 22:39:21 2005 UTC (19 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.7: +59 -20 lines
Diff to previous 1.7 (colored)

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 / (download) - annotate - [select for diffs], Thu Sep 23 02:24:22 2004 UTC (19 years, 6 months ago) by tls
Branch: 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
Changes since 1.6: +32 -6 lines
Diff to previous 1.6 (colored)

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 / (download) - annotate - [select for diffs], Fri Jul 16 22:36:33 2004 UTC (19 years, 9 months ago) by tls
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.5: +20 -2 lines
Diff to previous 1.5 (colored)

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.5 / (download) - annotate - [select for diffs], Sat Apr 24 19:32:37 2004 UTC (19 years, 11 months ago) by cl
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Let event_set_handler set the void * argument to event handlers.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Apr 17 21:49:55 2004 UTC (20 years ago) by cl
Branch: MAIN
Changes since 1.3: +6 -11 lines
Diff to previous 1.3 (colored)

use nanoseconds since boot counter for delay routine

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 17 12:50:45 2004 UTC (20 years ago) by cl
Branch: MAIN
Changes since 1.2: +51 -13 lines
Diff to previous 1.2 (colored)

- microtime support
- don't report cpu speed in startrtclock()

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 10 23:50:23 2004 UTC (20 years ago) by cl
Branch: MAIN
Changes since 1.1: +78 -23 lines
Diff to previous 1.1 (colored)

get the time from Xen

Revision 1.1 / (download) - annotate - [select for diffs], Thu Mar 11 21:44:08 2004 UTC (20 years, 1 month ago) by cl
Branch: 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/)

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>