[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH xeniface] Get rid of bogus time adjustment


  • To: Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Mon, 16 Sep 2019 14:40:35 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=Paul.Durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Delivery-date: Mon, 16 Sep 2019 14:40:42 +0000
  • Ironport-sdr: fSL87c5EwhGJxUFEjT0zGlnwN4+/S3mRcGJkZA/jyvlj6B+kb7ty+efX2pxj9FYROt9ro7cwW9 GnBnnqbfe1Yfh1F6ahtMzCxMj/t13g2EkZfbgMyiSBbpqokr7T2PRNAQbVSUqbENGa6Uu68OBJ Da3+btodULCcRCSxJGJ705YyD+xQmlObaf2zcTjDrZl87kxvilqKROhOO1oYT5rYtZIHBbiTE9 4PoUAeaVJPdnykJI7L7i3CNn+Z6gByk9qLizBUWbMCOa9DxZGjUAmLE2K4HAagK310VQLyXFSA vNc=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHVbJJocJOkbcmfJkGhmg1tBxWZYqcuPlGAgAAh1DA=
  • Thread-topic: [win-pv-devel] [PATCH xeniface] Get rid of bogus time adjustment

> -----Original Message-----
> From: Owen Smith <owen.smith@xxxxxxxxxx>
> Sent: 16 September 2019 15:39
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Subject: RE: [win-pv-devel] [PATCH xeniface] Get rid of bogus time adjustment
> 
> 
> 
> > -----Original Message-----
> > From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> > Behalf Of Paul Durrant
> > Sent: 16 September 2019 14:27
> > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> > Cc: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> > Subject: [win-pv-devel] [PATCH xeniface] Get rid of bogus time adjustment
> >
> > Xen maintains synchronization between the wallclock (as reported in the
> > shared info) and the emulated RTC. Thus all the guest agent needs to know,
> > to correctly interpret the wallclock, is whether Windows is setting the RTC 
> > in
> > local time or UTC. No adjustment of the wallclock is required.
> >
> > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> > ---
> >  src/xenagent/service.cpp | 25 -------------------------
> >  1 file changed, 25 deletions(-)
> >
> > diff --git a/src/xenagent/service.cpp b/src/xenagent/service.cpp index
> > a77ff23..8f8f445 100644
> > --- a/src/xenagent/service.cpp
> > +++ b/src/xenagent/service.cpp
> > @@ -404,28 +404,6 @@ bool CXenIfaceCreator::IsRTCInUTC()
> >      return val;
> >  }
> >
> > -void CXenIfaceCreator::AdjustXenTimeToUTC(FILETIME* now) -{
> 
> AdjustXenTimeToUTC will also need the method taking out of service.h
> 

Good point. Will send v2.

  Paul

> > -    std::string vm;
> > -    if (!m_device->StoreRead("vm", vm))
> > -        return;
> > -
> > -    std::string offs;
> > -    if (!m_device->StoreRead(vm + "/rtc/timeoffset", offs))
> > -        return;
> > -
> > -    long offset = (long)atoi(offs.c_str());
> > -
> > -    ULARGE_INTEGER lnow;
> > -    lnow.LowPart  = now->dwLowDateTime;
> > -    lnow.HighPart = now->dwHighDateTime;
> > -
> > -    lnow.QuadPart -= ((LONGLONG)offset * 1000000);
> > -
> > -    now->dwLowDateTime  = lnow.LowPart;
> > -    now->dwHighDateTime = lnow.HighPart;
> > -}
> > -
> >  void CXenIfaceCreator::SetXenTime()
> >  {
> >      bool IsUTC = IsRTCInUTC();
> > @@ -440,9 +418,6 @@ void CXenIfaceCreator::SetXenTime()
> >      if (!m_device->SharedInfoGetTime(&now))
> >          return;
> >
> > -    if (IsUTC)
> > -        AdjustXenTimeToUTC(&now);
> > -
> >      SYSTEMTIME sys = { 0 };
> >      if (!FileTimeToSystemTime(&now, &sys))
> >          return;
> > --
> > 2.5.3
> >
> >
> > _______________________________________________
> > win-pv-devel mailing list
> > win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> > https://lists.xenproject.org/mailman/listinfo/win-pv-devel
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.