KVM: PIT: provide an option to disable interrupt reinjection

Certain clocks (such as TSC) in older 2.6 guests overaccount for lost
ticks, causing severe time drift. Interrupt reinjection magnifies the
problem.

Provide an option to disable it.

[avi: allow room for expansion in case we want to disable reinjection
      of other timers]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Marcelo Tosatti 2008-12-30 15:55:06 -02:00 committed by Avi Kivity
parent 61a6bd672b
commit 52d939a0bf
5 changed files with 35 additions and 0 deletions

View file

@ -396,6 +396,9 @@ struct kvm_trace_rec {
#if defined(CONFIG_X86)
#define KVM_CAP_SET_GUEST_DEBUG 23
#endif
#if defined(CONFIG_X86)
#define KVM_CAP_REINJECT_CONTROL 24
#endif
/*
* ioctls for VM fds
@ -429,6 +432,7 @@ struct kvm_trace_rec {
struct kvm_assigned_pci_dev)
#define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \
struct kvm_assigned_irq)
#define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71)
/*
* ioctls for vcpu fds