1. 09 Feb, 2016 1 commit
  2. 01 Oct, 2015 3 commits
    • Steve Rutherford's avatar
      KVM: x86: Add support for local interrupt requests from userspace · 1c1a9ce9
      Steve Rutherford authored
      In order to enable userspace PIC support, the userspace PIC needs to
      be able to inject local interrupts even when the APICs are in the
      kernel.
      
      KVM_INTERRUPT now supports sending local interrupts to an APIC when
      APICs are in the kernel.
      
      The ready_for_interrupt_request flag is now only set when the CPU/APIC
      will immediately accept and inject an interrupt (i.e. APIC has not
      masked the PIC).
      
      When the PIC wishes to initiate an INTA cycle with, say, CPU0, it
      kicks CPU0 out of the guest, and renedezvous with CPU0 once it arrives
      in userspace.
      
      When the CPU/APIC unmasks the PIC, a KVM_EXIT_IRQ_WINDOW_OPEN is
      triggered, so that userspace has a chance to inject a PIC interrupt
      if it had been pending.
      
      Overall, this design can lead to a small number of spurious userspace
      renedezvous. In particular, whenever the PIC transistions from low to
      high while it is masked and whenever the PIC becomes unmasked while
      it is low.
      
      Note: this does not buffer more than one local interrupt in the
      kernel, so the VMM needs to enter the guest in order to complete
      interrupt injection before injecting an additional interrupt.
      
      Compiles for x86.
      
      Can pass the KVM Unit Tests.
      Signed-off-by: default avatarSteve Rutherford <srutherford@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      1c1a9ce9
    • Steve Rutherford's avatar
      KVM: x86: Split the APIC from the rest of IRQCHIP. · 49df6397
      Steve Rutherford authored
      First patch in a series which enables the relocation of the
      PIC/IOAPIC to userspace.
      
      Adds capability KVM_CAP_SPLIT_IRQCHIP;
      
      KVM_CAP_SPLIT_IRQCHIP enables the construction of LAPICs without the
      rest of the irqchip.
      
      Compile tested for x86.
      Signed-off-by: default avatarSteve Rutherford <srutherford@google.com>
      Suggested-by: default avatarAndrew Honig <ahonig@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      49df6397
    • Paolo Bonzini's avatar
      KVM: x86: introduce lapic_in_kernel · 35754c98
      Paolo Bonzini authored
      Avoid pointer chasing and memory barriers, and simplify the code
      when split irqchip (LAPIC in kernel, IOAPIC/PIC in userspace)
      is introduced.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      35754c98
  3. 30 Jul, 2015 1 commit
    • Paolo Bonzini's avatar
      KVM: x86: clean/fix memory barriers in irqchip_in_kernel · 71ba994c
      Paolo Bonzini authored
      The memory barriers are trying to protect against concurrent RCU-based
      interrupt injection, but the IRQ routing table is not valid at the time
      kvm->arch.vpic is written.  Fix this by writing kvm->arch.vpic last.
      kvm_destroy_pic then need not set kvm->arch.vpic to NULL; modify it
      to take a struct kvm_pic* and reuse it if the IOAPIC creation fails.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      71ba994c
  4. 26 Mar, 2015 1 commit
  5. 20 Jul, 2012 1 commit
  6. 25 Sep, 2011 1 commit
    • Sasha Levin's avatar
      KVM: Intelligent device lookup on I/O bus · 743eeb0b
      Sasha Levin authored
      Currently the method of dealing with an IO operation on a bus (PIO/MMIO)
      is to call the read or write callback for each device registered
      on the bus until we find a device which handles it.
      
      Since the number of devices on a bus can be significant due to ioeventfds
      and coalesced MMIO zones, this leads to a lot of overhead on each IO
      operation.
      
      Instead of registering devices, we now register ranges which points to
      a device. Lookup is done using an efficient bsearch instead of a linear
      search.
      
      Performance test was conducted by comparing exit count per second with
      200 ioeventfds created on one byte and the guest is trying to access a
      different byte continuously (triggering usermode exits).
      Before the patch the guest has achieved 259k exits per second, after the
      patch the guest does 274k exits per second.
      
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      743eeb0b
  7. 11 May, 2011 1 commit
  8. 24 Oct, 2010 1 commit
  9. 08 Sep, 2010 1 commit
  10. 01 Aug, 2010 1 commit
  11. 25 Apr, 2010 1 commit
  12. 01 Mar, 2010 2 commits
  13. 03 Dec, 2009 2 commits
  14. 09 Sep, 2009 1 commit
  15. 24 Mar, 2009 1 commit
  16. 14 Feb, 2009 1 commit
  17. 31 Dec, 2008 3 commits
  18. 15 Oct, 2008 5 commits
  19. 20 Jul, 2008 1 commit
  20. 06 Jun, 2008 1 commit
  21. 27 Apr, 2008 1 commit
  22. 30 Jan, 2008 9 commits