10 Feb, 2017

2 commits

  • Today a Xenstore watch event is delivered via a callback function
    declared as:

    void (*callback)(struct xenbus_watch *,
    const char **vec, unsigned int len);

    As all watch events only ever come with two parameters (path and token)
    changing the prototype to:

    void (*callback)(struct xenbus_watch *,
    const char *path, const char *token);

    is the natural thing to do.

    Apply this change and adapt all users.

    Cc: konrad.wilk@oracle.com
    Cc: roger.pau@citrix.com
    Cc: wei.liu2@citrix.com
    Cc: paul.durrant@citrix.com
    Cc: netdev@vger.kernel.org

    Signed-off-by: Juergen Gross
    Reviewed-by: Paul Durrant
    Reviewed-by: Wei Liu
    Reviewed-by: Roger Pau Monné
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Juergen Gross
     
  • The xenbus driver has an awful mixture of internally and globally
    visible headers: some of the internally used only stuff is defined in
    the global header include/xen/xenbus.h while some stuff defined in
    internal headers is used by other drivers, too.

    Clean this up by moving the externally used symbols to
    include/xen/xenbus.h and the symbols used internally only to a new
    header drivers/xen/xenbus/xenbus.h replacing xenbus_comms.h and
    xenbus_probe.h

    Signed-off-by: Juergen Gross
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Juergen Gross
     

07 Nov, 2016

1 commit

  • There are multiple instances of code reading an optional unsigned
    parameter from Xenstore via xenbus_scanf(). Instead of repeating the
    same code over and over add a service function doing the job.

    Signed-off-by: Juergen Gross
    Reviewed-by: David Vrabel

    Juergen Gross
     

23 Oct, 2015

1 commit


15 Apr, 2015

1 commit

  • Originally Xen PV drivers only use single-page ring to pass along
    information. This might limit the throughput between frontend and
    backend.

    The patch extends Xenbus driver to support multi-page ring, which in
    general should improve throughput if ring is the bottleneck. Changes to
    various frontend / backend to adapt to the new interface are also
    included.

    Affected Xen drivers:
    * blkfront/back
    * netfront/back
    * pcifront/back
    * scsifront/back
    * vtpmfront

    The interface is documented, as before, in xenbus_client.c.

    Signed-off-by: Wei Liu
    Signed-off-by: Paul Durrant
    Signed-off-by: Bob Liu
    Cc: Konrad Wilk
    Cc: Boris Ostrovsky
    Signed-off-by: David Vrabel

    Wei Liu
     

02 Mar, 2015

1 commit


06 Oct, 2014

1 commit


01 Mar, 2014

1 commit


29 May, 2013

1 commit

  • If the xenbus frontend is located in a domain running xenstored, the device
    resume is hanging because it is happening before the process resume. This
    patch adds extra logic to the resume code to check if we are the domain
    running xenstored and delay the resume if needed.

    Signed-off-by: Aurelien Chartier
    [Changes in v2:
    - Instead of bypassing the resume, process it in a workqueue]
    [Changes in v3:
    - Add a struct work in xenbus_device to avoid dynamic allocation
    - Several small code fixes]
    [Changes in v4:
    - Use a dedicated workqueue]
    [Changes in v5:
    - Move create_workqueue error handling to xenbus_frontend_dev_resume]
    Acked-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Aurelien Chartier
     

24 Mar, 2012

1 commit


05 Jan, 2012

1 commit

  • The 'name', 'owner', and 'mod_name' members are redundant with the
    identically named fields in the 'driver' sub-structure. Rather than
    switching each instance to specify these fields explicitly, introduce
    a macro to simplify this.

    Eliminate further redundancy by allowing the drvname argument to
    DEFINE_XENBUS_DRIVER() to be blank (in which case the first entry from
    the ID table will be used for .driver.name).

    Also eliminate the questionable xenbus_register_{back,front}end()
    wrappers - their sole remaining purpose was the checking of the
    'owner' field, proper setting of which shouldn't be an issue anymore
    when the macro gets used.

    v2: Restore DRV_NAME for the driver name in xen-pciback.

    Signed-off-by: Jan Beulich
    Cc: Jens Axboe
    Cc: Dmitry Torokhov
    Cc: Florian Tobias Schandinat
    Cc: Ian Campbell
    Cc: David S. Miller
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     

07 Nov, 2011

1 commit

  • * '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
     

01 Nov, 2011

2 commits

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Things like THIS_MODULE and EXPORT_SYMBOL were simply everywhere
    because module.h was also everywhere. But we are fixing the latter.
    So we need to call out the real users in advance.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

01 Jul, 2011

1 commit


17 Mar, 2011

1 commit

  • Make xenbus frontend device subscribe to PM events
    to receive suspend/resume/freeze/thaw/restore
    notifications.

    Signed-off-by: Kenji Wakamiya
    Signed-off-by: Kazuhiro Suzuki
    Signed-off-by: Shriram Rajagopalan
    Acked-by: Ian Campbell
    [shriram--minor mods and improved commit message]
    Signed-off-by: Konrad Rzeszutek Wilk

    Kazuhiro SUZUKI
     

06 Jan, 2011

1 commit

  • Impact: backend device support

    Add the basic machinery to support backend drivers.

    Signed-off-by: Ian Campbell
    Signed-off-by: Jeremy Fitzhardinge
    [corresponds to 79727b851bac in git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git]
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

31 Mar, 2009

2 commits


09 Jan, 2009

1 commit

  • The xenfs filesystem exports various interfaces to usermode. Initially
    this exports a file to allow usermode to interact with xenbus/xenstore.

    Traditionally this appeared in /proc/xen. Rather than extending procfs,
    this patch adds a backward-compat mountpoint on /proc/xen, and provides
    a xenfs filesystem which can be mounted there.

    Signed-off-by: Alex Zeffertt
    Signed-off-by: Jeremy Fitzhardinge
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alex Zeffertt
     

25 Apr, 2008

1 commit

  • When the xen block frontend driver is built as a module the module load
    is only synchronous up to the point where the frontend and the backend
    become connected rather than when the disk is added.

    This means that there can be a race on boot between loading the module and
    loading the dm-* modules and doing the scan for LVM physical volumes (all
    in the initrd). In the failure case the disk is not present until after the
    scan for physical volumes is complete.

    Taken from:

    http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/11483a00c017

    Signed-off-by: Christian Limpach
    Signed-off-by: Mark McLoughlin
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Christian Limpach
     

18 Jul, 2007

1 commit

  • This communicates with the machine control software via a registry
    residing in a controlling virtual machine. This allows dynamic
    creation, destruction and modification of virtual device
    configurations (network devices, block devices and CPUS, to name some
    examples).

    [ Greg, would you mind giving this a review? Thanks -J ]

    Signed-off-by: Ian Pratt
    Signed-off-by: Christian Limpach
    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Cc: Greg KH

    Jeremy Fitzhardinge