* [PATCH] KVM: PIT: support mode 3
@ 2008-05-02 15:02 Aurelien Jarno
2008-05-04 13:27 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2008-05-02 15:02 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel
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>
---
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 1646102..61cc450 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -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:
--
1.5.5
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: PIT: support mode 3
2008-05-02 15:02 [PATCH] KVM: PIT: support mode 3 Aurelien Jarno
@ 2008-05-04 13:27 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-05-04 13:27 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: kvm-devel
Aurelien Jarno wrote:
> 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.
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-04 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-02 15:02 [PATCH] KVM: PIT: support mode 3 Aurelien Jarno
2008-05-04 13:27 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox