1. 24 3月, 2009 7 次提交
    • J
      KVM: MMU: handle compound pages in kvm_is_mmio_pfn · fc5659c8
      Joerg Roedel 提交于
      The function kvm_is_mmio_pfn is called before put_page is called on a
      page by KVM. This is a problem when when this function is called on some
      struct page which is part of a compund page. It does not test the
      reserved flag of the compound page but of the struct page within the
      compount page. This is a problem when KVM works with hugepages allocated
      at boot time. These pages have the reserved bit set in all tail pages.
      Only the flag in the compount head is cleared. KVM would not put such a
      page which results in a memory leak.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      Acked-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      fc5659c8
    • S
      KVM: Use irq routing API for MSI · 79950e10
      Sheng Yang 提交于
      Merge MSI userspace interface with IRQ routing table. Notice the API have been
      changed, and using IRQ routing table would be the only interface kvm-userspace
      supported.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      79950e10
    • M
      KVM: make irq ack notifications aware of routing table · 44882eed
      Marcelo Tosatti 提交于
      IRQ ack notifications assume an identity mapping between pin->gsi,
      which might not be the case with, for example, HPET.
      
      Translate before acking.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Acked-by: NGleb Natapov <gleb@redhat.com>
      44882eed
    • A
      KVM: Userspace controlled irq routing · 399ec807
      Avi Kivity 提交于
      Currently KVM has a static routing from GSI numbers to interrupts (namely,
      0-15 are mapped 1:1 to both PIC and IOAPIC, and 16:23 are mapped 1:1 to
      the IOAPIC).  This is insufficient for several reasons:
      
      - HPET requires non 1:1 mapping for the timer interrupt
      - MSIs need a new method to assign interrupt numbers and dispatch them
      - ACPI APIC mode needs to be able to reassign the PCI LINK interrupts to the
        ioapics
      
      This patch implements an interrupt routing table (as a linked list, but this
      can be easily changed) and a userspace interface to replace the table.  The
      routing table is initialized according to the current hardwired mapping.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      399ec807
    • A
      KVM: Interrupt mask notifiers for ioapic · 75858a84
      Avi Kivity 提交于
      Allow clients to request notifications when the guest masks or unmasks a
      particular irq line.  This complements irq ack notifications, as the guest
      will not ack an irq line that is masked.
      
      Currently implemented for the ioapic only.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      75858a84
    • S
      KVM: Add support to disable MSI for assigned device · 17071fe7
      Sheng Yang 提交于
      MSI is always enabled by default for msi2intx=1. But if msi2intx=0, we
      have to disable MSI if guest require to do so.
      
      The patch also discard unnecessary msi2intx judgment if guest want to update
      MSI state.
      
      Notice KVM_DEV_IRQ_ASSIGN_MSI_ACTION is a mask which should cover all MSI
      related operations, though we only got one for now.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      17071fe7
    • 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
  2. 15 2月, 2009 5 次提交
  3. 03 1月, 2009 6 次提交
  4. 31 12月, 2008 22 次提交