pit-div_round.patch
PATCH 1/1 pit-div_round.patch
Truly round off the div result to get right PIT frequency for guest. Otherwise, the guest's idea of time drifts away from that of the host.
Signed-off-by Edwin Zhai <[email protected]>
Signed-off-by Arun Sharma <[email protected]>
xen/include/xen/lib.h +1 -1
@@ -21,7 +21,7 @@#define SWAP (_a, _b) \ do { typeof(_a) _t = (_a); (_a) = (_b); (_b) = _t; } while ( 0 ) -#define DIV_ROUND (x, y) (((x) + (y) - 1) / (y)) +#define DIV_ROUND (x, y) (((x) + (y) / 2) / (y))#define reserve_bootmem (_p,_l) ((void)0)