1. 18 10月, 2016 1 次提交
  2. 22 7月, 2016 1 次提交
    • P
      kvm-irqchip: i386: add hook for add/remove virq · 38d87493
      Peter Xu 提交于
      Adding two hooks to be notified when adding/removing msi routes. There
      are two kinds of MSI routes:
      
      - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by
        vhost, vfio, etc.
      
      - in kvm_irqchip_send_msi(): when sending direct MSI message, if
        direct MSI not allowed, we will first create one MSI route entry
        in the kernel, then trigger it.
      
      This patch only hooks the first one (irqfd case). We do not need to
      take care for the 2nd one, since it's only used by QEMU userspace
      (kvm-apic) and the messages will always do in-time translation when
      triggered. While we need to note them down for the 1st one, so that we
      can notify the kernel when cache invalidation happens.
      
      Also, we do not hook IOAPIC msi routes (we have explicit notifier for
      IOAPIC to keep its cache updated). We only need to care about irqfd
      users.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      38d87493
  3. 17 6月, 2016 1 次提交
  4. 19 5月, 2016 1 次提交
  5. 31 3月, 2016 1 次提交
  6. 19 1月, 2016 1 次提交
  7. 18 12月, 2015 1 次提交
    • P
      kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP · 15eafc2e
      Paolo Bonzini 提交于
      This patch adds support for split IRQ chip mode. When
      KVM_CAP_SPLIT_IRQCHIP is enabled:
      
          1.) The PIC, PIT, and IOAPIC are implemented in userspace while
          the LAPIC is implemented by KVM.
      
          2.) The software IOAPIC delivers interrupts to the KVM LAPIC via
          kvm_set_irq. Interrupt delivery is configured via the MSI routing
          table, for which routes are reserved in target-i386/kvm.c then
          configured in hw/intc/ioapic.c
      
          3.) KVM delivers IOAPIC EOIs via a new exit KVM_EXIT_IOAPIC_EOI,
          which is handled in target-i386/kvm.c and relayed to the software
          IOAPIC via ioapic_eoi_broadcast.
      Signed-off-by: NMatt Gingell <gingell@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      15eafc2e
  8. 17 12月, 2015 2 次提交
  9. 19 10月, 2015 1 次提交
    • P
      kvm: Pass PCI device pointer to MSI routing functions · dc9f06ca
      Pavel Fedin 提交于
      In-kernel ITS emulation on ARM64 will require to supply requester IDs.
      These IDs can now be retrieved from the device pointer using new
      pci_requester_id() function.
      
      This patch adds pci_dev pointer to KVM GSI routing functions and makes
      callers passing it.
      
      x86 architecture does not use requester IDs, but hw/i386/kvm/pci-assign.c
      also made passing PCI device pointer instead of NULL for consistency with
      the rest of the code.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Message-Id: <ce081423ba2394a4efc30f30708fca07656bc500.1444916432.git.p.fedin@samsung.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dc9f06ca
  10. 24 9月, 2015 1 次提交
  11. 21 7月, 2015 1 次提交
  12. 02 6月, 2015 1 次提交
  13. 30 4月, 2015 1 次提交
  14. 02 4月, 2015 1 次提交
  15. 12 3月, 2015 1 次提交
  16. 12 1月, 2015 1 次提交
  17. 11 12月, 2014 2 次提交
    • C
      target-arm: Check error conditions on kvm_arm_reset_vcpu · 25f2895e
      Christoffer Dall 提交于
      When resetting a VCPU we currently call both kvm_arm_vcpu_init() and
      write_kvmstate_to_list(), both of which can fail, but we never check the
      return value.
      
      The only choice here is to print an error an exit if the calls fail.
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1418039630-11773-1-git-send-email-christoffer.dall@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      25f2895e
    • A
      target-arm/kvm: make reg sync code common between kvm32/64 · 38df27c8
      Alex Bennée 提交于
      Before we launch a guest we query KVM for the list of "co-processor"
      registers it knows about. This is used to synchronize system
      register state for the bulk of coprocessor/system registers.
      Move this code from the 32-bit specific vcpu init function into
      a common routine and call it also from the 64-bit vcpu init.
      
      This allows system registers to migrate correctly when using
      KVM, and also permits QEMU code to see the current KVM register
      state (which will be needed to support big-endian guests, since
      the virtio endianness callback must check for some system register
      settings).
      
      Since vcpu reset also has to sync registers, we move the
      32 bit kvm_arm_reset_vcpu() into common code as well and
      share it with the 64 bit version.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      [PMM: just copy the 32-bit code rather than improving it along the way;
       don't share reg_syncs_via_tuple_list() between 32 and 64 bit;
       tweak function names; move reset]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      38df27c8
  18. 20 6月, 2014 1 次提交
  19. 27 2月, 2014 1 次提交
    • C
      arm: vgic device control api support · 1da41cc1
      Christoffer Dall 提交于
      Support creating the ARM vgic device through the device control API and
      setting the base address for the distributor and cpu interfaces in KVM
      VMs using this API.
      
      Because the older KVM_CREATE_IRQCHIP interface needs the irq chip to be
      created prior to creating the VCPUs, we first test if we can use the
      device control API in kvm_arch_irqchip_create (using the test flag from
      the device control API).  If we cannot, it means we have to fall back to
      KVM_CREATE_IRQCHIP and use the older ioctl at this point in time.  If
      however, we can use the device control API, we don't do anything and
      wait until the arm_gic_kvm driver initializes and let that use the
      device control API.
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Message-id: 1392687720-26806-5-git-send-email-christoffer.dall@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      1da41cc1
  20. 18 12月, 2013 2 次提交
  21. 10 12月, 2013 4 次提交
  22. 31 10月, 2013 1 次提交
  23. 04 7月, 2013 1 次提交
    • P
      memory: add ref/unref calls · dfde4e6e
      Paolo Bonzini 提交于
      Add ref/unref calls at the following places:
      
      - places where memory regions are stashed by a listener and
        used outside the BQL (including in Xen or KVM).
      
      - memory_region_find callsites
      
      - creation of aliases and containers (only the aliased/contained
        region gets a reference to avoid loops)
      
      - around calls to del_subregion/add_subregion, where the region
        could disappear after the first call
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dfde4e6e
  24. 26 6月, 2013 4 次提交
  25. 12 6月, 2013 1 次提交
  26. 04 5月, 2013 1 次提交
  27. 15 4月, 2013 1 次提交
  28. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  29. 05 3月, 2013 3 次提交