diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-06 16:20:24 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-06 16:20:24 +0100 |
commit | df4d2e7b701450197d35aa851463e1329b20981c (patch) | |
tree | 405f31976e0b44e7573d495f56dc80332ec9fa9e /xen/arch/x86/hvm/i8254.c | |
parent | 9787d88dcf3e7c78c544840f420d3f194d80e631 (diff) | |
download | xen-df4d2e7b701450197d35aa851463e1329b20981c.tar.gz xen-df4d2e7b701450197d35aa851463e1329b20981c.tar.bz2 xen-df4d2e7b701450197d35aa851463e1329b20981c.zip |
x86 hvm: Support interrupt delivery for PIT channel 0 when in modes 3 and 4.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/i8254.c')
-rw-r--r-- | xen/arch/x86/hvm/i8254.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c index 493b7317b9..c41783feb0 100644 --- a/xen/arch/x86/hvm/i8254.c +++ b/xen/arch/x86/hvm/i8254.c @@ -206,19 +206,21 @@ static void pit_load_count(PITState *pit, int channel, int val) switch ( s->mode ) { - case 2: - /* Periodic timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, - &pit->count_load_time[channel]); - break; - case 1: - /* One-shot timer. */ - create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, - &pit->count_load_time[channel]); - break; - default: - destroy_periodic_time(&pit->pt0); - break; + case 2: + case 3: + /* Periodic timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired, + &pit->count_load_time[channel]); + break; + case 1: + case 4: + /* One-shot timer. */ + create_periodic_time(v, &pit->pt0, period, 0, 1, pit_time_fired, + &pit->count_load_time[channel]); + break; + default: + destroy_periodic_time(&pit->pt0); + break; } } |