KVM: PIT: support mode 3
PATCH 1/1 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 <[email protected]>
--- arch/x86/kvm/i8254.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/i8254.c +1 -0
@@ -293,6 +293,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 :
Signature · 13 lines
1.5.5 -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Avi Kivity
AppliedQuoted 9 lines · Aurelien Jarno
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.
Applied, thanks.
Signature · 8 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone