Index | Thread | Search

From:
"Ted Unangst" <tedu@tedunangst.com>
Subject:
Re: Improving time keeping in x86 VMs
To:
"Stefan Fritsch" <sf@openbsd.org>
Cc:
"Mike Larkin" <mlarkin@nested.page>, "Dave Voutila" <dv@sisu.io>, tech@openbsd.org, scottcheloha@gmail.com
Date:
Sat, 17 May 2025 21:34:41 -0400

Download raw body.

Thread
  • Ted Unangst:

    Improving time keeping in x86 VMs

  • Mike Larkin:

    Improving time keeping in x86 VMs

  • On 2025-05-17, Stefan Fritsch wrote:
    > diff --git a/sys/dev/pv/pvclock.c b/sys/dev/pv/pvclock.c
    > index 6d8dd432900..206cc418062 100644
    > --- a/sys/dev/pv/pvclock.c
    > +++ b/sys/dev/pv/pvclock.c
    > @@ -35,13 +36,25 @@
    >  #define	PMAP_NOCRYPT	0
    >  #endif
    >  
    > -uint pvclock_lastcount;
    > +#ifdef __amd64__
    > +unsigned long pvclock_lastcount;
    > +#else
    > +uint64_t pvclock_lastcount;
    > +#endif
    
    This looks odd. Can we use the same type by adding the necessary
    uint64 swap on amd64?
    
    
  • Ted Unangst:

    Improving time keeping in x86 VMs

  • Mike Larkin:

    Improving time keeping in x86 VMs