core-admin/dom0
Marek Marczykowski 951b2b0b69 dom0: fix clock problems which caused VM hangs during boot (~#253)
The source of problem was clockevent_program_event returns -ETIME:
------------ kernel/time/clockevents.c:
/**
 * clockevents_program_event - Reprogram the clock event device.
 * @expires:    absolute expiry time (monotonic clock)
 *
 * Returns 0 on success, -ETIME when the event is in the past.
 */
int clockevents_program_event(struct clock_event_device *dev, ktime_t
expires,
                  ktime_t now)
-------------

xen_vcpuop_set_next_event schedules event by getting current time
(xen_clocksource_read()) (*1) adding delta (expires-now) and programming
event with VCPUOP_set_singleshot_timer hypercall. Then xen gets current
time (*2) and in some rare cases this time is after expected timer
expiration... Even after VCPUOP_set_singleshot_timer hypercal,
xen_clocksource_read() reports time slightly in the past comparing to
xen time (reported by NOW() macro).

I think this is because "current" time is calculated different way in *1
and *2. The *1 way is controlled by tsc_mode, which is described here:
http://lxr.xensource.com/lxr/source/docs/misc/tscmode.txt. Default
tsc_mode=0 is "smart" and I think because of that can be slightly before
NOW() time. tsc_mode=2 is almost the same as NOW() macro works.

After all tsc_mode=2 was default in xen-3.4.
2011-08-31 22:08:24 +02:00
..
aux-tools dom0: qubes-watch-updates & qvm-dom0-upgrade: use qvm-sync-dom0-clock 2011-08-02 14:14:50 +02:00
clipboard_notifier Initial public commit. 2010-04-05 20:58:57 +02:00
icons Added qubes.png icon 2010-05-07 16:06:38 +02:00
init.d dom0: Force NetVM shutdown (#304) 2011-07-21 01:01:31 +02:00
misc dom0: fix clock problems which caused VM hangs during boot (~#253) 2011-08-31 22:08:24 +02:00
pm-utils Dom0: restart ehci_hcd module on resume for all netvms (#299) 2011-07-30 11:20:11 +02:00
qmemman qmemman: when balooning, make sure that past mem-set will not steal memory 2011-07-22 13:40:21 +02:00
qvm-core dom0: use full patch for network script 2011-08-31 22:01:08 +02:00
qvm-tools dom0/qvm-run: Add -p as alias for --pass_io 2011-08-31 21:01:24 +02:00
restore dispvm: honour current choice of template for dispvm 2011-07-26 17:09:59 +02:00
vaio_fixes sony-vaio-fixes v1.6.1 2011-07-17 14:15:14 +02:00
qubes-cached.repo Dom0: set metadata_expiry=0 for qubes-dom0-cached repo 2011-07-30 14:07:35 +02:00
qubes-guid.desktop Automaticaly start qubes_guid for all VMs when user logon 2011-04-07 19:23:23 +02:00
qubes-update-watch.desktop dom0: watch for updates from dom0 (#198) 2011-07-17 01:20:13 +02:00
qubes.repo Make qubes-testing repos disabled by default 2010-07-06 16:35:10 +02:00
qubes.sudoers dom0: do not require tty in sudo (for /etc/init.d/qubes_netvm start) 2011-06-29 21:22:56 +02:00
qubes.SyncAppMenus qrexec: adjust appmenu syncing to the new qrexec api 2011-07-06 14:09:36 +02:00
qubes.SyncAppMenus.policy Add comments to policy files. 2011-07-22 16:11:03 +02:00