<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/xen/timer/timer.c, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-07-30T15:46:40Z</updated>
<entry>
<title>Make timespecadd(3) and friends public</title>
<updated>2018-07-30T15:46:40Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2018-07-30T15:46:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6040822c4e20fb46638ecaaad543fc56f6ec2b0f'/>
<id>urn:sha1:6040822c4e20fb46638ecaaad543fc56f6ec2b0f</id>
<content type='text'>
The timespecadd(3) family of macros were imported from NetBSD back in
r35029. However, they were initially guarded by #ifdef _KERNEL. In the
meantime, we have grown at least 28 syscalls that use timespecs in some
way, leading many programs both inside and outside of the base system to
redefine those macros. It's better just to make the definitions public.

Our kernel currently defines two-argument versions of timespecadd and
timespecsub.  NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define
three-argument versions.  Solaris also defines a three-argument version, but
only in its kernel.  This revision changes our definition to match the
common three-argument version.

Bump _FreeBSD_version due to the breaking KPI change.

Discussed with:	cem, jilles, ian, bde
Differential Revision:	https://reviews.freebsd.org/D14725
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>urn:sha1:718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>Stop calling atrtc_set() from the xen timer clock_settime() method.  That</title>
<updated>2017-08-11T19:02:11Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2017-08-11T19:02:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c82d887d47ed97ed79437ebc7fc241a7ce8420c2'/>
<id>urn:sha1:c82d887d47ed97ed79437ebc7fc241a7ce8420c2</id>
<content type='text'>
removes the only reference to atrtc_set() from outside of atrtc.c, so make
it static.

The xen timer driver registers as a realtime clock with 1us resolution.  In
the past that resulted in only the xen timer's clock_settime() getting
called, so it would call atrtc_set() to set the hardware clock as well.  As
of r32090, the clock_settime() method of all registered realtime clocks gets
called, so the xen driver no longer needs to chain-call the lower-resolution
driver.

Thanks to royger@ for talking me through the xen stuff, and for testing.
</content>
</entry>
<entry>
<title>xen/timer: mark the Xen PV timer as not safe for suspension</title>
<updated>2017-02-22T09:22:17Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2017-02-22T09:22:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=de7d5ac603c78115600c885c47abccaf3c598a86'/>
<id>urn:sha1:de7d5ac603c78115600c885c47abccaf3c598a86</id>
<content type='text'>
Note that the timer itself fully supports suspension, but due to the lack of
ordering during the resume process FreeBSD cannot guarantee that the timer is
resumed before any device attempts to use it.

Submitted by:		Liuyingdong &lt;liuyingdong@huawei.com&gt;
Reviewed by:		royger
Differential Revision:	https://reviews.freebsd.org/D9639
</content>
</entry>
<entry>
<title>xen/timer: re-introduce the inittodr call in the resume path</title>
<updated>2016-06-09T16:15:01Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-06-09T16:15:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b8d1a376380ecf401d563dc7fb221b3be89857b0'/>
<id>urn:sha1:b8d1a376380ecf401d563dc7fb221b3be89857b0</id>
<content type='text'>
r298930 removed the inittodr call, but it seems like this prevents
"calcru: runtime went backwards ..." messages from occasionally appearing
when resuming from migration.

Reported by:	Karl Pielorz &lt;kpielorz@tdx.co.uk&gt;
Sponsored by:	Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>xen/pvclock: set the correct resolution for the Xen PV clock</title>
<updated>2016-05-04T13:49:59Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-05-04T13:49:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2ed46a6f7db211ae393591b23e4af577f001680e'/>
<id>urn:sha1:2ed46a6f7db211ae393591b23e4af577f001680e</id>
<content type='text'>
The Xen PV clock has a resolution of 1ns, so set the resolution to the
highest one that FreeBSD supports, which is 1us.

MFC after:	2 weeks
Sponsored by:	Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>xen/time: fix PV clock resolution</title>
<updated>2016-05-02T16:16:08Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-05-02T16:16:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f8af716b04ae27b97393e5c1959150f543fe301f'/>
<id>urn:sha1:f8af716b04ae27b97393e5c1959150f543fe301f</id>
<content type='text'>
The current resolution of the Xen PV clock is too high, which causes an
adjustment of 5s to be applied to it. Reduce the resolution to be the same
as the RTC plus one, so it's always selected as the best source when
available on x86.

Also don't reset the clock on resume, it's pointless and discards any
previous adjustments.

Sponsoted by: Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>xen/time: allow Dom0 to set the host time</title>
<updated>2016-05-02T16:15:28Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-05-02T16:15:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eac636b0ce5cb889aa72628f18169cd58ba3697d'/>
<id>urn:sha1:eac636b0ce5cb889aa72628f18169cd58ba3697d</id>
<content type='text'>
Dom0 should be able to set the host time. This is implemented by first
writing to the RTC (as would be done on bare metal), and then using the
XENPF_settime64 hypercall in order to force Xen to update the wallclock
shared page of all domains.

Sponsored by: Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>xen/timer: remove the timer setup loop</title>
<updated>2016-05-02T16:13:55Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-05-02T16:13:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=af5bb69c5a064afa2e751adbfd38c80965f34a66'/>
<id>urn:sha1:af5bb69c5a064afa2e751adbfd38c80965f34a66</id>
<content type='text'>
With the removal of the usage of the VCPU_SSHOTTMR_future flag, now
all errors from xentimer_vcpu_start_timer should be considered fatal, and
the loop is no longer needed since in case of setting the timer in the past
we will get an event interrupt right away (instead of returning ETIME).

Sponsored by:	Citrix Systems R&amp;D
MFC after :	2 weeks
</content>
</entry>
<entry>
<title>xen/x86: don't lose event interrupts</title>
<updated>2016-05-02T16:13:11Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2016-05-02T16:13:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=04423b622a81a2f81428291c2f9a2c35ab00a03a'/>
<id>urn:sha1:04423b622a81a2f81428291c2f9a2c35ab00a03a</id>
<content type='text'>
On slow platforms with unreliable TSC, such as QEMU emulated machines,
it is possible for the FreeBSD kernel to request the next event in the
past. In that case, in the current implementation of
xentimer_vcpu_start_timer, we simply return -ETIME. To be precise Xen
returns -ETIME and we pass it on. As a consequence we need to loop
around to function to make sure that the timer is properly set.

Instead it is better to always ask the hypervisor for a timer event,
even if the timeout is past. To do that, remove the VCPU_SSHOTTMR_future
flag.

Submitted by:	Stefano Stabellini &lt;sstabellini@kernel.org&gt;
Reviewed by:	royger
MFC after:	2 weeks
</content>
</entry>
</feed>
