17 Dec, 2011

1 commit


22 Nov, 2011

1 commit

  • Event channels exposed to userspace by the evtchn module may be used by
    other modules in an asynchronous manner, which requires that reference
    counting be used to prevent the event channel from being closed before
    the signals are delivered.

    The reference count on new event channels defaults to -1 which indicates
    the event channel is not referenced outside the kernel; evtchn_get fails
    if called on such an event channel. The event channels made visible to
    userspace by evtchn have a normal reference count.

    Signed-off-by: Daniel De Graaf
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     

07 Nov, 2011

1 commit

  • * 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: use static initializers in xen-balloon.c
    Xen: fix braces and tabs coding style issue in xenbus_probe.c
    Xen: fix braces coding style issue in xenbus_probe.h
    Xen: fix whitespaces,tabs coding style issue in drivers/xen/pci.c
    Xen: fix braces coding style issue in gntdev.c and grant-table.c
    Xen: fix whitespaces,tabs coding style issue in drivers/xen/events.c
    Xen: fix whitespaces,tabs coding style issue in drivers/xen/balloon.c

    Fix up trivial whitespace-conflicts in
    drivers/xen/{balloon.c,pci.c,xenbus/xenbus_probe.c}

    Linus Torvalds
     

26 Oct, 2011

1 commit


25 Oct, 2011

1 commit

  • …ci.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/drivers-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xenbus: don't rely on xen_initial_domain to detect local xenstore
    xenbus: Fix loopback event channel assuming domain 0
    xen/pv-on-hvm:kexec: Fix implicit declaration of function 'xen_hvm_domain'
    xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel
    xen/pv-on-hvm kexec: update xs_wire.h:xsd_sockmsg_type from xen-unstable
    xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel
    xen/pv-on-hvm kexec: rebind virqs to existing eventchannel ports
    xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive

    * 'stable/drivers.bugfixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pciback: Check if the device is found instead of blindly assuming so.
    xen/pciback: Do not dereference psdev during printk when it is NULL.
    xen: remove XEN_PLATFORM_PCI config option
    xen: XEN_PVHVM depends on PCI
    xen/pciback: double lock typo
    xen/pciback: use mutex rather than spinlock in vpci backend
    xen/pciback: Use mutexes when working with Xenbus state transitions.
    xen/pciback: miscellaneous adjustments
    xen/pciback: use mutex rather than spinlock in passthrough backend
    xen/pciback: use resource_size()

    * 'stable/pci.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pci: support multi-segment systems
    xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.
    xen/pci: make bus notifier handler return sane values
    xen-swiotlb: fix printk and panic args
    xen-swiotlb: Fix wrong panic.
    xen-swiotlb: Retry up three times to allocate Xen-SWIOTLB
    xen-pcifront: Update warning comment to use 'e820_host' option.

    Linus Torvalds
     

20 Oct, 2011

3 commits


17 Oct, 2011

1 commit

  • This adds a mechanism to resume selected IRQs during syscore_resume
    instead of dpm_resume_noirq.

    Under Xen we need to resume IRQs associated with IPIs early enough
    that the resched IPI is unmasked and we can therefore schedule
    ourselves out of the stop_machine where the suspend/resume takes
    place.

    This issue was introduced by 676dc3cf5bc3 "xen: Use IRQF_FORCE_RESUME".

    Signed-off-by: Ian Campbell
    Cc: Rafael J. Wysocki
    Cc: Jeremy Fitzhardinge
    Cc: xen-devel
    Cc: Konrad Rzeszutek Wilk
    Link: http://lkml.kernel.org/r/1318713254.11016.52.camel@dagon.hellion.org.uk
    Cc: stable@kernel.org (at least to 2.6.32.y)
    Signed-off-by: Thomas Gleixner

    Ian Campbell
     

15 Sep, 2011

1 commit

  • When we allocate/change the IRQ informations, we do not
    need to use spinlocks. We can use a mutex (which is
    what the generic IRQ code does for allocations/changes).
    Fixes a slew of:

    BUG: sleeping function called from invalid context at /linux/kernel/mutex.c:271
    in_atomic(): 1, irqs_disabled(): 0, pid: 3216, name: xenstored
    2 locks held by xenstored/3216:
    #0: (&u->bind_mutex){......}, at: [] evtchn_ioctl+0x30/0x3a0 [xen_evtchn]
    #1: (irq_mapping_update_lock){......}, at: [] bind_evtchn_to_irq+0x24/0x90
    Pid: 3216, comm: xenstored Not tainted 3.1.0-rc6-00021-g437a3d1 #2
    Call Trace:
    [] __might_sleep+0x100/0x130
    [] mutex_lock_nested+0x2f/0x50
    [] __irq_alloc_descs+0x49/0x200
    [] ? evtchn_ioctl+0x30/0x3a0 [xen_evtchn]
    [] xen_allocate_irq_dynamic+0x34/0x70
    [] bind_evtchn_to_irq+0x5d/0x90
    [] ? evtchn_bind_to_user+0x60/0x60 [xen_evtchn]
    [] bind_evtchn_to_irqhandler+0x32/0x80
    [] evtchn_bind_to_user+0x49/0x60 [xen_evtchn]
    [] evtchn_ioctl+0x144/0x3a0 [xen_evtchn]
    [] ? vfsmount_lock_local_unlock+0x50/0x80
    [] do_vfs_ioctl+0x9a/0x5e0
    [] ? mntput+0x1f/0x30
    [] ? fput+0x199/0x240
    [] sys_ioctl+0xa1/0xb0
    [] system_call_fastpath+0x16/0x1b

    Reported-by: Jim Burns
    Acked-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

01 Sep, 2011

1 commit

  • During a kexec boot some virqs such as timer and debugirq were already
    registered by the old kernel. The hypervisor will return -EEXISTS from
    the new EVTCHNOP_bind_virq request and the BUG in bind_virq_to_irq()
    triggers. Catch the -EEXISTS error and loop through all possible ports to find
    what port belongs to the virq/cpu combo.

    Signed-off-by: Olaf Hering
    [v2:
    - use NR_EVENT_CHANNELS instead of private MAX_EVTCHNS]
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     

27 Jul, 2011

1 commit


12 Jul, 2011

2 commits


16 Jun, 2011

1 commit


31 May, 2011

1 commit


20 May, 2011

2 commits

  • …stable/mmu.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/irq' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: do not clear and mask evtchns in __xen_evtchn_do_upcall

    * 'stable/p2m.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/p2m: Create entries in the P2M_MFN trees's to track 1-1 mappings

    * 'stable/e820.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/setup: Fix for incorrect xen_extra_mem_start initialization under 32-bit
    xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings.

    * 'stable/mmu.bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen mmu: fix a race window causing leave_mm BUG()

    Linus Torvalds
     
  • …rnel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/backend.base.v3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pci: Fix compiler error when CONFIG_XEN_PRIVILEGED_GUEST is not set.
    xen/p2m: Add EXPORT_SYMBOL_GPL to the M2P override functions.
    xen/p2m/m2p/gnttab: Support GNTMAP_host_map in the M2P override.
    xen/irq: The Xen hypervisor cleans up the PIRQs if the other domain forgot.
    xen/irq: Export 'xen_pirq_from_irq' function.
    xen/irq: Add support to check if IRQ line is shared with other domains.
    xen/irq: Check if the PCI device is owned by a domain different than DOMID_SELF.
    xen/pci: Add xen_[find|register|unregister]_device_domain_owner functions.

    * 'stable/gntalloc.v7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/gntdev,gntalloc: Remove unneeded VM flags

    Linus Torvalds
     

11 May, 2011

1 commit

  • Change the irq handler of evtchns and pirqs that don't need EOI (pirqs
    that correspond to physical edge interrupts) to handle_edge_irq.

    Use handle_fasteoi_irq for pirqs that need eoi (they generally
    correspond to level triggered irqs), no risk in loosing interrupts
    because we have to EOI the irq anyway.

    This change has the following benefits:

    - it uses the very same handlers that Linux would use on native for the
    same irqs (handle_edge_irq for edge irqs and msis, and
    handle_fasteoi_irq for everything else);

    - it uses these handlers in the same way native code would use them: it
    let Linux mask\unmask and ack the irq when Linux want to mask\unmask
    and ack the irq;

    - it fixes a problem occurring when a driver calls disable_irq() in its
    handler: the old code was unconditionally unmasking the evtchn even if
    the irq is disabled when irq_eoi was called.

    See Documentation/DocBook/genericirq.tmpl for more informations.

    Signed-off-by: Stefano Stabellini
    [v1: Fixed space/tab issues]
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

14 Apr, 2011

4 commits


12 Apr, 2011

1 commit


31 Mar, 2011

2 commits


29 Mar, 2011

2 commits


18 Mar, 2011

1 commit

  • …it.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/irq.fairness' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: events: Remove redundant clear of l2i at end of round-robin loop
    xen: events: Make round-robin scan fairer by snapshotting each l2 word once only
    xen: events: Clean up round-robin evtchn scan.
    xen: events: Make last processed event channel a per-cpu variable.
    xen: events: Process event channels notifications in round-robin order.

    * 'stable/irq.ween_of_nr_irqs' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: events: Fix compile error if CONFIG_SMP is not defined.
    xen: events: correct locking in xen_irq_from_pirq
    xen: events: propagate irq allocation failure instead of panicking
    xen: events: do not workaround too-small nr_irqs
    xen: events: remove use of nr_irqs as upper bound on number of pirqs
    xen: events: dynamically allocate irq info structures
    xen: events: maintain a list of Xen interrupts
    xen: events: push setup of irq<->{evtchn,ipi,virq,pirq} maps into irq_info init functions
    xen: events: turn irq_info constructors into initialiser functions
    xen: events: use per-cpu variable for cpu_evtchn_mask
    xen: events: refactor GSI pirq bindings functions
    xen: events: rename restore_cpu_pirqs -> restore_pirqs
    xen: events: remove unused public functions
    xen: events: fix xen_map_pirq_gsi error return
    xen: events: simplify comment
    xen: events: separate two unrelated halves of if condition

    Fix up trivial conflicts in drivers/xen/events.c

    Linus Torvalds
     

17 Mar, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
    bonding: enable netpoll without checking link status
    xfrm: Refcount destination entry on xfrm_lookup
    net: introduce rx_handler results and logic around that
    bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
    bonding: wrap slave state work
    net: get rid of multiple bond-related netdevice->priv_flags
    bonding: register slave pointer for rx_handler
    be2net: Bump up the version number
    be2net: Copyright notice change. Update to Emulex instead of ServerEngines
    e1000e: fix kconfig for crc32 dependency
    netfilter ebtables: fix xt_AUDIT to work with ebtables
    xen network backend driver
    bonding: Improve syslog message at device creation time
    bonding: Call netif_carrier_off after register_netdevice
    bonding: Incorrect TX queue offset
    net_sched: fix ip_tos2prio
    xfrm: fix __xfrm_route_forward()
    be2net: Fix UDP packet detected status in RX compl
    Phonet: fix aligned-mode pipe socket buffer header reserve
    netxen: support for GbE port settings
    ...

    Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
    with the staging updates.

    Linus Torvalds
     

16 Mar, 2011

3 commits

  • * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (116 commits)
    x86: Enable forced interrupt threading support
    x86: Mark low level interrupts IRQF_NO_THREAD
    x86: Use generic show_interrupts
    x86: ioapic: Avoid redundant lookup of irq_cfg
    x86: ioapic: Use new move_irq functions
    x86: Use the proper accessors in fixup_irqs()
    x86: ioapic: Use irq_data->state
    x86: ioapic: Simplify irq chip and handler setup
    x86: Cleanup the genirq name space
    genirq: Add chip flag to force mask on suspend
    genirq: Add desc->irq_data accessor
    genirq: Add comments to Kconfig switches
    genirq: Fixup fasteoi handler for oneshot mode
    genirq: Provide forced interrupt threading
    sched: Switch wait_task_inactive to schedule_hrtimeout()
    genirq: Add IRQF_NO_THREAD
    genirq: Allow shared oneshot interrupts
    genirq: Prepare the handling of shared oneshot interrupts
    genirq: Make warning in handle_percpu_event useful
    x86: ioapic: Move trigger defines to io_apic.h
    ...

    Fix up trivial(?) conflicts in arch/x86/pci/xen.c due to genirq name
    space changes clashing with the Xen cleanups. The set_irq_msi() had
    moved to xen_bind_pirq_msi_to_irq().

    Linus Torvalds
     
  • drivers/xen/events.c:396: error: 'struct irq_data' has no member named 'affinity'

    Reported-by: Randy Dunlap
    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • …git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/ia64' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: ia64 build broken due to "xen: switch to new schedop hypercall by default."

    * 'stable/blkfront-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: Union the blkif_request request specific fields

    * 'stable/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: annotate functions which only call into __init at start of day
    xen p2m: annotate variable which appears unused
    xen: events: mark cpu_evtchn_mask_p as __refdata

    Linus Torvalds
     

14 Mar, 2011

1 commit


11 Mar, 2011

6 commits