06 Feb, 2020

1 commit

  • Pull xen updates from Juergen Gross:

    - fix a bug introduced in 5.5 in the Xen gntdev driver

    - fix the Xen balloon driver when running on ancient Xen versions

    - allow Xen stubdoms to control interrupt enable flags of
    passed-through PCI cards

    - release resources in Xen backends under memory pressure

    * tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/blkback: Consistently insert one empty line between functions
    xen/blkback: Remove unnecessary static variable name prefixes
    xen/blkback: Squeeze page pools if a memory pressure is detected
    xenbus/backend: Protect xenbus callback with lock
    xenbus/backend: Add memory pressure handler callback
    xen/gntdev: Do not use mm notifiers with autotranslating guests
    xen/balloon: Support xend-based toolstack take two
    xen-pciback: optionally allow interrupt enable flag writes

    Linus Torvalds
     

29 Jan, 2020

2 commits

  • A driver's 'reclaim_memory' callback can race with 'probe' or 'remove'
    because it will be called whenever memory pressure is detected. To
    avoid such race, this commit embeds a spinlock in each 'xenbus_device'
    and make 'xenbus' to hold the lock while the corresponded callbacks are
    running.

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

    SeongJae Park
     
  • Granting pages consumes backend system memory. In systems configured
    with insufficient spare memory for those pages, it can cause a memory
    pressure situation. However, finding the optimal amount of the spare
    memory is challenging for large systems having dynamic resource
    utilization patterns. Also, such a static configuration might lack
    flexibility.

    To mitigate such problems, this commit adds a memory reclaim callback to
    'xenbus_driver'. If a memory pressure is detected, 'xenbus' requests
    every backend driver to volunarily release its memory.

    Note that it would be able to improve the callback facility for more
    sophisticated handlings of general pressures. For example, it would be
    possible to monitor the memory consumption of each device and issue the
    release requests to only devices which causing the pressure. Also, the
    callback could be extended to handle not only memory, but general
    resources. Nevertheless, this version of the implementation defers such
    sophisticated goals as a future work.

    Reviewed-by: Juergen Gross
    Reviewed-by: Roger Pau Monné
    Signed-off-by: SeongJae Park
    Signed-off-by: Boris Ostrovsky

    SeongJae Park
     

25 Dec, 2019

1 commit


20 Dec, 2019

2 commits

  • Currently these macros are defined to re-initialize a front/back ring
    (respectively) to values read from the shared ring in such a way that any
    requests/responses that are added to the shared ring whilst the front/back
    is detached will be skipped over. This, in general, is not a desirable
    semantic since most frontend implementations will eventually block waiting
    for a response which would either never appear or never be processed.

    Since the macros are currently unused, take this opportunity to re-define
    them to re-initialize a front/back ring using specified values. This also
    allows FRONT/BACK_RING_INIT() to be re-defined in terms of
    FRONT/BACK_RING_ATTACH() using a specified value of 0.

    NOTE: BACK_RING_ATTACH() will be used directly in a subsequent patch.

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

    Paul Durrant
     
  • If a driver probe() fails then leave the xenstore state alone. There is no
    reason to modify it as the failure may be due to transient resource
    allocation issues and hence a subsequent probe() may succeed.

    If the driver supports re-binding then only force state to closed during
    remove() only in the case when the toolstack may need to clean up. This can
    be detected by checking whether the state in xenstore has been set to
    closing prior to device removal.

    NOTE: Re-bind support is indicated by new boolean in struct xenbus_driver,
    which defaults to false. Subsequent patches will add support to
    some backend drivers.

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

    Paul Durrant
     

08 Dec, 2019

1 commit

  • CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
    Both PREEMPT and PREEMPT_RT require the same functionality which today
    depends on CONFIG_PREEMPT.

    Switch the preempt anand xen-ops code over to use CONFIG_PREEMPTION.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Juergen Gross
    Cc: Boris Ostrovsky
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stefano Stabellini
    Cc: xen-devel@lists.xenproject.org
    Link: https://lore.kernel.org/r/20191015191821.11479-23-bigeasy@linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

29 Nov, 2019

1 commit

  • …linux; tag 'dma-mapping-5.5' of git://git.infradead.org/users/hch/dma-mapping

    Pull dma-mapping updates from Christoph Hellwig:

    - improve dma-debug scalability (Eric Dumazet)

    - tiny dma-debug cleanup (Dan Carpenter)

    - check for vmap memory in dma_map_single (Kees Cook)

    - check for dma_addr_t overflows in dma-direct when using DMA offsets
    (Nicolas Saenz Julienne)

    - switch the x86 sta2x11 SOC to use more generic DMA code (Nicolas
    Saenz Julienne)

    - fix arm-nommu dma-ranges handling (Vladimir Murzin)

    - use __initdata in CMA (Shyam Saini)

    - replace the bus dma mask with a limit (Nicolas Saenz Julienne)

    - merge the remapping helpers into the main dma-direct flow (me)

    - switch xtensa to the generic dma remap handling (me)

    - various cleanups around dma_capable (me)

    - remove unused dev arguments to various dma-noncoherent helpers (me)

    * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux:

    * tag 'dma-mapping-5.5' of git://git.infradead.org/users/hch/dma-mapping: (22 commits)
    dma-mapping: treat dev->bus_dma_mask as a DMA limit
    dma-direct: exclude dma_direct_map_resource from the min_low_pfn check
    dma-direct: don't check swiotlb=force in dma_direct_map_resource
    dma-debug: clean up put_hash_bucket()
    powerpc: remove support for NULL dev in __phys_to_dma / __dma_to_phys
    dma-direct: avoid a forward declaration for phys_to_dma
    dma-direct: unify the dma_capable definitions
    dma-mapping: drop the dev argument to arch_sync_dma_for_*
    x86/PCI: sta2x11: use default DMA address translation
    dma-direct: check for overflows on 32 bit DMA addresses
    dma-debug: increase HASH_SIZE
    dma-debug: reorder struct dma_debug_entry fields
    xtensa: use the generic uncached segment support
    dma-mapping: merge the generic remapping helpers into dma-direct
    dma-direct: provide mmap and get_sgtable method overrides
    dma-direct: remove the dma_handle argument to __dma_direct_alloc_pages
    dma-direct: remove __dma_direct_free_pages
    usb: core: Remove redundant vmap checks
    kernel: dma-contiguous: mark CMA parameters __initdata/__initconst
    dma-debug: add a schedule point in debug_dma_dump_mappings()
    ...

    Linus Torvalds
     

21 Nov, 2019

1 commit


14 Nov, 2019

2 commits

  • This is to augment commit 3f5a7896a5 ("x86/mce: Include the PPIN in MCE
    records when available").

    I'm also adding "synd" and "ipid" fields to struct xen_mce, in an
    attempt to keep field offsets in sync with struct mce. These two fields
    won't get populated for now, though.

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

    Jan Beulich
     
  • It has never been part of Xen's public interface, and there's therefore
    no guarantee for MCG_CAP's value to always be present in array entry 0.

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

    Jan Beulich
     

05 Oct, 2019

1 commit

  • Pull xen fixes and cleanups from Juergen Gross:

    - a fix in the Xen balloon driver avoiding hitting a BUG_ON() in some
    cases, plus a follow-on cleanup series for that driver

    - a patch for introducing non-blocking EFI callbacks in Xen's EFI
    driver, plu a cleanup patch for Xen EFI handling merging the x86 and
    ARM arch specific initialization into the Xen EFI driver

    - a fix of the Xen xenbus driver avoiding a self-deadlock when cleaning
    up after a user process has died

    - a fix for Xen on ARM after removal of ZONE_DMA

    - a cleanup patch for avoiding build warnings for Xen on ARM

    * tag 'for-linus-5.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/xenbus: fix self-deadlock after killing user process
    xen/efi: have a common runtime setup function
    arm: xen: mm: use __GPF_DMA32 for arm64
    xen/balloon: Clear PG_offline in balloon_retrieve()
    xen/balloon: Mark pages PG_offline in balloon_append()
    xen/balloon: Drop __balloon_append()
    xen/balloon: Set pages PageOffline() in balloon_add_region()
    ARM: xen: unexport HYPERVISOR_platform_op function
    xen/efi: Set nonblocking callbacks

    Linus Torvalds
     

02 Oct, 2019

1 commit

  • Today the EFI runtime functions are setup in architecture specific
    code (x86 and arm), with the functions themselves living in drivers/xen
    as they are not architecture dependent.

    As the setup is exactly the same for arm and x86 move the setup to
    drivers/xen, too. This at once removes the need to make the single
    functions global visible.

    Signed-off-by: Juergen Gross
    Reviewed-by: Jan Beulich
    [boris: "Dropped EXPORT_SYMBOL_GPL(xen_efi_runtime_setup)"]
    Signed-off-by: Boris Ostrovsky

    Juergen Gross
     

11 Sep, 2019

4 commits

  • Now that we know we always have the dma-noncoherent.h helpers available
    if we are on an architecture with support for non-coherent devices,
    we can just call them directly, and remove the calls to the dma-direct
    routines, including the fact that we call the dma_direct_map_page
    routines but ignore the value returned from it. Instead we now have
    Xen wrappers for the arch_sync_dma_for_{device,cpu} helpers that call
    the special Xen versions of those routines for foreign pages.

    Note that the new helpers get the physical address passed in addition
    to the dma address to avoid another translation for the local cache
    maintainance. The pfn_valid checks remain on the dma address as in
    the old code, even if that looks a little funny.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Boris Ostrovsky
    Reviewed-by: Stefano Stabellini
    Acked-by: Konrad Rzeszutek Wilk

    Christoph Hellwig
     
  • xen_dma_map_page uses a different and more complicated check for foreign
    pages than the other three cache maintainance helpers. Switch it to the
    simpler pfn_valid method a well, and document the scheme with a single
    improved comment in xen_dma_map_page.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Stefano Stabellini

    Christoph Hellwig
     
  • arm and arm64 can just use xen_swiotlb_dma_ops directly like x86, no
    need for a pointer indirection.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Julien Grall
    Reviewed-by: Stefano Stabellini

    Christoph Hellwig
     
  • Shared the duplicate arm/arm64 code in include/xen/arm/page-coherent.h.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Stefano Stabellini

    Christoph Hellwig
     

31 Jul, 2019

1 commit

  • Building the privcmd code as a loadable module on ARM, we get
    a link error due to the private cache management functions:

    ERROR: "__sync_icache_dcache" [drivers/xen/xen-privcmd.ko] undefined!

    Move the code into a new that is always built in when Xen is enabled,
    as suggested by Juergen Gross and Boris Ostrovsky.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Stefano Stabellini
    Signed-off-by: Juergen Gross

    Arnd Bergmann
     

17 Jul, 2019

2 commits

  • The Xen tmem (transcendent memory) driver can be removed, as the
    related Xen hypervisor feature never made it past the "experimental"
    state and will be removed in future Xen versions (>= 4.13).

    The xen-selfballoon driver depends on tmem, so it can be removed, too.

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

    Juergen Gross
     
  • When binding an interdomain event channel to a vcpu via
    IOCTL_EVTCHN_BIND_INTERDOMAIN not only the event channel needs to be
    bound, but the affinity of the associated IRQi must be changed, too.
    Otherwise the IRQ and the event channel won't be moved to another vcpu
    in case the original vcpu they were bound to is going offline.

    Cc: # 4.13
    Fixes: c48f64ab472389df ("xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU")
    Signed-off-by: Juergen Gross
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Juergen Gross

    Juergen Gross
     

02 Apr, 2019

1 commit

  • xen_biovec_phys_mergeable() only needs .bv_page of the 2nd bio bvec
    for checking if the two bvecs can be merged, so pass page to
    xen_biovec_phys_mergeable() directly.

    No function change.

    Cc: ris Ostrovsky
    Cc: Juergen Gross
    Cc: xen-devel@lists.xenproject.org
    Cc: Omar Sandoval
    Cc: Christoph Hellwig
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Ming Lei
    Signed-off-by: Jens Axboe

    Ming Lei
     

18 Feb, 2019

1 commit

  • Don't allow memory to be added above the allowed maximum allocation
    limit set by Xen.

    Trying to do so would result in cases like the following:

    [ 584.559652] ------------[ cut here ]------------
    [ 584.564897] WARNING: CPU: 2 PID: 1 at ../arch/x86/xen/multicalls.c:129 xen_alloc_pte+0x1c7/0x390()
    [ 584.575151] Modules linked in:
    [ 584.578643] Supported: Yes
    [ 584.581750] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.120-92.70-default #1
    [ 584.590000] Hardware name: Cisco Systems Inc UCSC-C460-M4/UCSC-C460-M4, BIOS C460M4.4.0.1b.0.0629181419 06/29/2018
    [ 584.601862] 0000000000000000 ffffffff813175a0 0000000000000000 ffffffff8184777c
    [ 584.610200] ffffffff8107f4e1 ffff880487eb7000 ffff8801862b79c0 ffff88048608d290
    [ 584.618537] 0000000000487eb7 ffffea0000000201 ffffffff81009de7 ffffffff81068561
    [ 584.626876] Call Trace:
    [ 584.629699] [] dump_trace+0x59/0x340
    [ 584.635645] [] show_stack_log_lvl+0xea/0x170
    [ 584.642391] [] show_stack+0x21/0x40
    [ 584.648238] [] dump_stack+0x5c/0x7c
    [ 584.654085] [] warn_slowpath_common+0x81/0xb0
    [ 584.660932] [] xen_alloc_pte+0x1c7/0x390
    [ 584.667289] [] pmd_populate_kernel.constprop.6+0x40/0x80
    [ 584.675241] [] phys_pmd_init+0x210/0x255
    [ 584.681587] [] phys_pud_init+0x1da/0x247
    [ 584.687931] [] kernel_physical_mapping_init+0xf5/0x1d4
    [ 584.695682] [] init_memory_mapping+0x18d/0x380
    [ 584.702631] [] arch_add_memory+0x59/0xf0

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

    Juergen Gross
     

24 Jan, 2019

1 commit

  • Xen-swiotlb hooks into the arm/arm64 arch code through a copy of the DMA
    DMA mapping operations stored in the struct device arch data.

    Switching arm64 to use the direct calls for the merged DMA direct /
    swiotlb code broke this scheme. Replace the indirect calls with
    direct-calls in xen-swiotlb as well to fix this problem.

    Fixes: 356da6d0cde3 ("dma-mapping: bypass indirect calls for dma-direct")
    Reported-by: Julien Grall
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Stefano Stabellini

    Christoph Hellwig
     

19 Dec, 2018

1 commit

  • based frontends. Currently the frontends which implement
    similar code for sharing big buffers between frontend and
    backend are para-virtualized DRM and sound drivers.
    Both define the same way to share grant references of a
    data buffer with the corresponding backend with little
    differences.

    Move shared code into a helper module, so there is a single
    implementation of the same functionality for all.

    This patch introduces code which is used by sound and display
    frontend drivers without functional changes with the intention
    to remove shared code from the corresponding drivers.

    Signed-off-by: Oleksandr Andrushchenko
    Acked-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Oleksandr Andrushchenko
     

14 Dec, 2018

2 commits

  • 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
     
  • We need to refactor PVH entry code so that support for other hypervisors
    like Qemu/KVM can be added more easily.

    This patch moves the small block of code used for initializing Xen PVH
    virtual machines into the Xen specific file. This initialization is not
    going to be needed for Qemu/KVM guests. Moving it out of the common file
    is going to allow us to compile kernels in the future without CONFIG_XEN
    that are still capable of being booted as a Qemu/KVM guest via the PVH
    entry point.

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

    Maran Wilson
     

30 Nov, 2018

1 commit

  • This reverts commit b3cf8528bb21febb650a7ecbf080d0647be40b9f.

    That commit unintentionally broke Xen balloon memory hotplug with
    "hotplug_unpopulated" set to 1. As long as "System RAM" resource
    got assigned under a new "Unusable memory" resource in IO/Mem tree
    any attempt to online this memory would fail due to general kernel
    restrictions on having "System RAM" resources as 1st level only.

    The original issue that commit has tried to workaround fa564ad96366
    ("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f,
    60-7f)") also got amended by the following 03a551734 ("x86/PCI: Move
    and shrink AMD 64-bit window to avoid conflict") which made the
    original fix to Xen ballooning unnecessary.

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

    Igor Druzhinin
     

03 Nov, 2018

1 commit

  • xen_create_contiguous_region has now only an implementation if
    CONFIG_XEN_PV is defined. However, on ARM we never set CONFIG_XEN_PV but
    we do have an implementation of xen_create_contiguous_region which is
    required for swiotlb-xen to work correctly (although it just sets
    *dma_handle).

    Cc: # 4.12
    Fixes: 16624390816c ("xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds")
    Signed-off-by: Stefano Stabellini
    Reviewed-by: Juergen Gross
    CC: Jeff.Kubascik@dornerworks.com
    CC: Jarvis.Roach@dornerworks.com
    CC: Nathan.Studer@dornerworks.com
    CC: vkuznets@redhat.com
    CC: boris.ostrovsky@oracle.com
    CC: jgross@suse.com
    CC: julien.grall@arm.com
    Signed-off-by: Juergen Gross

    Stefano Stabellini
     

24 Oct, 2018

1 commit

  • Pull x86 paravirt updates from Ingo Molnar:
    "Two main changes:

    - Remove no longer used parts of the paravirt infrastructure and put
    large quantities of paravirt ops under a new config option
    PARAVIRT_XXL=y, which is selected by XEN_PV only. (Joergen Gross)

    - Enable PV spinlocks on Hyperv (Yi Sun)"

    * 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/hyperv: Enable PV qspinlock for Hyper-V
    x86/hyperv: Add GUEST_IDLE_MSR support
    x86/paravirt: Clean up native_patch()
    x86/paravirt: Prevent redefinition of SAVE_FLAGS macro
    x86/xen: Make xen_reservation_lock static
    x86/paravirt: Remove unneeded mmu related paravirt ops bits
    x86/paravirt: Move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella
    x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella
    x86/paravirt: Move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella
    x86/paravirt: Move items in pv_info under PARAVIRT_XXL umbrella
    x86/paravirt: Introduce new config option PARAVIRT_XXL
    x86/paravirt: Remove unused paravirt bits
    x86/paravirt: Use a single ops structure
    x86/paravirt: Remove clobbers from struct paravirt_patch_site
    x86/paravirt: Remove clobbers parameter from paravirt patch functions
    x86/paravirt: Make paravirt_patch_call() and paravirt_patch_jmp() static
    x86/xen: Add SPDX identifier in arch/x86/xen files
    x86/xen: Link platform-pci-unplug.o only if CONFIG_XEN_PVHVM
    x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c
    x86/xen: Move pv irq related functions under CONFIG_XEN_PV umbrella

    Linus Torvalds
     

01 Oct, 2018

1 commit

  • Merge -rc6 in, for two reasons:

    1) Resolve a trivial conflict in the blk-mq-tag.c documentation
    2) A few important regression fixes went into upstream directly, so
    they aren't in the 4.20 branch.

    Signed-off-by: Jens Axboe

    * tag 'v4.19-rc6': (780 commits)
    Linux 4.19-rc6
    MAINTAINERS: fix reference to moved drivers/{misc => auxdisplay}/panel.c
    cpufreq: qcom-kryo: Fix section annotations
    perf/core: Add sanity check to deal with pinned event failure
    xen/blkfront: correct purging of persistent grants
    Revert "xen/blkfront: When purging persistent grants, keep them in the buffer"
    selftests/powerpc: Fix Makefiles for headers_install change
    blk-mq: I/O and timer unplugs are inverted in blktrace
    dax: Fix deadlock in dax_lock_mapping_entry()
    x86/boot: Fix kexec booting failure in the SEV bit detection code
    bcache: add separate workqueue for journal_write to avoid deadlock
    drm/amd/display: Fix Edid emulation for linux
    drm/amd/display: Fix Vega10 lightup on S3 resume
    drm/amdgpu: Fix vce work queue was not cancelled when suspend
    Revert "drm/panel: Add device_link from panel device to DRM device"
    xen/blkfront: When purging persistent grants, keep them in the buffer
    clocksource/drivers/timer-atmel-pit: Properly handle error cases
    block: fix deadline elevator drain for zoned block devices
    ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge
    drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
    ...

    Signed-off-by: Jens Axboe

    Jens Axboe
     

26 Sep, 2018

1 commit


14 Sep, 2018

1 commit

  • Scrubbing pages on initial balloon down can take some time, especially
    in nested virtualization case (nested EPT is slow). When HVM/PVH guest is
    started with memory= significantly lower than maxmem=, all the extra
    pages will be scrubbed before returning to Xen. But since most of them
    weren't used at all at that point, Xen needs to populate them first
    (from populate-on-demand pool). In nested virt case (Xen inside KVM)
    this slows down the guest boot by 15-30s with just 1.5GB needed to be
    returned to Xen.

    Add runtime parameter to enable/disable it, to allow initially disabling
    scrubbing, then enable it back during boot (for example in initramfs).
    Such usage relies on assumption that a) most pages ballooned out during
    initial boot weren't used at all, and b) even if they were, very few
    secrets are in the guest at that time (before any serious userspace
    kicks in).
    Convert CONFIG_XEN_SCRUB_PAGES to CONFIG_XEN_SCRUB_PAGES_DEFAULT (also
    enabled by default), controlling default value for the new runtime
    switch.

    Signed-off-by: Marek Marczykowski-Górecki
    Reviewed-by: Juergen Gross
    Signed-off-by: Boris Ostrovsky

    Marek Marczykowski-Górecki
     

03 Sep, 2018

2 commits

  • 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
     
  • All functions in arch/x86/xen/irq.c and arch/x86/xen/xen-asm*.S are
    specific to PV guests. Include them in the kernel with CONFIG_XEN_PV only.

    Make the PV specific code in arch/x86/entry/entry_*.S dependent on
    CONFIG_XEN_PV instead of CONFIG_XEN.

    The HVM specific code should depend on CONFIG_XEN_PVHVM.

    While at it reformat the Makefile to make it more readable.

    Signed-off-by: Juergen Gross
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Boris Ostrovsky
    Acked-by: Thomas Gleixner
    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-2-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
     

27 Jul, 2018

3 commits

  • Extend grant table module API to allow allocating buffers that can
    be used for DMA operations and mapping foreign grant references
    on top of those.
    The resulting buffer is similar to the one allocated by the balloon
    driver in that proper memory reservation is made by
    ({increase|decrease}_reservation and VA mappings are updated if
    needed).
    This is useful for sharing foreign buffers with HW drivers which
    cannot work with scattered buffers provided by the balloon driver,
    but require DMAable memory instead.

    Signed-off-by: Oleksandr Andrushchenko
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Oleksandr Andrushchenko
     
  • Memory {increase|decrease}_reservation and VA mappings update/reset
    code used in balloon driver can be made common, so other drivers can
    also re-use the same functionality without open-coding.
    Create a dedicated file for the shared code and export corresponding
    symbols for other kernel modules.

    Signed-off-by: Oleksandr Andrushchenko
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Oleksandr Andrushchenko
     
  • Make set/clear page private code shared and accessible to
    other kernel modules which can re-use these instead of open-coding.

    Signed-off-by: Oleksandr Andrushchenko
    Reviewed-by: Boris Ostrovsky
    Signed-off-by: Boris Ostrovsky

    Oleksandr Andrushchenko
     

23 Jun, 2018

1 commit

  • Pull xen fixes from Juergen Gross:
    "This contains the following fixes/cleanups:

    - the removal of a BUG_ON() which wasn't necessary and which could
    trigger now due to a recent change

    - a correction of a long standing bug happening very rarely in Xen
    dom0 when a hypercall buffer from user land was not accessible by
    the hypervisor for very short periods of time due to e.g. page
    migration or compaction

    - usage of EXPORT_SYMBOL_GPL() instead of EXPORT_SYMBOL() in a
    Xen-related driver (no breakage possible as using those symbols
    without others already exported via EXPORT-SYMBOL_GPL() wouldn't
    make any sense)

    - a simplification for Xen PVH or Xen ARM guests

    - some additional error handling for callers of xenbus_printf()"

    * tag 'for-linus-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen: Remove unnecessary BUG_ON from __unbind_from_irq()
    xen: add new hypercall buffer mapping device
    xen/scsiback: add error handling for xenbus_printf
    scsi: xen-scsifront: add error handling for xenbus_printf
    xen/grant-table: Export gnttab_{alloc|free}_pages as GPL
    xen: add error handling for xenbus_printf
    xen: share start flags between PV and PVH

    Linus Torvalds
     

19 Jun, 2018

1 commit

  • Use a global variable to store the start flags for both PV and PVH.
    This allows the xen_initial_domain macro to work properly on PVH.

    Note that ARM is also switched to use the new variable.

    Signed-off-by: Boris Ostrovsky
    Signed-off-by: Roger Pau Monné
    Reviewed-by: Juergen Gross
    Signed-off-by: Juergen Gross

    Roger Pau Monne