x86/vhpet: fix RTC special casing
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 4 Jun 2021 12:55:12 +0000 (14:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Jun 2021 12:55:12 +0000 (14:55 +0200)
commit9d963a7169a3b6e2e0fb9c8abc31c48064b2906d
tree38faee92d326acd9bdf1baa043415af7a3406664
parentb15c24a70c8be8b32f61b1962a6dc9df3d65ce78
x86/vhpet: fix RTC special casing

Restore setting the virtual timer callback private data to NULL if the
timer is not level triggered. This fixes the special casing done in
pt_update_irq so that the RTC interrupt when originating from the HPET
is suspended if the interrupt source is masked.

Note the RTC special casing done in pt_update_irq should only apply to
the RTC interrupt originating from the emulated RTC device (which does
set the callback private data), as in that case the callback itself
will destroy the virtual timer if the interrupt is ignored.

While there also use RTC_IRQ instead of 8 when the HPET is configured
in LegacyReplacement Mode.

Fixes: be07023be115 ("x86/vhpet: add support for level triggered interrupts")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 472a13988a051e5ae84b95815c6caf4378062abe
master date: 2021-05-07 10:43:29 +0200
xen/arch/x86/hvm/hpet.c