1. 10 9月, 2009 2 次提交
    • B
      KVM: PIT support for HPET legacy mode · e9f42757
      Beth Kon 提交于
      When kvm is in hpet_legacy_mode, the hpet is providing the timer
      interrupt and the pit should not be. So in legacy mode, the pit timer
      is destroyed, but the *state* of the pit is maintained. So if kvm or
      the guest tries to modify the state of the pit, this modification is
      accepted, *except* that the timer isn't actually started. When we exit
      hpet_legacy_mode, the current state of the pit (which is up to date
      since we've been accepting modifications) is used to restart the pit
      timer.
      
      The saved_mode code in kvm_pit_load_count temporarily changes mode to
      0xff in order to destroy the timer, but then restores the actual
      value, again maintaining "current" state of the pit for possible later
      reenablement.
      
      [avi: add some reserved storage in the ioctl; make SET_PIT2 IOW]
      [marcelo: fix memory corruption due to reserved storage]
      Signed-off-by: NBeth Kon <eak@us.ibm.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      e9f42757
    • J
      KVM: Allow PIT emulation without speaker port · c5ff41ce
      Jan Kiszka 提交于
      The in-kernel speaker emulation is only a dummy and also unneeded from
      the performance point of view. Rather, it takes user space support to
      generate sound output on the host, e.g. console beeps.
      
      To allow this, introduce KVM_CREATE_PIT2 which controls in-kernel
      speaker port emulation via a flag passed along the new IOCTL. It also
      leaves room for future extensions of the PIT configuration interface.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c5ff41ce
  2. 10 6月, 2009 2 次提交
  3. 24 3月, 2009 2 次提交
  4. 28 10月, 2008 1 次提交
  5. 15 10月, 2008 1 次提交
    • M
      KVM: PIT: fix injection logic and count · 3cf57fed
      Marcelo Tosatti 提交于
      The PIT injection logic is problematic under the following cases:
      
      1) If there is a higher priority vector to be delivered by the time
      kvm_pit_timer_intr_post is invoked ps->inject_pending won't be set.
      This opens the possibility for missing many PIT event injections (say if
      guest executes hlt at this point).
      
      2) ps->inject_pending is racy with more than two vcpus. Since there's no locking
      around read/dec of pt->pending, two vcpu's can inject two interrupts for a single
      pt->pending count.
      
      Fix 1 by using an irq ack notifier: only reinject when the previous irq
      has been acked. Fix 2 with appropriate locking around manipulation of
      pending count and irq_ack by the injection / ack paths.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      3cf57fed
  6. 27 4月, 2008 3 次提交