|
@@ -163,17 +163,8 @@ static CXLRetCode cmd_timestamp_get(struct cxl_cmd *cmd,
|
|
|
CXLDeviceState *cxl_dstate,
|
|
|
uint16_t *len)
|
|
|
{
|
|
|
- uint64_t time, delta;
|
|
|
- uint64_t final_time = 0;
|
|
|
-
|
|
|
- if (cxl_dstate->timestamp.set) {
|
|
|
- /* First find the delta from the last time the host set the time. */
|
|
|
- time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
|
|
|
- delta = time - cxl_dstate->timestamp.last_set;
|
|
|
- final_time = cxl_dstate->timestamp.host_set + delta;
|
|
|
- }
|
|
|
+ uint64_t final_time = cxl_device_get_timestamp(cxl_dstate);
|
|
|
|
|
|
- /* Then adjust the actual time */
|
|
|
stq_le_p(cmd->payload, final_time);
|
|
|
*len = 8;
|
|
|
|