• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HarryR / nt365 / 26594614066
44%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 06:42PM UTC
Jobs 1
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
26594614066

push

github

HarryR
hal: PIT-counter wall-time clock (fixes TCG timer expiry)

HalpClockTickIncrement and HalQueryRealTimeClock used the TSC for
per-tick increment and wall-clock extrapolation.  Under QEMU TCG,
RDTSC ticks at guest-execution rate (cpu_get_ticks -> virtual time,
not wall) -- a TSC delta captures whatever fraction of host wall the
guest was scheduled for, not the wall interval between two PIT IRQs.
InterruptTime then lags wall by 10-30x; a 2-second NtWaitForSingleObject
takes 30-60s wall to fire, every io_wait timeout inflates by the same
factor, the whole IOCP/net stack appears to hang until the disassociate
threshold.  Under KVM the TSC is honest, so the path worked end-to-end
in production -- the dev/CI/TCG path was structurally broken.

Drop TSC entirely from HAL's wall-time-driven counters and read PIT
channel 0's counter directly.  QEMU emulates the 8254 PIT against
QEMU_CLOCK_VIRTUAL_RT (wall time) under both TCG and KVM, so a
PIT-counter delta is the universal "wall time elapsed since the last
tick" answer that works on every machine type / accelerator we target
(microvm/q35/pc, KVM or TCG, bare metal future-proof).

HAL (halinit.c, stubs.c):
- PIT channel 0 mode 3 (square wave, decrements by 2) -> mode 2 (rate
  generator, decrements by 1) for clean counter math.  Both fire IRQ0
  at the same rate; mode 2 makes the latched counter directly
  interpretable as 0..PIT_RELOAD.
- HalpReadPitCounter helper (latched-mode lo/hi read).
- HalpClockTickIncrement: drop TSC, track HalpLastPitCount + handle
  single-cycle wrap, convert delta to 100ns via delta*1e7/PIT_FREQ.
  Accumulate HalpPitTicksSinceBoot for the wall-clock path.
- HalQueryRealTimeClock: HalpBootSystemTime + HalpPitTicksSinceBoot *
  1e7 / PIT_FREQ.  No TSC.

Verified across microvm+ramdisk+TCG, q35+nvme+UEFI+TCG, pc+ide+UEFI+TCG
(3+ runs each).  Full selftest under KVM: 722 pass / 0 fail / 1 skip
(SystemTime-not-seeded-without-UEFI-RTC test, already documented to
skip in that configuration)... (continued)
Jobs
ID Job ID Ran Files Coverage
1 26594614066.1 28 May 2026 06:42PM UTC 0
GitHub Action Run
Source Files on build 26594614066
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #26594614066
  • 6ad7a751 on github
  • Prev Build on main (#26492732040)
  • Next Build on main (#26632890045)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc