[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vPT rework (and timer mode)

  • To: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 3 Jul 2020 16:02:44 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 03 Jul 2020 15:03:16 +0000
  • Ironport-sdr: vG574Rd6OoB1Efr/Jdl5cuCLYxoJKIA8GGEAAq3HtmQOdGKHvYVZf6SFQp1xxaNGXuWsI6Xa8v U8AUk/4KIbgsuKNLCkngh46JVx5/vPBZe50coLMX46gugaemkIOpLvxutnE40Sty1t3zHZSIcB TelkoHqTnySRT3lJdSENuvNMPKdzxIVXmdVaMRtfdrwEVWl8NqcbcjJ1wVQqoFApEp5kx8MkLX E6nt9BQFKrPBy+VoU7WFP0UZZMP1yV8pdPvO7i0HhUxEVXgw2a6pgG1h7ocVXXkLIBdayxXcqM /uU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03/07/2020 15:50, Jan Beulich wrote:
> On 01.07.2020 11:02, Roger Pau Monné wrote:
>> It's my understanding that the purpose of pt_update_irq and
>> pt_intr_post is to attempt to implement the "delay for missed ticks"
>> mode, where Xen will accumulate timer interrupts if they cannot be
>> injected. As shown by the patch above, this is all broken when the
>> timer is added to a vCPU (pt->vcpu) different than the actual target
>> vCPU where the interrupt gets delivered (note this can also be a list
>> of vCPUs if routed from the IO-APIC using Fixed mode).
>> I'm at lost at how to fix this so that virtual timers work properly
>> and we also keep the "delay for missed ticks" mode without doing a
>> massive rework and somehow keeping track of where injected interrupts
>> originated, which seems an overly complicated solution.
>> My proposal hence would be to completely remove the timer_mode, and
>> just treat virtual timer interrupts as other interrupts, ie: they will
>> be injected from the callback (pt_timer_fn) and the vCPU(s) would be
>> kicked. Whether interrupts would get lost (ie: injected when a
>> previous one is still pending) depends on the contention on the
>> system. I'm not aware of any current OS that uses timer interrupts as
>> a way to track time. I think current OSes know the differences between
>> a timer counter and an event timer, and will use them appropriately.
> Fundamentally - why not, the more that this promises to be a
> simplification. The question we need to answer up front is whether
> we're happy to possibly break old OSes (presumably ones no-one
> ought to be using anymore these days, due to their support life
> cycles long having ended).

The various timer modes were all compatibility, and IIRC, mostly for
Windows XP and older which told time by counting the number of timer

Paul - you might remember better than me?

Its possibly worth noting that issues in this are cause triple faults in
OVMF (it seems to enable interrupts in its timer handler), and breaks
in-guest kexec (because our timer-targetting logic doesn't work in a way
remotely close to real hardware when the kexec kernel is booting on a
non-zero vCPU).




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.