]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: handle PV timers oneshot mode
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 8 Feb 2022 20:21:29 +0000 (20:21 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 3 Mar 2022 15:36:36 +0000 (15:36 +0000)
commit95ef7259f38d1f1236f567d93d20d9ca40261f57
treef29ab6cc566bf66533444cb9710144af3d0d1d8c
parent890f61a2c35f375d607cbbb9e819c2f52a946151
KVM: x86/xen: handle PV timers oneshot mode

If the guest has offloaded the timer virq, handle the following
hypercalls for programming the timer:

    VCPUOP_set_singleshot_timer
    VCPUOP_stop_singleshot_timer
    set_timer_op(timestamp_ns)

The event channel corresponding to the timer virq is then used to inject
events once timer deadlines are met. For now we back the PV timer with
hrtimer.

[ dwmw2: Add save/restore, 32-bit compat mode, immediate delivery,
         don't check timer in kvm_vcpu_has_event() ]
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/irq.c
arch/x86/kvm/xen.c
arch/x86/kvm/xen.h
include/uapi/linux/kvm.h