mbox series

[0/2] KVM: Xen PV timer fixups

Message ID 20220309143835.253911-1-dwmw2@infradead.org (mailing list archive)
Headers show
Series KVM: Xen PV timer fixups | expand

Message

David Woodhouse March 9, 2022, 2:38 p.m. UTC
For squashing into the relevant commits already in kvm/queue, as discussed.

Note that I've switched the immediate timer delivery to just call the
xen_timer_callback() function, because I couldn't see *why* just setting
the ->arch.xen.timer_pending flag actually worked, without also setting
KVM_REQ_UNBLOCK. I suspect that the timer was only actually getting set
after the vCPU exited for some *other* reason. This should be better.

I'll follow up separately with a patch to remove __kvm_migrate_apic_timer
because it seems to be utterly pointless now.

David Woodhouse (2):
      KVM: x86/xen: PV oneshot timer fixes
      KVM: x86/xen: Update self test for Xen PV timers

 arch/x86/kvm/irq.c                                 |  1 -
 arch/x86/kvm/xen.c                                 | 37 +++++++++-------------
 arch/x86/kvm/xen.h                                 |  1 -
 .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 35 ++++++++++++++++++--
 4 files changed, 47 insertions(+), 27 deletions(-)

Comments

David Woodhouse March 9, 2022, 2:47 p.m. UTC | #1
On Wed, 2022-03-09 at 14:38 +0000, David Woodhouse wrote:
> I'll follow up separately with a patch to remove __kvm_migrate_apic_timer
> because it seems to be utterly pointless now.

No I won't, because that and the PIT timer can both be *periodic*, so
do potentially still want migrating for the original reasons described
in commit a3d7f85f471.

But the Xen one really is just oneshot, so will expire soon and be
restarted anyway, and will land on the right physical CPU then.