diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2008-05-02 15:02:23 (GMT) |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 09:40:49 (GMT) |
commit | f697554515b06e8d7264f316b25e6da943407142 (patch) | |
tree | f15a67cee17245c03f90c6a931b02fb34e687a4c /arch/x86/kvm/i8254.c | |
parent | 2e2e3738af33575cba59597acd5e80cdd5ec11ee (diff) | |
download | linux-fsl-qoriq-f697554515b06e8d7264f316b25e6da943407142.tar.xz |
KVM: PIT: support mode 3
The in-kernel PIT emulation ignores pending timers if operating
under mode 3, which for example Hurd uses.
This mode should output a square wave, high for (N+1)/2 counts and low
for (N-1)/2 counts. As we only care about the resulting interrupts, the
period is N, and mode 3 is the same as mode 2 with regard to
interrupts.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r-- | arch/x86/kvm/i8254.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 735ec9a..60074dc 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -308,6 +308,7 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val) create_pit_timer(&ps->pit_timer, val, 0); break; case 2: + case 3: create_pit_timer(&ps->pit_timer, val, 1); break; default: |