Displaying 20 results from an estimated 47 matches for "wc_nsec".
2008 Aug 06
3
[PATCH RFC] do_settime is backwards?!
While digging through the time code, I found something very strange
in do_settime:
x = (secs * 1000000000ULL) + (u64)nsecs - system_time_base;
y = do_div(x, 1000000000);
spin_lock(&wc_lock);
wc_sec = _wc_sec = (u32)x;
wc_nsec = _wc_nsec = (u32)y;
spin_unlock(&wc_lock);
The value "x" appears to be the number of nanoseconds, while
the value "y" is the value in seconds. The assignments to
wc_sec and wc_nsec seem backwards, though...
I hope I''ve overlooked some detail, but just in ca...
2008 Nov 25
7
when timer go back in dom0 save and restore or migrate, PV domain hung
...goto out;
+ }
if ( read_exact(io_fd, &p2m_size, sizeof(unsigned long)) )
{
@@ -1120,6 +1130,8 @@
/* restore saved vcpu_info and arch specific info */
MEMCPY_FIELD(new_shared_info, old_shared_info, vcpu_info);
+ MEMCPY_FIELD(new_shared_info, old_shared_info, wc_nsec);
+ MEMCPY_FIELD(new_shared_info, old_shared_info, wc_sec);
MEMCPY_FIELD(new_shared_info, old_shared_info, arch);
/* clear any pending events and the selector */
diff -r a5ed0dbc829f xen/arch/x86/time.c
--- a/xen/arch/x86/time.c Tue Nov 18 14:34:14 2008 +0800
+++ b/xen/arch/x86/ti...
2008 Aug 06
10
[BUG 1282] time jump on live migrate root cause & proposed fixes
...ot time - this may
require some magic to sync_cmos_clock(), sync_xen_wallclock()
and/or other functions so dom0 does not get too confused while
changing the time during bootup
2) have time_init() and time_resume() calculate the hypervisor
boot time from the shared_info ->wc_sec ->wc_nsec and the
shared_info->per cpu vcpu_info->system_time -- if the host
boot time changes (by more than a second?) adjust some local
offset that we add into get_nsec_offset() and get_usec_offset()
to always adjust the time right
3) get_time_values_from_xen() and __update_wallclock() c...
2008 Nov 27
1
Re: RE: Re: Re: when timer go back in dom0 save and restore ormigrate, PV domain hung
...l.com]
Sent: Thursday, November 27, 2008 11:20 AM
To: keir.fraser@eu.citrix.com; Tian, Kevin;
xen-devel@lists.xensource.com
Subject: 答复: Re: [Xen-devel] when timer go back in dom0 save and
restore ormigrate, PV domain hung
Hi,
yes, there is a patch before to fix problem wc_sec/wc_nsec in
xc_domain_restore.c, but it still missed something.
If constucting dom0 or restoring of a PV dom. Guest os will read the
local wc_sec from xen as it base time.wc_sec is initialized with CMOS
data. There were some case which wc_sec will be changed. One is that go
back dom0''s syst...
2008 May 08
4
[PATCH 0/4] paravirt clock series.
Respin of the paravirt clock patch series.
On the host side the kvm paravirt clock is made compatible with the
xen clock.
On the guest side some xen code has been factored out into a separate
source file shared by both kvm and xen clock implementations.
This time it should work ok for kvm smp guests ;)
cheers,
Gerd
2008 May 08
4
[PATCH 0/4] paravirt clock series.
Respin of the paravirt clock patch series.
On the host side the kvm paravirt clock is made compatible with the
xen clock.
On the guest side some xen code has been factored out into a separate
source file shared by both kvm and xen clock implementations.
This time it should work ok for kvm smp guests ;)
cheers,
Gerd
2008 May 16
5
[PATCH 0/4] paravirt clock source patches, #3
paravirt clock source patches, next round, with a bunch of changes
in the host code according to Avi's review comments and some minor
code tweaks.
cheers,
Gerd
2008 May 16
5
[PATCH 0/4] paravirt clock source patches, #3
paravirt clock source patches, next round, with a bunch of changes
in the host code according to Avi's review comments and some minor
code tweaks.
cheers,
Gerd
2012 Mar 05
6
[PATCH 3/5] RTC: Add UIP(update in progress) check logic
...0
@@ -1601,6 +1601,13 @@ unsigned long get_localtime(struct domai
+ d->time_offset_seconds;
}
+/* Return millisecs after 00:00:00 localtime, 1 January, 1970. */
+uint64_t get_localtime_us(struct domain *d)
+{
+ return ((wc_sec + d->time_offset_seconds) * 1000000000ULL
+ + wc_nsec + NOW()) / 1000UL;
+}
+
unsigned long get_sec(void)
{
return wc_sec + (wc_nsec + NOW()) / 1000000000ULL;
diff -r 47cb862a07c2 -r edc35b026509 xen/include/xen/time.h
--- a/xen/include/xen/time.h Mon Mar 05 14:39:07 2012 +0800
+++ b/xen/include/xen/time.h Mon Mar 05 14:39:41 2012 +0800
@...
2008 Jun 03
6
[PATCH 0/5] paravirt clock source patches, #5
paravirt clock source patches, next round.
There is now a pvclock-abi.h file with the structs and some longish
comments in it and everybody is switched over to use the stuff in
there.
Some minor tweaks after super-fast review by Jeremy.
The queue is on top of the kvm git tree. The first two patches should
have no kvm dependencies and should apply to linus tree just fine.
cheers,
Gerd
2008 Jun 03
6
[PATCH 0/5] paravirt clock source patches, #5
paravirt clock source patches, next round.
There is now a pvclock-abi.h file with the structs and some longish
comments in it and everybody is switched over to use the stuff in
there.
Some minor tweaks after super-fast review by Jeremy.
The queue is on top of the kvm git tree. The first two patches should
have no kvm dependencies and should apply to linus tree just fine.
cheers,
Gerd
2008 Jun 03
10
[PATCH 0/5] paravirt clock source patches, #4
paravirt clock source patches, next round.
There is now a pvclock-abi.h file with the structs and some longish
comments in it and everybody is switched over to use the stuff in
there.
cheers,
Gerd
2008 Jun 03
10
[PATCH 0/5] paravirt clock source patches, #4
paravirt clock source patches, next round.
There is now a pvclock-abi.h file with the structs and some longish
comments in it and everybody is switched over to use the stuff in
there.
cheers,
Gerd
2006 Oct 04
0
[PATCH,RFC 6/17] 32-on-64 shared info handling
...,10 @@ void update_vcpu_system_time(struct vcpu
void update_domain_wallclock_time(struct domain *d)
{
spin_lock(&wc_lock);
- version_update_begin(&d->shared_info->wc_version);
- d->shared_info->wc_sec = wc_sec + d->time_offset_seconds;
- d->shared_info->wc_nsec = wc_nsec;
- version_update_end(&d->shared_info->wc_version);
+ version_update_begin(&shared_info(d, wc_version));
+ shared_info(d, wc_sec) = wc_sec + d->time_offset_seconds;
+ shared_info(d, wc_nsec) = wc_nsec;
+ version_update_end(&shared_info(d, wc_version));...
2005 Aug 11
7
code question?
Doing some janitorial (you cleaning the flooded toilets and such) work
today. I have come across this line of code that really I''m not sure
what the intent was..in xen/include/sched.h
#define hypercall_preempt_check() (unlikely( \
softirq_pending(smp_processor_id()) | \
(!!current->vcpu_info->evtchn_upcall_pending & \
2007 May 15
3
[PATCH 1/12] Add suspend/resume to devices owned by Xen
...timer(&t->calibration_timer, NOW() + EPOCH);
+}
+
+void destroy_percpu_time(void)
+{
+ kill_timer(&this_cpu(cpu_time).calibration_timer);
}
/* Late init function (after all CPUs are booted). */
@@ -926,6 +1013,56 @@ unsigned long get_localtime(struct domai
{
return wc_sec + (wc_nsec + NOW()) / 1000000000ULL
+ d->time_offset_seconds;
+}
+
+/* timer suspend/resume */
+static u64 sleep_start;
+int time_suspend(void)
+{
+ sleep_start = get_cmos_time();
+
+ /* Better to cancel calibration timer for accuracy */
+ destroy_percpu_time();
+
+ if (cur_timer->...
2006 Dec 01
0
[PATCH 3/10] Add support for netfront/netback acceleration drivers
...ock time: updated only by control software. Guests should
base
+ * their gettimeofday() syscall on this wallclock-base value.
+ */
+ uint32_t wc_version; /* Version counter: see vcpu_time_info_t.
*/
+ uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */
+ uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */
+
+ struct arch_shared_info arch;
+
+};
+typedef struct shared_info shared_info_t;
+
+/*
+ * Start-of-day memory layout for the initial domain (DOM0):
+ * 1. The domain is started within contiguous virtual-memory region.
+ * 2. The contiguous re...
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides
the same platform interface as running natively on the hardware,
paravirtualization requires modification to the guest operating system
to work with the platform interface provided by the hypervisor.
Xen was designed with performance in mind. Calls to the hypervisor
are minimized, batched if necessary, and non-critical codepaths
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides
the same platform interface as running natively on the hardware,
paravirtualization requires modification to the guest operating system
to work with the platform interface provided by the hypervisor.
Xen was designed with performance in mind. Calls to the hypervisor
are minimized, batched if necessary, and non-critical codepaths
2007 Apr 18
33
[RFC PATCH 00/33] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides
the same platform interface as running natively on the hardware,
paravirtualization requires modification to the guest operating system
to work with the platform interface provided by the hypervisor.
Xen was designed with performance in mind. Calls to the hypervisor
are minimized, batched if necessary, and non-critical codepaths