diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h index 413c0d7c02d9..442f45b2f571 100644 --- a/include/hw/s390x/tod.h +++ b/include/hw/s390x/tod.h @@ -50,7 +50,7 @@ typedef struct S390TODClass { /* Converts ns to s390's clock format */ static inline uint64_t time2tod(uint64_t ns) { - return (ns << 9) / 125 + (((ns & 0xff10000000000000ull) / 125) << 9); + return (ns << 9) / 125 + (((ns & 0xff80000000000000ull) / 125) << 9); } /* Converts s390's clock format to ns */