07 Nov, 2011

3 commits

  • * '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
     
  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     
  • * 'stable/vmalloc-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    net: xen-netback: use API provided by xenbus module to map rings
    block: xen-blkback: use API provided by xenbus module to map rings
    xen: use generic functions instead of xen_{alloc, free}_vm_area()

    Linus Torvalds
     

01 Nov, 2011

2 commits


26 Oct, 2011

1 commit


25 Oct, 2011

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits)
    dp83640: free packet queues on remove
    dp83640: use proper function to free transmit time stamping packets
    ipv6: Do not use routes from locally generated RAs
    |PATCH net-next] tg3: add tx_dropped counter
    be2net: don't create multiple RX/TX rings in multi channel mode
    be2net: don't create multiple TXQs in BE2
    be2net: refactor VF setup/teardown code into be_vf_setup/clear()
    be2net: add vlan/rx-mode/flow-control config to be_setup()
    net_sched: cls_flow: use skb_header_pointer()
    ipv4: avoid useless call of the function check_peer_pmtu
    TCP: remove TCP_DEBUG
    net: Fix driver name for mdio-gpio.c
    ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT
    rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces
    ipv4: fix ipsec forward performance regression
    jme: fix irq storm after suspend/resume
    route: fix ICMP redirect validation
    net: hold sock reference while processing tx timestamps
    tcp: md5: add more const attributes
    Add ethtool -g support to virtio_net
    ...

    Fix up conflicts in:
    - drivers/net/Kconfig:
    The split-up generated a trivial conflict with removal of a
    stale reference to Documentation/networking/net-modules.txt.
    Remove it from the new location instead.
    - fs/sysfs/dir.c:
    Fairly nasty conflicts with the sysfs rb-tree usage, conflicting
    with Eric Biederman's changes for tagged directories.

    Linus Torvalds
     
  • …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
     
  • ….org/pub/scm/linux/kernel/git/konrad/xen

    * 'stable/bug.fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/p2m/debugfs: Make type_name more obvious.
    xen/p2m/debugfs: Fix potential pointer exception.
    xen/enlighten: Fix compile warnings and set cx to known value.
    xen/xenbus: Remove the unnecessary check.
    xen/irq: If we fail during msi_capability_init return proper error code.
    xen/events: Don't check the info for NULL as it is already done.
    xen/events: BUG() when we can't allocate our event->irq array.

    * 'stable/mmu.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: Fix selfballooning and ensure it doesn't go too far
    xen/gntdev: Fix sleep-inside-spinlock
    xen: modify kernel mappings corresponding to granted pages
    xen: add an "highmem" parameter to alloc_xenballooned_pages
    xen/p2m: Use SetPagePrivate and its friends for M2P overrides.
    xen/p2m: Make debug/xen/mmu/p2m visible again.
    Revert "xen/debug: WARN_ON when identity PFN has no _PAGE_IOMAP flag set."

    Linus Torvalds
     

20 Oct, 2011

6 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 Oct, 2011

1 commit

  • The balloon driver's "current_pages" is very different from
    totalram_pages. Self-ballooning needs to be driven by
    the latter. Also, Committed_AS doesn't account for pages
    used by the kernel so:
    1) Add totalreserve_pages to Committed_AS for the normal target.
    2) Enforce a floor for when there are little or no user-space threads
    using memory (e.g. single-user mode) to avoid OOMs. The floor
    function includes a "min_usable_mb" tuneable in case we discover
    later that the floor function is still too aggressive in some
    workloads, though likely it will not be needed.

    Changes since version 4:
    - change floor calculation so that it is not as aggressive; this version
    uses a piecewise linear function similar to minimum_target in the 2.6.18
    balloon driver, but modified to add to totalreserve_pages instead of
    subtract from max_pfn, the 2.6.18 version causes OOMs on recent kernels
    because the kernel has expanded over time
    - change safety_margin to min_usable_mb and comment on its use
    - since committed_as does NOT include kernel space (and other reserved
    pages), totalreserve_pages is now added to committed_as. The result is
    less aggressive self-ballooning, but theoretically more appropriate.
    Changes since version 3:
    - missing include causes compile problem when CONFIG_FRONTSWAP is disabled
    - add comments after includes
    Changes since version 2:
    - missing include causes compile problem only on 32-bit
    Changes since version 1:
    - tuneable safety margin added

    [v5: avi.miller@oracle.com: still too aggressive, seeing some OOMs]
    [v4: konrad.wilk@oracle.com: fix compile when CONFIG_FRONTSWAP is disabled]
    [v3: guru.anbalagane@oracle.com: fix 32-bit compile]
    [v2: konrad.wilk@oracle.com: make safety margin tuneable]
    Signed-off-by: Dan Magenheimer
    [v1: Altered description and added an extra include]
    Signed-off-by: Konrad Rzeszutek Wilk

    Dan Magenheimer
     

14 Oct, 2011

3 commits

  • BUG: sleeping function called from invalid context at /local/scratch/dariof/linux/kernel/mutex.c:271
    in_atomic(): 1, irqs_disabled(): 0, pid: 3256, name: qemu-dm
    1 lock held by qemu-dm/3256:
    #0: (&(&priv->lock)->rlock){......}, at: [] gntdev_ioctl+0x2bd/0x4d5
    Pid: 3256, comm: qemu-dm Tainted: G W 3.1.0-rc8+ #5
    Call Trace:
    [] __might_sleep+0x131/0x135
    [] mutex_lock_nested+0x25/0x45
    [] free_xenballooned_pages+0x20/0xb1
    [] gntdev_put_map+0xa8/0xdb
    [] ? _raw_spin_lock+0x71/0x7a
    [] ? gntdev_ioctl+0x2bd/0x4d5
    [] gntdev_ioctl+0x31f/0x4d5
    [] ? check_events+0x12/0x20
    [] do_vfs_ioctl+0x488/0x4d7
    [] ? xen_restore_fl_direct_reloc+0x4/0x4
    [] ? lock_release+0x21c/0x229
    [] ? rcu_read_unlock+0x21/0x32
    [] sys_ioctl+0x47/0x6a
    [] system_call_fastpath+0x16/0x1b

    gntdev_put_map tries to acquire a mutex when freeing pages back to the
    xenballoon pool, so it cannot be called with a spinlock held. In
    gntdev_release, the spinlock is not needed as we are freeing the
    structure later; in the ioctl, only the list manipulation needs to be
    under the lock.

    Reported-and-Tested-By: Dario Faggioli
    Signed-off-by: Daniel De Graaf
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     
  • The xenstore daemon does not have to run in the xen initial domain;
    however, Linux currently uses xen_initial_domain to test if a loopback
    event channel should be used instead of the event channel provided in
    Xen's start_info structure. Instead, if the event channel passed in the
    start_info structure is not valid, assume that this domain will run
    xenstored locally and set up the event channel.

    Signed-off-by: Daniel De Graaf
    Reviewed-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     
  • The xenbus event channel established in xenbus_init is intended to be a
    loopback channel, but the remote domain was hardcoded to 0; this will
    cause the channel to be unusable when xenstore is not being run in
    domain 0.

    Signed-off-by: Daniel De Graaf
    Reviewed-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Daniel De Graaf
     

30 Sep, 2011

1 commit


29 Sep, 2011

7 commits

  • Allow the xen balloon driver to populate its list of extra pages from
    more than one region of memory. This will allow platforms to provide
    (for example) a region of low memory and a region of high memory.

    The maximum possible number of extra regions is 128 (== E820MAX) which
    is quite large so xen_extra_mem is placed in __initdata. This is safe
    as both xen_memory_setup() and balloon_init() are in __init.

    The balloon regions themselves are not altered (i.e., there is still
    only the one region).

    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • When initializing the balloon only max_pfn needs to be checked
    (max_pfn will always be
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • In xen_memory_setup() pages that occur in gaps in the memory map are
    released back to Xen. This reduces the domain's current page count in
    the hypervisor. The Xen balloon driver does not correctly decrease
    its initial current_pages count to reflect this. If 'delta' pages are
    released and the target is adjusted the resulting reservation is
    always 'delta' less than the requested target.

    This affects dom0 if the initial allocation of pages overlaps the PCI
    memory region but won't affect most domU guests that have been setup
    with pseudo-physical memory maps that don't have gaps.

    Fix this by accouting for the released pages when starting the balloon
    driver.

    If the domain's targets are managed by xapi, the domain may eventually
    run out of memory and die because xapi currently gets its target
    calculations wrong and whenever it is restarted it always reduces the
    target by 'delta'.

    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • Xen PVHVM needs xen-platform-pci, on the other hand xen-platform-pci is
    useless in any other cases.
    Therefore remove the XEN_PLATFORM_PCI config option and compile
    xen-platform-pci built-in if XEN_PVHVM is selected.

    Changes to v1:

    - remove xen-platform-pci.o and just use platform-pci.o since it is not
    externally visible anymore.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • We called mutex_lock() twice instead of unlocking.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Konrad Rzeszutek Wilk

    Dan Carpenter
     
  • If we want to use granted pages for AIO, changing the mappings of a user
    vma and the corresponding p2m is not enough, we also need to update the
    kernel mappings accordingly.
    Currently this is only needed for pages that are created for user usages
    through /dev/xen/gntdev. As in, pages that have been in use by the
    kernel and use the P2M will not need this special mapping.
    However there are no guarantees that in the future the kernel won't
    start accessing pages through the 1:1 even for internal usage.

    In order to avoid the complexity of dealing with highmem, we allocated
    the pages lowmem.
    We issue a HYPERVISOR_grant_table_op right away in
    m2p_add_override and we remove the mappings using another
    HYPERVISOR_grant_table_op in m2p_remove_override.
    Considering that m2p_add_override and m2p_remove_override are called
    once per page we use multicalls and hypercall batching.

    Use the kmap_op pointer directly as argument to do the mapping as it is
    guaranteed to be present up until the unmapping is done.
    Before issuing any unmapping multicalls, we need to make sure that the
    mapping has already being done, because we need the kmap->handle to be
    set correctly.

    Signed-off-by: Stefano Stabellini
    [v1: Removed GRANT_FRAME_BIT usage]
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     
  • Add an highmem parameter to alloc_xenballooned_pages, to allow callers to
    request lowmem or highmem pages.

    Fix the code style of free_xenballooned_pages' prototype.

    Signed-off-by: Stefano Stabellini
    Signed-off-by: Konrad Rzeszutek Wilk

    Stefano Stabellini
     

27 Sep, 2011

2 commits

  • Device drivers that create and destroy SR-IOV virtual functions via
    calls to pci_enable_sriov() and pci_disable_sriov can cause catastrophic
    failures if they attempt to destroy VFs while they are assigned to
    guest virtual machines. By adding a flag for use by the Xen PCI back
    to indicate that a device is assigned a device driver can check that
    flag and avoid destroying VFs while they are assigned and avoid system
    failures.

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: David S. Miller

    Konrad Rzeszutek Wilk
     
  • Randy found a compile error when using make randconfig to trigger

    drivers/xen/xenbus/xenbus_xs.c:909:2: error: implicit declaration of function 'xen_hvm_domain'

    it is unclear which of the CONFIG options triggered this. This
    patch fixes the error.

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

    Konrad Rzeszutek Wilk
     

23 Sep, 2011

2 commits

  • Add new xs_reset_watches function to shutdown watches from old kernel after
    kexec boot. The old kernel does not unregister all watches in the
    shutdown path. They are still active, the double registration can not
    be detected by the new kernel. When the watches fire, unexpected events
    will arrive and the xenwatch thread will crash (jumps to NULL). An
    orderly reboot of a hvm guest will destroy the entire guest with all its
    resources (including the watches) before it is rebuilt from scratch, so
    the missing unregister is not an issue in that case.

    With this change the xenstored is instructed to wipe all active watches
    for the guest. However, a patch for xenstored is required so that it
    accepts the XS_RESET_WATCHES request from a client (see changeset
    23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
    the registration of watches will fail and some features of a PVonHVM
    guest are not available. The guest is still able to boot, but repeated
    kexec boots will fail.

    [v5: use xs_single instead of passing a dummy string to xs_talkv]
    [v4: ignore -EEXIST in xs_reset_watches]
    [v3: use XS_RESET_WATCHES instead of XS_INTRODUCE]
    [v2: move all code which deals with XS_INTRODUCE into xs_introduce()
    (based on feedback from Ian Campbell); remove casts from kvec assignment]
    Signed-off-by: Olaf Hering
    [v1: Redid the git description a bit]
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     
  • Now that the hypercall interface changes are in -unstable, make the
    kernel side code not ignore the segment (aka domain) number anymore
    (which results in pretty odd behavior on such systems). Rather, if
    only the old interfaces are available, don't call them for devices on
    non-zero segments at all.

    Signed-off-by: Jan Beulich
    [v1: Edited git description]
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

22 Sep, 2011

5 commits

  • Similar to the "xen/pciback: use mutex rather than spinlock in passthrough backend"
    this patch converts the vpci backend to use a mutex instead of
    a spinlock. Note that the code taking the lock won't ever get called
    from non-sleepable context

    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • The caller that orchestrates the state changes is xenwatch_thread
    and it takes a mutex. In our processing of Xenbus states we can take
    the luxery of going to sleep on a mutex, so lets do that and
    also fix this bug:

    BUG: sleeping function called from invalid context at /linux/kernel/mutex.c:271
    in_atomic(): 1, irqs_disabled(): 0, pid: 32, name: xenwatch
    2 locks held by xenwatch/32:
    #0: (xenwatch_mutex){......}, at: [] xenwatch_thread+0x4b/0x180
    #1: (&(&pdev->dev_lock)->rlock){......}, at: [] xen_pcibk_disconnect+0x1b/0x80
    Pid: 32, comm: xenwatch Not tainted 3.1.0-rc6-00015-g3ce340d #2
    Call Trace:
    [] __might_sleep+0x102/0x130
    [] mutex_lock_nested+0x2f/0x50
    [] unbind_from_irq+0x2c/0x1b0
    [] ? free_irq+0x56/0xb0
    [] unbind_from_irqhandler+0x1c/0x30
    [] xen_pcibk_disconnect+0x2b/0x80
    [] xen_pcibk_frontend_changed+0xe8/0x140
    [] xenbus_otherend_changed+0xd2/0x150
    [] ? get_parent_ip+0x11/0x50
    [] frontend_changed+0x10/0x20
    [] xenwatch_thread+0xb2/0x180

    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • This is a minor bugfix and a set of small cleanups; as it is not clear
    whether this needs splitting into pieces (and if so, at what
    granularity), it is a single combined patch.
    - add a missing return statement to an error path in
    kill_domain_by_device()
    - use pci_is_enabled() rather than raw atomic_read()
    - remove a bogus attempt to zero-terminate an already zero-terminated
    string
    - #define DRV_NAME once uniformly in the shared local header
    - make DRIVER_ATTR() variables static
    - eliminate a pointless use of list_for_each_entry_safe()
    - add MODULE_ALIAS()
    - a little bit of constification
    - adjust a few messages
    - remove stray semicolons from inline function definitions

    Signed-off-by: Jan Beulich
    [v1: Dropped the resource_size fix, altered the description]
    [v2: Fixed cleanpatch.pl comments]
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • To accommodate the call to the callback function from
    __xen_pcibk_publish_pci_roots(), which so far dropped and the re-
    acquired the lock without checking that the list didn't actually
    change, convert the code to use a mutex instead (observing that the
    code taking the lock won't ever get called from non-sleepable
    context).

    As a result, drop the bogus use of list_for_each_entry_safe() and
    remove the inappropriate dropping of the lock.

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • Use resource_size function on resource object
    instead of explicit computation.

    The semantic patch that makes this output is available
    in scripts/coccinelle/api/resource_size.cocci.

    More information about semantic patching is available at
    http://coccinelle.lip6.fr/

    Signed-off-by: Thomas Meyer
    Signed-off-by: Konrad Rzeszutek Wilk

    Thomas Meyer
     

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

2 commits

  • After triggering a crash dump in a HVM guest, the PV backend drivers
    will remain in Connected state. When the kdump kernel starts the PV
    drivers will skip such devices. As a result, no root device is found and
    the vmcore cant be saved.

    A similar situation happens after a kexec boot, here the devices will be
    in the Closed state.

    With this change all frontend devices with state XenbusStateConnected or
    XenbusStateClosed will be reset by changing the state file to Closing ->
    Closed -> Initializing. This will trigger a disconnect in the backend
    drivers. Now the frontend drivers will find the backend drivers in state
    Initwait and can connect.

    Signed-off-by: Olaf Hering
    [v2:
    - add timeout when waiting for backend state change
    (based on feedback from Ian Campell)
    - extent printk message to include backend string
    - add comment to fall-through case in xenbus_reset_frontend]
    Signed-off-by: Konrad Rzeszutek Wilk

    Olaf Hering
     
  • 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