14 Dec, 2018

1 commit

  • The start info structure that is defined as part of the x86/HVM direct boot
    ABI and used for starting Xen PVH guests would be more versatile if it also
    included a way to pass information about the memory map to the guest. This
    would allow KVM guests to share the same entry point.

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

    Maran Wilson
     

03 Sep, 2018

1 commit

  • There are some PV specific functions in arch/x86/xen/mmu.c which can be
    moved to mmu_pv.c. This in turn enables to build multicalls.c dependent
    on CONFIG_XEN_PV.

    Signed-off-by: Juergen Gross
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Boris Ostrovsky
    Cc: xen-devel@lists.xenproject.org
    Cc: virtualization@lists.linux-foundation.org
    Cc: akataria@vmware.com
    Cc: rusty@rustcorp.com.au
    Cc: hpa@zytor.com
    Link: https://lkml.kernel.org/r/20180828074026.820-3-jgross@suse.com

    Juergen Gross
     

19 Aug, 2018

1 commit

  • Pull input updates from Dmitry Torokhov:

    - a new driver for Rohm BU21029 touch controller

    - new bitmap APIs: bitmap_alloc, bitmap_zalloc and bitmap_free

    - updates to Atmel, eeti. pxrc and iforce drivers

    - assorted driver cleanups and fixes.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
    MAINTAINERS: Add PhoenixRC Flight Controller Adapter
    Input: do not use WARN() in input_alloc_absinfo()
    Input: mark expected switch fall-throughs
    Input: raydium_i2c_ts - use true and false for boolean values
    Input: evdev - switch to bitmap API
    Input: gpio-keys - switch to bitmap_zalloc()
    Input: elan_i2c_smbus - cast sizeof to int for comparison
    bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
    md: Avoid namespace collision with bitmap API
    dm: Avoid namespace collision with bitmap API
    Input: pm8941-pwrkey - add resin entry
    Input: pm8941-pwrkey - abstract register offsets and event code
    Input: iforce - reorganize joystick configuration lists
    Input: atmel_mxt_ts - move completion to after config crc is updated
    Input: atmel_mxt_ts - don't report zero pressure from T9
    Input: atmel_mxt_ts - zero terminate config firmware file
    Input: atmel_mxt_ts - refactor config update code to add context struct
    Input: atmel_mxt_ts - config CRC may start at T71
    Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM
    Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURE
    ...

    Linus Torvalds
     

16 Jun, 2018

1 commit

  • As we move stuff around, some doc references are broken. Fix some of
    them via this script:
    ./scripts/documentation-file-ref-check --fix

    Manually checked if the produced result is valid, removing a few
    false-positives.

    Acked-by: Takashi Iwai
    Acked-by: Masami Hiramatsu
    Acked-by: Stephen Boyd
    Acked-by: Charles Keepax
    Acked-by: Mathieu Poirier
    Reviewed-by: Coly Li
    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

13 Jun, 2018

1 commit

  • This is the sync up with the canonical definitions of the input,
    sound and display protocols in Xen.

    Changes to kbdif:
    1. Add missing string constants for {feature|request}-raw-pointer
    to align with the rest of the interface file.

    2. Add new XenStore feature fields, so it is possible to individually
    control set of exposed virtual devices for each guest OS:
    - set feature-disable-keyboard to 1 if no keyboard device needs
    to be created
    - set feature-disable-pointer to 1 if no pointer device needs
    to be created

    3. Move multi-touch device parameters to backend nodes: these are
    described as a part of frontend's XenBus configuration nodes
    while they belong to backend's configuration. Fix this by moving
    the parameters to the proper section.

    Unique-id field:
    1. Add unique-id XenBus entry for virtual input and display.

    2. Change type of unique-id field to string for sndif to align with
    display and input protocols.

    Signed-off-by: Oleksandr Andrushchenko
    Reviewed-by: Juergen Gross
    Signed-off-by: Dmitry Torokhov

    Oleksandr Andrushchenko
     

14 May, 2018

1 commit

  • My recent Xen patch series introduces a new HYPERVISOR_memory_op to
    support direct priv-mapping of certain guest resources (such as ioreq
    pages, used by emulators) by a tools domain, rather than having to access
    such resources via the guest P2M.

    This patch adds the necessary infrastructure to the privcmd driver and
    Xen MMU code to support direct resource mapping.

    NOTE: The adjustment in the MMU code is partially cosmetic. Xen will now
    allow a PV tools domain to map guest pages either by GFN or MFN, thus
    the term 'mfn' has been swapped for 'pfn' in the lower layers of the
    remap code.

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

    Paul Durrant
     

17 Apr, 2018

1 commit

  • This is the sync up with the canonical definition of the sound
    protocol in Xen:

    1. Protocol version was referenced in the protocol description,
    but missed its definition. Fixed by adding a constant
    for current protocol version.

    2. Some of the request descriptions have "reserved" fields
    missed: fixed by adding corresponding entries.

    3. Extend the size of the requests and responses to 64 octets.
    Bump protocol version to 2.

    4. Add explicit back and front synchronization
    In order to provide explicit synchronization between backend and
    frontend the following changes are introduced in the protocol:
    - add new ring buffer for sending asynchronous events from
    backend to frontend to report number of bytes played by the
    frontend (XENSND_EVT_CUR_POS)
    - introduce trigger events for playback control: start/stop/pause/resume
    - add "req-" prefix to event-channel and ring-ref to unify naming
    of the Xen event channels for requests and events

    5. Add explicit back and front parameter negotiation
    In order to provide explicit stream parameter negotiation between
    backend and frontend the following changes are introduced in the protocol:
    add XENSND_OP_HW_PARAM_QUERY request to read/update
    configuration space for the parameters given: request passes
    desired parameter's intervals/masks and the response to this request
    returns allowed min/max intervals/masks to be used.

    Signed-off-by: Oleksandr Andrushchenko
    Signed-off-by: Oleksandr Grytsov
    Reviewed-by: Konrad Rzeszutek Wilk
    Reviewed-by: Boris Ostrovsky
    Cc: Konrad Rzeszutek Wilk
    Cc: Takashi Iwai
    Signed-off-by: Boris Ostrovsky

    Oleksandr Andrushchenko
     

10 Apr, 2018

1 commit

  • Pre-4.17 kernels ignored start_info's rsdp_paddr pointer and instead
    relied on finding RSDP in standard location in BIOS RO memory. This
    has worked since that's where Xen used to place it.

    However, with recent Xen change (commit 4a5733771e6f ("libxl: put RSDP
    for PVH guest near 4GB")) it prefers to keep RSDP at a "non-standard"
    address. Even though as of commit b17d9d1df3c3 ("x86/xen: Add pvh
    specific rsdp address retrieval function") Linux is able to find RSDP,
    for back-compatibility reasons we need to indicate to Xen that we can
    handle this, an we do so by setting XENFEAT_linux_rsdp_unrestricted
    flag in ELF notes.

    (Also take this opportunity and sync features.h header file with Xen)

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

    Boris Ostrovsky
     

17 Nov, 2017

1 commit

  • Pull xen updates from Juergen Gross:
    "Xen features and fixes for v4.15-rc1

    Apart from several small fixes it contains the following features:

    - a series by Joao Martins to add vdso support of the pv clock
    interface

    - a series by Juergen Gross to add support for Xen pv guests to be
    able to run on 5 level paging hosts

    - a series by Stefano Stabellini adding the Xen pvcalls frontend
    driver using a paravirtualized socket interface"

    * tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (34 commits)
    xen/pvcalls: fix potential endless loop in pvcalls-front.c
    xen/pvcalls: Add MODULE_LICENSE()
    MAINTAINERS: xen, kvm: track pvclock-abi.h changes
    x86/xen/time: setup vcpu 0 time info page
    x86/xen/time: set pvclock flags on xen_time_init()
    x86/pvclock: add setter for pvclock_pvti_cpu0_va
    ptp_kvm: probe for kvm guest availability
    xen/privcmd: remove unused variable pageidx
    xen: select grant interface version
    xen: update arch/x86/include/asm/xen/cpuid.h
    xen: add grant interface version dependent constants to gnttab_ops
    xen: limit grant v2 interface to the v1 functionality
    xen: re-introduce support for grant v2 interface
    xen: support priv-mapping in an HVM tools domain
    xen/pvcalls: remove redundant check for irq >= 0
    xen/pvcalls: fix unsigned less than zero error check
    xen/time: Return -ENODEV from xen_get_wallclock()
    xen/pvcalls-front: mark expected switch fall-through
    xen: xenbus_probe_frontend: mark expected switch fall-throughs
    xen/time: do not decrease steal time after live migration on xen
    ...

    Linus Torvalds
     

09 Nov, 2017

1 commit

  • In order to support pvclock vdso on xen we need to setup the time
    info page for vcpu 0 and register the page with Xen using the
    VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall
    will also forcefully update the pvti which will set some of the
    necessary flags for vdso. Afterwards we check if it supports the
    PVCLOCK_TSC_STABLE_BIT flag which is mandatory for having
    vdso/vsyscall support. And if so, it will set the cpu 0 pvti that
    will be later on used when mapping the vdso image.

    The xen headers are also updated to include the new hypercall for
    registering the secondary vcpu_time_info struct.

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

    Joao Martins
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

31 Aug, 2017

1 commit

  • Introduce the C header file which defines the PV Calls interface. It is
    imported from xen/include/public/io/pvcalls.h.

    Signed-off-by: Stefano Stabellini
    Reviewed-by: Boris Ostrovsky
    Reviewed-by: Juergen Gross
    CC: konrad.wilk@oracle.com
    CC: boris.ostrovsky@oracle.com
    CC: jgross@suse.com
    Signed-off-by: Boris Ostrovsky

    Stefano Stabellini
     

15 Jun, 2017

1 commit


02 May, 2017

6 commits

  • This is the ABI for the two halves of a para-virtualized
    display driver.

    This protocol aims to provide a unified protocol which fits more
    sophisticated use-cases than a framebuffer device can handle. At the
    moment basic functionality is supported with the intention to extend:
    o multiple dynamically allocated/destroyed framebuffers
    o buffers of arbitrary sizes
    o better configuration options including multiple display support

    Note: existing fbif can be used together with displif running at the
    same time, e.g. on Linux one provides framebuffer and another DRM/KMS

    Future extensions to the existing protocol may include:
    o allow display/connector cloning
    o allow allocating objects other than display buffers
    o add planes/overlays support
    o support scaling
    o support rotation

    Note, that this protocol doesn't use ring macros for
    bi-directional exchange (PV calls/9pfs) bacause:
    o it statically defines the use of a single page
    for the ring buffer
    o it uses direct memory access to ring's contents
    w/o memory copying
    o re-uses the same idea that kbdif/fbif use
    which for this use-case seems to be appropriate

    ==================================================
    Rationale for introducing this protocol instead of
    using the existing fbif:
    ==================================================

    1. In/out event sizes
    o fbif - 40 octets
    o displif - 40 octets
    This is only the initial version of the displif protocol
    which means that there could be requests which will not fit
    (WRT introducing some GPU related functionality
    later on). In that case we cannot alter fbif sizes as we need to
    be backward compatible an will be forced to handle those
    apart of fbif.

    2. Shared page
    Displif doesn't use anything like struct xenfb_page, but
    DEFINE_RING_TYPES(xen_displif, struct xendispl_req, struct
    xendispl_resp) which is a better and more common way.
    Output events use a shared page which only has in_cons and in_prod
    and all the rest is used for incoming events. Here struct xenfb_page
    could probably be used as is despite the fact that it only has a half
    of a page for incoming events which is only 50 events. (consider
    something like 60Hz display)

    3. Amount of changes.
    fbif only provides XENFB_TYPE_UPDATE and XENFB_TYPE_RESIZE
    events, so it looks like it is easier to get fb support into displif
    than vice versa. displif at the moment has 6 requests and 1 event,
    multiple connector support, etc.

    Signed-off-by: Oleksandr Grytsov
    Signed-off-by: Oleksandr Andrushchenko
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Oleksandr Andrushchenko
     
  • Add ABI for the two halves of a para-virtualized
    sound driver to communicate with each other.

    The ABI allows implementing audio playback and capture as
    well as volume control and possibility to mute/unmute
    audio sources.

    Note: depending on the use-case backend can expose more sound
    cards and PCM devices/streams than the underlying HW physically
    has by employing SW mixers, configuring virtual sound streams,
    channels etc. Thus, allowing fine tunned configurations per
    frontend.

    Signed-off-by: Oleksandr Andrushchenko
    Signed-off-by: Oleksandr Grytsov
    Signed-off-by: Oleksandr Dmytryshyn
    Signed-off-by: Iurii Konovalenko
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Oleksandr Andrushchenko
     
  • Multi-touch fields re-use the page that is used by the other features
    which means that you can interleave multi-touch, motion, and key
    events.

    Signed-off-by: Oleksandr Andrushchenko
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Oleksandr Andrushchenko
     
  • The patch clarifies the protocol that is used by the PV keyboard
    drivers.

    Signed-off-by: Oleksandr Andrushchenko
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Oleksandr Andrushchenko
     
  • It uses the new ring.h macros to declare rings and interfaces.

    CC: konrad.wilk@oracle.com
    CC: boris.ostrovsky@oracle.com
    CC: jgross@suse.com
    CC: groug@kaod.org

    Signed-off-by: Stefano Stabellini
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Stefano Stabellini
     
  • Sync the ring.h file with upstream Xen, to introduce the new ring macros.
    They will be used by the Xen transport for 9pfs.

    CC: konrad.wilk@oracle.com
    CC: boris.ostrovsky@oracle.com
    CC: jgross@suse.com
    CC: groug@kaod.org

    Signed-off-by: Stefano Stabellini
    Acked-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Stefano Stabellini
     

28 Feb, 2017

1 commit


15 Feb, 2017

1 commit

  • Recently a new dm_op[1] hypercall was added to Xen to provide a mechanism
    for restricting device emulators (such as QEMU) to a limited set of
    hypervisor operations, and being able to audit those operations in the
    kernel of the domain in which they run.

    This patch adds IOCTL_PRIVCMD_DM_OP as gateway for __HYPERVISOR_dm_op.

    NOTE: There is no requirement for user-space code to bounce data through
    locked memory buffers (as with IOCTL_PRIVCMD_HYPERCALL) since
    privcmd has enough information to lock the original buffers
    directly.

    [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=524a98c2

    Signed-off-by: Paul Durrant
    Acked-by: Stefano Stabellini
    Signed-off-by: Boris Ostrovsky

    Paul Durrant
     

07 Feb, 2017

1 commit


05 Sep, 2016

1 commit

  • Import the actual version of include/xen/interface/sched.h from Xen.

    Signed-off-by: Juergen Gross
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: David Vrabel
    Cc: Douglas_Warzecha@dell.com
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: akataria@vmware.com
    Cc: boris.ostrovsky@oracle.com
    Cc: chrisw@sous-sol.org
    Cc: hpa@zytor.com
    Cc: jdelvare@suse.com
    Cc: jeremy@goop.org
    Cc: linux@roeck-us.net
    Cc: pali.rohar@gmail.com
    Cc: rusty@rustcorp.com.au
    Cc: virtualization@lists.linux-foundation.org
    Cc: xen-devel@lists.xenproject.org
    Link: http://lkml.kernel.org/r/1472453327-19050-2-git-send-email-jgross@suse.com
    Signed-off-by: Ingo Molnar

    Juergen Gross
     

06 Jul, 2016

4 commits


14 Mar, 2016

1 commit

  • The canonical netif header (in the Xen source repo) and the Linux variant
    have diverged significantly. Recently much documentation has been added to
    the canonical header which is highly useful for developers making
    modifications to either xen-netfront or xen-netback. This patch therefore
    re-imports the canonical header in its entirity.

    To maintain compatibility and some style consistency with the old Linux
    variant, the header was stripped of its emacs boilerplate, and
    post-processed and copied into place with the following commands:

    ed -s netif.h << EOF
    H
    ,s/NETTXF_/XEN_NETTXF_/g
    ,s/NETRXF_/XEN_NETRXF_/g
    ,s/NETIF_/XEN_NETIF_/g
    ,s/XEN_XEN_/XEN_/g
    ,s/netif/xen_netif/g
    ,s/xen_xen_/xen_/g
    ,s/^typedef.*$//g
    ,s/^ /${TAB}/g
    w
    $
    w
    EOF

    indent --line-length 80 --linux-style netif.h \
    -o include/xen/interface/io/netif.h

    Signed-off-by: Paul Durrant
    Cc: Konrad Rzeszutek Wilk
    Cc: Boris Ostrovsky
    Cc: David Vrabel
    Cc: Wei Liu
    Acked-by: Wei Liu
    Signed-off-by: David S. Miller

    Paul Durrant
     

22 Jan, 2016

1 commit

  • Pull block driver updates from Jens Axboe:
    "This is the block driver pull request for 4.5, with the exception of
    NVMe, which is in a separate branch and will be posted after this one.

    This pull request contains:

    - A set of bcache stability fixes, which have been acked by Kent.
    These have been used and tested for more than a year by the
    community, so it's about time that they got in.

    - A set of drbd updates from the drbd team (Andreas, Lars, Philipp)
    and Markus Elfring, Oleg Drokin.

    - A set of fixes for xen blkback/front from the usual suspects, (Bob,
    Konrad) as well as community based fixes from Kiri, Julien, and
    Peng.

    - A 2038 time fix for sx8 from Shraddha, with a fix from me.

    - A small mtip32xx cleanup from Zhu Yanjun.

    - A null_blk division fix from Arnd"

    * 'for-4.5/drivers' of git://git.kernel.dk/linux-block: (71 commits)
    null_blk: use sector_div instead of do_div
    mtip32xx: restrict variables visible in current code module
    xen/blkfront: Fix crash if backend doesn't follow the right states.
    xen/blkback: Fix two memory leaks.
    xen/blkback: make st_ statistics per ring
    xen/blkfront: Handle non-indirect grant with 64KB pages
    xen-blkfront: Introduce blkif_ring_get_request
    xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
    xen/blkback: Free resources if connect_ring failed.
    xen/blocks: Return -EXX instead of -1
    xen/blkback: make pool of persistent grants and free pages per-queue
    xen/blkback: get the number of hardware queues/rings from blkfront
    xen/blkback: pseudo support for multi hardware queues/rings
    xen/blkback: separate ring information out of struct xen_blkif
    xen/blkfront: correct setting for xen_blkif_max_ring_order
    xen/blkfront: make persistent grants pool per-queue
    xen/blkfront: Remove duplicate setting of ->xbdev.
    xen/blkfront: Cleanup of comments, fix unaligned variables, and syntax errors.
    xen/blkfront: negotiate number of queues/rings to be used with backend
    xen/blkfront: split per device io_lock
    ...

    Linus Torvalds
     

19 Jan, 2016

1 commit

  • Pull virtio barrier rework+fixes from Michael Tsirkin:
    "This adds a new kind of barrier, and reworks virtio and xen to use it.

    Plus some fixes here and there"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (44 commits)
    checkpatch: add virt barriers
    checkpatch: check for __smp outside barrier.h
    checkpatch.pl: add missing memory barriers
    virtio: make find_vqs() checkpatch.pl-friendly
    virtio_balloon: fix race between migration and ballooning
    virtio_balloon: fix race by fill and leak
    s390: more efficient smp barriers
    s390: use generic memory barriers
    xen/events: use virt_xxx barriers
    xen/io: use virt_xxx barriers
    xenbus: use virt_xxx barriers
    virtio_ring: use virt_store_mb
    sh: move xchg_cmpxchg to a header by itself
    sh: support 1 and 2 byte xchg
    virtio_ring: update weak barriers to use virt_xxx
    Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb"
    asm-generic: implement virt_xxx memory barriers
    x86: define __smp_xxx
    xtensa: define __smp_xxx
    tile: define __smp_xxx
    ...

    Linus Torvalds
     

13 Jan, 2016

1 commit

  • include/xen/interface/io/ring.h uses
    full memory barriers to communicate with the other side.

    For guests compiled with CONFIG_SMP, smp_wmb and smp_mb
    would be sufficient, so mb() and wmb() here are only needed if
    a non-SMP guest runs on an SMP host.

    Switch to virt_xxx barriers which serve this exact purpose.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: David Vrabel
    Acked-by: Peter Zijlstra (Intel)

    Michael S. Tsirkin
     

04 Jan, 2016

1 commit


21 Dec, 2015

2 commits


18 Dec, 2015

1 commit

  • Using RING_GET_REQUEST() on a shared ring is easy to use incorrectly
    (i.e., by not considering that the other end may alter the data in the
    shared ring while it is being inspected). Safe usage of a request
    generally requires taking a local copy.

    Provide a RING_COPY_REQUEST() macro to use instead of
    RING_GET_REQUEST() and an open-coded memcpy(). This takes care of
    ensuring that the copy is done correctly regardless of any possible
    compiler optimizations.

    Use a volatile source to prevent the compiler from reordering or
    omitting the copy.

    This is part of XSA155.

    CC: stable@vger.kernel.org
    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     

28 Sep, 2015

1 commit

  • Currently there is a number of issues preventing PVHVM Xen guests from
    doing successful kexec/kdump:

    - Bound event channels.
    - Registered vcpu_info.
    - PIRQ/emuirq mappings.
    - shared_info frame after XENMAPSPACE_shared_info operation.
    - Active grant mappings.

    Basically, newly booted kernel stumbles upon already set up Xen
    interfaces and there is no way to reestablish them. In Xen-4.7 a new
    feature called 'soft reset' is coming. A guest performing kexec/kdump
    operation is supposed to call SCHEDOP_shutdown hypercall with
    SHUTDOWN_soft_reset reason before jumping to new kernel. Hypervisor
    (with some help from toolstack) will do full domain cleanup (but
    keeping its memory and vCPU contexts intact) returning the guest to
    the state it had when it was first booted and thus allowing it to
    start over.

    Doing SHUTDOWN_soft_reset on Xen hypervisors which don't support it is
    probably OK as by default all unknown shutdown reasons cause domain
    destroy with a message in toolstack log: 'Unknown shutdown reason code
    5. Destroying domain.' which gives a clue to what the problem is and
    eliminates false expectations.

    Signed-off-by: Vitaly Kuznetsov
    Cc:
    Signed-off-by: David Vrabel

    Vitaly Kuznetsov
     

09 Sep, 2015

1 commit

  • Pull xen updates from David Vrabel:
    "Xen features and fixes for 4.3:

    - Convert xen-blkfront to the multiqueue API
    - [arm] Support binding event channels to different VCPUs.
    - [x86] Support > 512 GiB in a PV guests (off by default as such a
    guest cannot be migrated with the current toolstack).
    - [x86] PMU support for PV dom0 (limited support for using perf with
    Xen and other guests)"

    * tag 'for-linus-4.3-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (33 commits)
    xen: switch extra memory accounting to use pfns
    xen: limit memory to architectural maximum
    xen: avoid another early crash of memory limited dom0
    xen: avoid early crash of memory limited dom0
    arm/xen: Remove helpers which are PV specific
    xen/x86: Don't try to set PCE bit in CR4
    xen/PMU: PMU emulation code
    xen/PMU: Intercept PMU-related MSR and APIC accesses
    xen/PMU: Describe vendor-specific PMU registers
    xen/PMU: Initialization code for Xen PMU
    xen/PMU: Sysfs interface for setting Xen PMU mode
    xen: xensyms support
    xen: remove no longer needed p2m.h
    xen: allow more than 512 GB of RAM for 64 bit pv-domains
    xen: move p2m list if conflicting with e820 map
    xen: add explicit memblock_reserve() calls for special pages
    mm: provide early_memremap_ro to establish read-only mapping
    xen: check for initrd conflicting with e820 map
    xen: check pre-allocated page tables for conflict with memory map
    xen: check for kernel memory conflicting with memory layout
    ...

    Linus Torvalds
     

03 Sep, 2015

1 commit

  • Xen's PV network protocol includes messages to add/remove ethernet
    multicast addresses to/from a filter list in the backend. This allows
    the frontend to request the backend only forward multicast packets
    which are of interest thus preventing unnecessary noise on the shared
    ring.

    The canonical netif header in git://xenbits.xen.org/xen.git specifies
    the message format (two more XEN_NETIF_EXTRA_TYPEs) so the minimal
    necessary changes have been pulled into include/xen/interface/io/netif.h.

    To prevent the frontend from extending the multicast filter list
    arbitrarily a limit (XEN_NETBK_MCAST_MAX) has been set to 64 entries.
    This limit is not specified by the protocol and so may change in future.
    If the limit is reached then the next XEN_NETIF_EXTRA_TYPE_MCAST_ADD
    sent by the frontend will be failed with NETIF_RSP_ERROR.

    Signed-off-by: Paul Durrant
    Cc: Ian Campbell
    Cc: Wei Liu
    Acked-by: Wei Liu
    Signed-off-by: David S. Miller

    Paul Durrant
     

20 Aug, 2015

2 commits

  • Provide interfaces for recognizing accesses to PMU-related MSRs and
    LVTPC APIC and process these accesses in Xen PMU code.

    (The interrupt handler performs XENPMU_flush right away in the beginning
    since no PMU emulation is available. It will be added with a later patch).

    Signed-off-by: Boris Ostrovsky
    Reviewed-by: David Vrabel
    Signed-off-by: David Vrabel

    Boris Ostrovsky
     
  • Map shared data structure that will hold CPU registers, VPMU context,
    V/PCPU IDs of the CPU interrupted by PMU interrupt. Hypervisor fills
    this information in its handler and passes it to the guest for further
    processing.

    Set up PMU VIRQ.

    Now that perf infrastructure will assume that PMU is available on a PV
    guest we need to be careful and make sure that accesses via RDPMC
    instruction don't cause fatal traps by the hypervisor. Provide a nop
    RDPMC handler.

    For the same reason avoid issuing a warning on a write to APIC's LVTPC.

    Both of these will be made functional in later patches.

    Signed-off-by: Boris Ostrovsky
    Reviewed-by: David Vrabel
    Signed-off-by: David Vrabel

    Boris Ostrovsky