qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [qemu-ppc] I find one qemu clock problem with kvm enabled


From: Wangkai (Kevin,C)
Subject: [Qemu-ppc] [qemu-ppc] I find one qemu clock problem with kvm enabled
Date: Mon, 28 Jan 2013 04:44:11 +0000

Hi Alex,

 

I find one qemu clock problem in the early version of qemu (0.10.5), and I checked

 

Maybe this issue existed in the new version.

 

This problem is a synchronization issue about qemu and kvm working together.

 

When qemu start a VM, a clock (signal timer) was created to do some work, and whe

The clock was expired, a signal was sent to qemu, if then the qemu was running in

The kvm, and when it called kvm_handle_exit, it would check if the qemu was signal

Pending, if so, qemu will exit kvm and return to user to do the clock work, such as

External interrupt and so on.

 

So, qemu was running in kvm for a while and exit kvm and run user mode for another while

To process some emulation work that kvm cannot do. If the kvm can process everything,

And kvm will not exit, such as cpu idle, and the qemu clock (signal timer) will force qemu

Exit kvm and return to qemu user to check if there some other works todo.

 

The clock working flow is:

| kvm run| -> |clock exp| -> |kvm signal check| -> |exit kvm| -> | clock callback|

-> |write pipe| -> |read pipe| -> | restart clock|

 

At one point, if qemu was running in user mode(not in kvm), and then the clock expired,

After clock callback processed, a pipe data written to notify qemu restart the clock again,

If then qemu call kvm_ioctl enter kvm, maybe never exit from kvm again, like this:

|clock exp| -> | clock callback| -> |write pipe| -> | kvm run| -> |read pipe| -> | restart clock|

 

Cause if guest kernel was idling, kvm was exit done by check the clock signal, and at this

Point the clock was not restarted, and none signals will be sent, and if qemu cannot

Exit kvm, the clock cannot be restarted, and locked each other...

 

 

Wangkai

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]