1. 17 4月, 2013 1 次提交
  2. 01 3月, 2013 1 次提交
    • K
      xen/pci: We don't do multiple MSI's. · 884ac297
      Konrad Rzeszutek Wilk 提交于
      There is no hypercall to setup multiple MSI per PCI device.
      As such with these two new commits:
      -  08261d87
         PCI/MSI: Enable multiple MSIs with pci_enable_msi_block_auto()
      - 5ca72c4f
         AHCI: Support multiple MSIs
      
      we would call the PHYSDEVOP_map_pirq 'nvec' times with the same
      contents of the PCI device. Sander discovered that we would get
      the same PIRQ value 'nvec' times and return said values to the
      caller. That of course meant that the device was configured only
      with one MSI and AHCI would fail with:
      
      ahci 0000:00:11.0: version 3.0
      xen: registering gsi 19 triggering 0 polarity 1
      xen: --> pirq=19 -> irq=19 (gsi=19)
      (XEN) [2013-02-27 19:43:07] IOAPIC[0]: Set PCI routing entry (6-19 -> 0x99 -> IRQ 19 Mode:1 Active:1)
      ahci 0000:00:11.0: AHCI 0001.0200 32 slots 4 ports 6 Gbps 0xf impl SATA mode
      ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
      ahci: probe of 0000:00:11.0 failed with error -22
      
      That is b/c in ahci_host_activate the second call to
      devm_request_threaded_irq  would return -EINVAL as we passed in
      (on the second run) an IRQ that was never initialized.
      
      CC: stable@vger.kernel.org
      Reported-and-Tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      884ac297
  3. 22 5月, 2012 1 次提交
  4. 04 2月, 2012 1 次提交
  5. 13 1月, 2012 1 次提交
  6. 20 10月, 2011 1 次提交
  7. 23 9月, 2011 1 次提交
  8. 12 7月, 2011 10 次提交
  9. 08 7月, 2011 1 次提交
  10. 30 6月, 2011 1 次提交
    • K
      xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ. · 155a16f2
      Konrad Rzeszutek Wilk 提交于
      In the past we would use the GSI value to preset the ACPI SCI
      IRQ which worked great as GSI == IRQ:
      
      ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
      
      While that is most often seen, there are some oddities:
      
      ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level)
      
      which means that GSI 20 (or pin 20) is to be overriden for IRQ 9.
      Our code that presets the interrupt for ACPI SCI however would
      use the GSI 20 instead of IRQ 9 ending up with:
      
      xen: sci override: global_irq=20 trigger=0 polarity=1
      xen: registering gsi 20 triggering 0 polarity 1
      xen: --> pirq=20 -> irq=20
      xen: acpi sci 20
      .. snip..
      calling  acpi_init+0x0/0xbc @ 1
      ACPI: SCI (IRQ9) allocation failed
      ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20110413/evevent-119)
      ACPI: Unable to start the ACPI Interpreter
      
      as the ACPI interpreter made a call to 'acpi_gsi_to_irq' which got nine.
      It used that value to request an IRQ (request_irq) and since that was not
      present it failed.
      
      The fix is to recognize that for interrupts that are overriden (in our
      case we only care about the ACPI SCI) we should use the IRQ number
      to present the IRQ instead of the using GSI. End result is that we get:
      
      xen: sci override: global_irq=20 trigger=0 polarity=1
      xen: registering gsi 20 triggering 0 polarity 1
      xen: --> pirq=20 -> irq=9 (gsi=9)
      xen: acpi sci 9
      
      which fixes the ACPI interpreter failing on startup.
      
      CC: stable@kernel.org
      Reported-by: NLiwei <xieliwei@gmail.com>
      Tested-by: NLiwei <xieliwei@gmail.com>
      [http://lists.xensource.com/archives/html/xen-devel/2011-06/msg01727.html]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      155a16f2
  11. 17 5月, 2011 1 次提交
    • K
      xen/pci: Fix compiler error when CONFIG_XEN_PRIVILEGED_GUEST is not set. · 7c1bfd68
      Konrad Rzeszutek Wilk 提交于
      If we have CONFIG_XEN and the other parameters to build an
      Linux kernel that is non-privileged, the xen_[find|register|unregister]_
      device_domain_owner functions should not be compiled. They should
      use the nops defined in arch/x86/include/asm/xen/pci.h instead.
      
      This fixes:
      
      arch/x86/pci/xen.c:496: error: redefinition of ‘xen_find_device_domain_owner’
      arch/x86/include/asm/xen/pci.h:25: note: previous definition of ‘xen_find_device_domain_owner’ was here
      arch/x86/pci/xen.c:510: error: redefinition of ‘xen_register_device_domain_owner’
      arch/x86/include/asm/xen/pci.h:29: note: previous definition of ‘xen_register_device_domain_owner’ was here
      arch/x86/pci/xen.c:532: error: redefinition of ‘xen_unregister_device_domain_owner’
      arch/x86/include/asm/xen/pci.h:34: note: previous definition of ‘xen_unregister_device_domain_owner’ was here
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      7c1bfd68
  12. 14 4月, 2011 2 次提交
  13. 12 3月, 2011 1 次提交
  14. 11 3月, 2011 9 次提交
  15. 04 3月, 2011 1 次提交
  16. 19 2月, 2011 2 次提交
  17. 18 2月, 2011 1 次提交
  18. 02 12月, 2010 1 次提交
    • S
      xen: fix MSI setup and teardown for PV on HVM guests · af42b8d1
      Stefano Stabellini 提交于
      When remapping MSIs into pirqs for PV on HVM guests, qemu is responsible
      for doing the actual mapping and unmapping.
      We only give qemu the desired pirq number when we ask to do the mapping
      the first time, after that we should be reading back the pirq number
      from qemu every time we want to re-enable the MSI.
      
      This fixes a bug in xen_hvm_setup_msi_irqs that manifests itself when
      trying to enable the same MSI for the second time: the old MSI to pirq
      mapping is still valid at this point but xen_hvm_setup_msi_irqs would
      try to assign a new pirq anyway.
      A simple way to reproduce this bug is to assign an MSI capable network
      card to a PV on HVM guest, if the user brings down the corresponding
      ethernet interface and up again, Linux would fail to enable MSIs on the
      device.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      af42b8d1
  19. 09 11月, 2010 1 次提交
  20. 23 10月, 2010 2 次提交