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
    • H
      KVM: Add MCE support · 890ca9ae
      Huang Ying 提交于
      The related MSRs are emulated. MCE capability is exported via
      extension KVM_CAP_MCE and ioctl KVM_X86_GET_MCE_CAP_SUPPORTED.  A new
      vcpu ioctl command KVM_X86_SETUP_MCE is used to setup MCE emulation
      such as the mcg_cap. MCE is injected via vcpu ioctl command
      KVM_X86_SET_MCE. Extended machine-check state (MCG_EXT_P) and CMCI are
      not implemented.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      890ca9ae
  2. 10 6月, 2009 1 次提交
    • S
      KVM: Enable MSI-X for KVM assigned device · d510d6cc
      Sheng Yang 提交于
      This patch finally enable MSI-X.
      
      What we need for MSI-X:
      1. Intercept one page in MMIO region of device. So that we can get guest desired
      MSI-X table and set up the real one. Now this have been done by guest, and
      transfer to kernel using ioctl KVM_SET_MSIX_NR and KVM_SET_MSIX_ENTRY.
      
      2. Information for incoming interrupt. Now one device can have more than one
      interrupt, and they are all handled by one workqueue structure. So we need to
      identify them. The previous patch enable gsi_msg_pending_bitmap get this done.
      
      3. Mapping from host IRQ to guest gsi as well as guest gsi to real MSI/MSI-X
      message address/data. We used same entry number for the host and guest here, so
      that it's easy to find the correlated guest gsi.
      
      What we lack for now:
      1. The PCI spec said nothing can existed with MSI-X table in the same page of
      MMIO region, except pending bits. The patch ignore pending bits as the first
      step (so they are always 0 - no pending).
      
      2. The PCI spec allowed to change MSI-X table dynamically. That means, the OS
      can enable MSI-X, then mask one MSI-X entry, modify it, and unmask it. The patch
      didn't support this, and Linux also don't work in this way.
      
      3. The patch didn't implement MSI-X mask all and mask single entry. I would
      implement the former in driver/pci/msi.c later. And for single entry, userspace
      should have reposibility to handle it.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d510d6cc
  3. 24 3月, 2009 3 次提交
    • A
      KVM: Avoid using CONFIG_ in userspace visible headers · 91b2ae77
      Avi Kivity 提交于
      Kconfig symbols are not available in userspace, and are not stripped by
      headers-install.  Avoid their use by adding #defines in <asm/kvm.h> to
      suit each architecture.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      91b2ae77
    • M
      KVM: PIT: provide an option to disable interrupt reinjection · 52d939a0
      Marcelo Tosatti 提交于
      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: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      52d939a0
    • J
      KVM: New guest debug interface · d0bfb940
      Jan Kiszka 提交于
      This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL
      instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic
      part, controlling the "main switch" and the single-step feature. The
      arch specific part adds an x86 interface for intercepting both types of
      debug exceptions separately and re-injecting them when the host was not
      interested. Moveover, the foundation for guest debugging via debug
      registers is layed.
      
      To signal breakpoint events properly back to userland, an arch-specific
      data block is now returned along KVM_EXIT_DEBUG. For x86, the arch block
      contains the PC, the debug exception, and relevant debug registers to
      tell debug events properly apart.
      
      The availability of this new interface is signaled by
      KVM_CAP_SET_GUEST_DEBUG. Empty stubs for not yet supported archs are
      provided.
      
      Note that both SVM and VTX are supported, but only the latter was tested
      yet. Based on the experience with all those VTX corner case, I would be
      fairly surprised if SVM will work out of the box.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d0bfb940
  4. 15 2月, 2009 1 次提交
  5. 31 1月, 2009 1 次提交
  6. 23 10月, 2008 2 次提交
  7. 15 10月, 2008 1 次提交
  8. 23 7月, 2008 1 次提交
    • V
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum 提交于
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  9. 20 7月, 2008 1 次提交
  10. 27 4月, 2008 2 次提交
  11. 31 1月, 2008 1 次提交
  12. 30 1月, 2008 8 次提交