summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8254.c
diff options
context:
space:
mode:
authorSheng Yang <sheng.yang@intel.com>2008-03-03 16:50:59 (GMT)
committerAvi Kivity <avi@qumranet.com>2008-04-27 09:00:22 (GMT)
commite0f63cb9277b64850854aee301762beeeb463473 (patch)
treeae10bac92ee6cc1a658b479a311fac67ebd3524c /arch/x86/kvm/i8254.c
parent7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a (diff)
downloadlinux-e0f63cb9277b64850854aee301762beeeb463473.tar.xz
KVM: Add save/restore supporting of in kernel PIT
Signed-off-by: Sheng Yang <sheng.yang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r--arch/x86/kvm/i8254.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index c743509..8642f9d 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -288,6 +288,13 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)
}
}
+void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val)
+{
+ mutex_lock(&kvm->arch.vpit->pit_state.lock);
+ pit_load_count(kvm, channel, val);
+ mutex_unlock(&kvm->arch.vpit->pit_state.lock);
+}
+
static void pit_ioport_write(struct kvm_io_device *this,
gpa_t addr, int len, const void *data)
{