Skip to contentSkip to conversation

Host clock broke loadvm

Qemu-devel Juan Quintela 2 participants 2 messages Oct 7, 2009 – Oct 8, 2009

lore
Share & tools
lore
#0 lore raw

Hi Jan

Today I found that I am not able to load anymore old saved images (old means more than 2 days old). Problem is with host clock.

I need to run qemu with -rtc clock=vm, and then things cames to work again.

My suspicion is that the saved timers are based from cpu_clock_offset, and when we run now with host_clock, that value don't exist.

If I don't use -rtc clock=vm, machines will come eventually to life, but it will take several minutes.

Anthony asked to change pc-11 definition to use vm clock. What do you think? Any other good idea to make a machine saved with clock=vm to load with clock=host.

I tried the trial:

if (cpu_clock_offset != 0)
rtc_clock = vm_clock;

after loading an image, but that didn't fixed the problem (I didn't investigate more).

Do you have a plan to go from here?

Later, Juan.

#1 lore raw
Quoted 5 lines · Juan Quintela

Hi Jan

Today I found that I am not able to load anymore old saved images (old means more than 2 days old). Problem is with host clock.

Quoted 8 lines

I need to run qemu with -rtc clock=vm, and then things cames to work again.

My suspicion is that the saved timers are based from cpu_clock_offset, and when we run now with host_clock, that value don't exist.

If I don't use -rtc clock=vm, machines will come eventually to life, but it will take several minutes.

That makes sense as you cannot simply migrate timers between clocks (in this case, you would have to patch the timeout value of the rtc timer after resume).

Quoted 3 lines

Anthony asked to change pc-11 definition to use vm clock. What do you think?

Definitely makes sense, also for other reasons unrelated to save/restore.

Quoted 5 lines

Any other good idea to make a machine saved with clock=vm to
load with clock=host.

I tried the trial:

Quoted 7 lines

if (cpu_clock_offset != 0)
rtc_clock = vm_clock;

after loading an image, but that didn't fixed the problem (I didn't investigate more).

Do you have a plan to go from here?

I would say, first go for clock=vm for pc-11. Until someone comes up with a good reason to migrate from clock=vm to clock=host, don't try to be smarter than required.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux