>>> On 10.04.18 at 10:53, <roger....@citrix.com> wrote:
> On Mon, Apr 09, 2018 at 09:34:57AM -0600, Jan Beulich wrote:
>> >>> On 30.03.18 at 14:35, <roger....@citrix.com> wrote:
>> > Execute periodic_time callbacks even if the interrupt is not actually
>> > injected because the IRQ is masked.
>> > Current callbacks from emulated timer devices only update emulated
>> > registers, which from my reading of the specs should happen regardless
>> > of whether the interrupt has been injected or not.
>> While generally I agree, it also means extra work done. Looking
>> at the PIT case, for example, there's no strict need to do the
>> update when the IRQ is masked, as the value being updated is
>> only used to subtract from get_guest_time()'s return value.
>> Similarly for the LAPIC case.
>> In the RTC case your change actually looks risky, due to the
>> pt_dead_ticks logic. I can't help getting the impression that the
>> IRQ being off for 10 ticks would lead to no RTC interrupts at all
>> anymore for the guest (until something resets that counter),
>> which seems wrong to me.
> Hm, right. The RTC is already handled specially in order to not
> disable the timer but also don't call the handler if the IRQ is
> Maybe the right solution is to add some flags to the vpt code,
> something like:
> - DISABLE_ON_MASKED: only valid for periodic interrupts. Destroy the
> timer if the IRQ is masked when the timer fires.
> - SKIP_CALLBACK_ON_MASKED: do not execute the timer callback if the
> IRQ is masked when the timer fires.
> That AFAICT should allow Xen to keep the previous behaviour for
> existing timer code (and remove the RTC special casing).
Something like this, yes (I don't really like the names you suggest,
but I also can't suggest any better ones right away).
Xen-devel mailing list