/*********************************************************
- * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
"attempting BDOOR_CMD_GETTIME\n");
bp.in.cx.halfs.low = BDOOR_CMD_GETTIME;
Backdoor(&bp);
- hostSecs = bp.out.ax.word;
+ /*
+ * This backdoor returns uint32 time value in bp.out.ax.word or
+ * MAX_UINT32 in case of error.
+ */
+ if (bp.out.ax.word == MAX_UINT32) {
+ hostSecs = -1;
+ } else {
+ hostSecs = bp.out.ax.word;
+ }
}
}
hostUsecs = bp.out.bx.word;
/*********************************************************
- * Copyright (C) 2008-2016,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
/* Falling back to older command. */
bp.in.cx.halfs.low = BDOOR_CMD_GETTIME;
Backdoor(&bp);
- hostSecs = bp.out.ax.word;
+ /*
+ * This backdoor returns uint32 time value in bp.out.ax.word or
+ * MAX_UINT32 in case of error.
+ */
+ if (bp.out.ax.word == MAX_UINT32) {
+ hostSecs = -1;
+ } else {
+ hostSecs = bp.out.ax.word;
+ }
}
hostUsecs = bp.out.bx.word;