KVM: unify part of generic timer handling
Hide the internals of vcpu awakening / injection from the in-kernel emulated timers. This makes future changes in this logic easier and decreases the distance to more generic timer handling. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:

committed by
Avi Kivity

parent
fd66842370
commit
d3c7b77d1a
@@ -3,14 +3,6 @@
|
||||
|
||||
#include "iodev.h"
|
||||
|
||||
struct kvm_kpit_timer {
|
||||
struct hrtimer timer;
|
||||
int irq;
|
||||
s64 period; /* unit: ns */
|
||||
atomic_t pending;
|
||||
bool reinject;
|
||||
};
|
||||
|
||||
struct kvm_kpit_channel_state {
|
||||
u32 count; /* can be 65536 */
|
||||
u16 latched_count;
|
||||
@@ -29,7 +21,8 @@ struct kvm_kpit_channel_state {
|
||||
|
||||
struct kvm_kpit_state {
|
||||
struct kvm_kpit_channel_state channels[3];
|
||||
struct kvm_kpit_timer pit_timer;
|
||||
struct kvm_timer pit_timer;
|
||||
bool is_periodic;
|
||||
u32 speaker_data_on;
|
||||
struct mutex lock;
|
||||
struct kvm_pit *pit;
|
||||
|
Reference in New Issue
Block a user