1. 11 3月, 2011 1 次提交
  2. 04 3月, 2011 9 次提交
  3. 10 1月, 2011 1 次提交
  4. 17 12月, 2010 2 次提交
  5. 10 12月, 2010 1 次提交
  6. 03 12月, 2010 1 次提交
  7. 02 12月, 2010 3 次提交
  8. 23 11月, 2010 1 次提交
    • K
      xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs. · 12334715
      Konrad Rzeszutek Wilk 提交于
      When we allocate a vector for MSI/MSI-X we save away the PIRQ, and the
      vector value. When we unmap (de-allocate) the MSI/MSI-X vector(s) we
      need to provide the PIRQ and the vector value. What we did instead
      was to provide the GSI (which was zero) and the vector value, and we
      got these unhappy error messages:
      
      (XEN) irq.c:1575: dom0: pirq 0 not mapped
      [    7.733415] unmap irq failed -22
      
      This patches fixes this and we use the PIRQ value instead of the GSI
      value.
      
      CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      12334715
  9. 17 11月, 2010 2 次提交
  10. 11 11月, 2010 1 次提交
    • I
      xen: events: do not unmask event channels on resume · 6903591f
      Ian Campbell 提交于
      The IRQ core code will take care of disabling and reenabling
      interrupts over suspend resume automatically, therefore we do not need
      to do this in the Xen event channel code.
      
      The only exception is those event channels marked IRQF_NO_SUSPEND
      which the IRQ core ignores. We must unmask these ourselves, taking
      care to obey the current IRQ_DISABLED status. Failure check for
      IRQ_DISABLED leads to enabling polled only event channels, such as
      that associated with the pv spinlocks, which must never be enabled:
      
      [   21.970432] ------------[ cut here ]------------
      [   21.970432] kernel BUG at arch/x86/xen/spinlock.c:343!
      [   21.970432] invalid opcode: 0000 [#1] SMP
      [   21.970432] last sysfs file: /sys/devices/virtual/net/lo/operstate
      [   21.970432] Modules linked in:
      [   21.970432]
      [   21.970432] Pid: 0, comm: swapper Not tainted (2.6.32.24-x86_32p-xen-01034-g787c727 #34)
      [   21.970432] EIP: 0061:[<c102e209>] EFLAGS: 00010046 CPU: 3
      [   21.970432] EIP is at dummy_handler+0x3/0x7
      [   21.970432] EAX: 0000021c EBX: dfc16880 ECX: 0000001a EDX: 00000000
      [   21.970432] ESI: dfc02c00 EDI: 00000001 EBP: dfc47e10 ESP: dfc47e10
      [   21.970432]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0069
      [   21.970432] Process swapper (pid: 0, ti=dfc46000 task=dfc39440 task.ti=dfc46000)
      [   21.970432] Stack:
      [   21.970432]  dfc47e30 c10a39f0 0000021c 00000000 00000000 dfc16880 0000021c 00000001
      [   21.970432] <0> dfc47e40 c10a4f08 0000021c 00000000 dfc47e78 c12240a7 c1839284 c1839284
      [   21.970432] <0> 00000200 00000000 00000000 f5720000 c1f3d028 c1f3d02c 00000180 dfc47e90
      [   21.970432] Call Trace:
      [   21.970432]  [<c10a39f0>] ? handle_IRQ_event+0x5f/0x122
      [   21.970432]  [<c10a4f08>] ? handle_percpu_irq+0x2f/0x55
      [   21.970432]  [<c12240a7>] ? __xen_evtchn_do_upcall+0xdb/0x15f
      [   21.970432]  [<c122481e>] ? xen_evtchn_do_upcall+0x20/0x30
      [   21.970432]  [<c1030d47>] ? xen_do_upcall+0x7/0xc
      [   21.970432]  [<c102007b>] ? apic_reg_read+0xd3/0x22d
      [   21.970432]  [<c1002227>] ? hypercall_page+0x227/0x1005
      [   21.970432]  [<c102d30b>] ? xen_force_evtchn_callback+0xf/0x14
      [   21.970432]  [<c102da7c>] ? check_events+0x8/0xc
      [   21.970432]  [<c102da3b>] ? xen_irq_enable_direct_end+0x0/0x1
      [   21.970432]  [<c105e485>] ? finish_task_switch+0x62/0xba
      [   21.970432]  [<c14e3f84>] ? schedule+0x808/0x89d
      [   21.970432]  [<c1084dc5>] ? hrtimer_start_expires+0x1a/0x22
      [   21.970432]  [<c1085154>] ? tick_nohz_restart_sched_tick+0x15a/0x162
      [   21.970432]  [<c102f43a>] ? cpu_idle+0x6d/0x6f
      [   21.970432]  [<c14db29e>] ? cpu_bringup_and_idle+0xd/0xf
      [   21.970432] Code: 5d 0f 95 c0 0f b6 c0 c3 55 66 83 78 02 00 89 e5 5d 0f 95 \
      c0 0f b6 c0 c3 55 b2 01 86 10 31 c0 84 d2 89 e5 0f 94 c0 5d c3 55 89 e5 <0f> 0b \
      eb fe 55 80 3d 4c ce 84 c1 00 89 e5 57 56 89 c6 53 74 15
      [   21.970432] EIP: [<c102e209>] dummy_handler+0x3/0x7 SS:ESP 0069:dfc47e10
      [   21.970432] ---[ end trace c0b71f7e12cf3011 ]---
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      6903591f
  11. 23 10月, 2010 12 次提交
  12. 19 10月, 2010 1 次提交
  13. 18 10月, 2010 5 次提交
    • A
      xen/x86/PCI: Add support for the Xen PCI subsystem · b5401a96
      Alex Nixon 提交于
      The frontend stub lives in arch/x86/pci/xen.c, alongside other
      sub-arch PCI init code (e.g. olpc.c).
      
      It provides a mechanism for Xen PCI frontend to setup/destroy
      legacy interrupts, MSI/MSI-X, and PCI configuration operations.
      
      [ Impact: add core of Xen PCI support ]
      [ v2: Removed the IOMMU code and only focusing on PCI.]
      [ v3: removed usage of pci_scan_all_fns as that does not exist]
      [ v4: introduced pci_xen value to fix compile warnings]
      [ v5: squished fixes+features in one patch, changed Reviewed-by to Ccs]
      [ v7: added Acked-by]
      Signed-off-by: NAlex Nixon <alex.nixon@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Qing He <qing.he@intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      b5401a96
    • K
      xen: fix shared irq device passthrough · 15ebbb82
      Konrad Rzeszutek Wilk 提交于
      In driver/xen/events.c, whether bind_pirq is shareable or not is
      determined by desc->action is NULL or not. But in __setup_irq,
      startup(irq) is invoked before desc->action is assigned with
      new action. So desc->action in startup_irq is always NULL, and
      bind_pirq is always not shareable. This results in pt_irq_create_bind
      failure when passthrough a device which shares irq to other devices.
      
      This patch doesn't use probing_irq to determine if pirq is shareable
      or not, instead set shareable flag in irq_info according to trigger
      mode in xen_allocate_pirq. Set level triggered interrupts shareable.
      Thus use this flag to set bind_pirq flag accordingly.
      
      [v2: arch/x86/xen/pci.c no more, so file skipped]
      Signed-off-by: NWeidong Han <weidong.han@intel.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      15ebbb82
    • K
      xen: Provide a variant of xen_poll_irq with timeout. · d9a8814f
      Konrad Rzeszutek Wilk 提交于
      The 'xen_poll_irq_timeout' provides a method to pass in
      the poll timeout for IRQs if requested. We also export
      those two poll functions as Xen PCI fronted uses them.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      d9a8814f
    • K
      xen: Find an unbound irq number in reverse order (high to low). · 3a69e916
      Konrad Rzeszutek Wilk 提交于
      In earlier Xen Linux kernels, the IRQ mapping was a straight 1:1 and the
      find_unbound_irq started looking around 256 for open IRQs and up. IRQs
      from 0 to 255 were reserved for PCI devices.  Previous to this patch,
      the 'find_unbound_irq'  started looking at get_nr_hw_irqs() number.
      For privileged  domain where the ACPI information is available that
      returns the upper-bound of what the GSIs. For non-privileged PV domains,
      where ACPI is no-existent the get_nr_hw_irqs() reports the IRQ_LEGACY (16).
      With PCI passthrough enabled, and with PCI cards that have IRQs pinned
      to a higher number than 16 we collide with previously allocated IRQs.
      Specifically the PCI IRQs collide with the IPI's for Xen functions
      (as they are allocated earlier).
      For example:
      
      00:00.11 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller (prog-if 10 [OHCI])
      	...
      	Interrupt: pin A routed to IRQ 18
      
      [root@localhost ~]# cat /proc/interrupts | head
                 CPU0       CPU1       CPU2
       16:      38186          0          0   xen-dyn-virq      timer0
       17:        149          0          0   xen-dyn-ipi       spinlock0
       18:        962          0          0   xen-dyn-ipi       resched0
      
      and when the USB controller is loaded, the kernel reports:
      IRQ handler type mismatch for IRQ 18
      current handler: resched0
      
      One way to fix this is to reverse the logic when looking for un-used
      IRQ numbers and start with the highest available number. With that,
      we would get:
      
                 CPU0       CPU1       CPU2
      ... snip ..
      292:         35          0          0   xen-dyn-ipi       callfunc0
      293:       3992          0          0   xen-dyn-ipi       resched0
      294:        224          0          0   xen-dyn-ipi       spinlock0
      295:      57183          0          0   xen-dyn-virq      timer0
      NMI:          0          0          0   Non-maskable interrupts
      .. snip ..
      
      And interrupts for PCI cards are now accessible.
      
      This patch also includes the fix, found by Ian Campbell, titled
      "xen: fix off-by-one error in find_unbound_irq."
      
      [v2: Added an explanation in the code]
      [v3: Rebased on top of tip/irq/core]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      3a69e916
    • J
      xen: statically initialize cpu_evtchn_mask_p · 3b32f574
      Jeremy Fitzhardinge 提交于
      Sometimes cpu_evtchn_mask_p can get used early, before it has been
      allocated.  Statically initialize it with an initdata version to catch
      any early references.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      3b32f574