1. 21 12月, 2017 1 次提交
  2. 09 11月, 2017 1 次提交
  3. 07 11月, 2017 2 次提交
  4. 04 11月, 2017 1 次提交
  5. 03 11月, 2017 1 次提交
    • D
      xen/time: do not decrease steal time after live migration on xen · 5e25f5db
      Dongli Zhang 提交于
      After guest live migration on xen, steal time in /proc/stat
      (cpustat[CPUTIME_STEAL]) might decrease because steal returned by
      xen_steal_lock() might be less than this_rq()->prev_steal_time which is
      derived from previous return value of xen_steal_clock().
      
      For instance, steal time of each vcpu is 335 before live migration.
      
      cpu  198 0 368 200064 1962 0 0 1340 0 0
      cpu0 38 0 81 50063 492 0 0 335 0 0
      cpu1 65 0 97 49763 634 0 0 335 0 0
      cpu2 38 0 81 50098 462 0 0 335 0 0
      cpu3 56 0 107 50138 374 0 0 335 0 0
      
      After live migration, steal time is reduced to 312.
      
      cpu  200 0 370 200330 1971 0 0 1248 0 0
      cpu0 38 0 82 50123 500 0 0 312 0 0
      cpu1 65 0 97 49832 634 0 0 312 0 0
      cpu2 39 0 82 50167 462 0 0 312 0 0
      cpu3 56 0 107 50207 374 0 0 312 0 0
      
      Since runstate times are cumulative and cleared during xen live migration
      by xen hypervisor, the idea of this patch is to accumulate runstate times
      to global percpu variables before live migration suspend. Once guest VM is
      resumed, xen_get_runstate_snapshot_cpu() would always return the sum of new
      runstate times and previously accumulated times stored in global percpu
      variables.
      
      Comment above HYPERVISOR_suspend() has been removed as it is inaccurate:
      the call can return an error code (e.g., possibly -EPERM in the future).
      
      Similar and more severe issue would impact prior linux 4.8-4.10 as
      discussed by Michael Las at
      https://0xstubs.org/debugging-a-flaky-cpu-steal-time-counter-on-a-paravirtualized-xen-guest,
      which would overflow steal time and lead to 100% st usage in top command
      for linux 4.8-4.10. A backport of this patch would fix that issue.
      
      [boris: added linux/slab.h to driver/xen/time.c, slightly reformatted
              commit message]
      
      References: https://0xstubs.org/debugging-a-flaky-cpu-steal-time-counter-on-a-paravirtualized-xen-guestSigned-off-by: NDongli Zhang <dongli.zhang@oracle.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      5e25f5db
  6. 19 9月, 2017 1 次提交
  7. 31 8月, 2017 2 次提交
  8. 23 7月, 2017 1 次提交
    • J
      xen/balloon: don't online new memory initially · 96edd61d
      Juergen Gross 提交于
      When setting up the Xenstore watch for the memory target size the new
      watch will fire at once. Don't try to reach the configured target size
      by onlining new memory in this case, as the current memory size will
      be smaller in almost all cases due to e.g. BIOS reserved pages.
      
      Onlining new memory will lead to more problems e.g. undesired conflicts
      with NVMe devices meant to be operated as block devices.
      
      Instead remember the difference between target size and current size
      when the watch fires for the first time and apply it to any further
      size changes, too.
      
      In order to avoid races between balloon.c and xen-balloon.c init calls
      do the xen-balloon.c initialization from balloon.c.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      96edd61d
  9. 20 6月, 2017 1 次提交
  10. 15 6月, 2017 1 次提交
  11. 13 6月, 2017 2 次提交
    • A
      xen/pvh*: Support > 32 VCPUs at domain restore · 0b64ffb8
      Ankur Arora 提交于
      When Xen restores a PVHVM or PVH guest, its shared_info only holds
      up to 32 CPUs. The hypercall VCPUOP_register_vcpu_info allows
      us to setup per-page areas for VCPUs. This means we can boot
      PVH* guests with more than 32 VCPUs. During restore the per-cpu
      structure is allocated freshly by the hypervisor (vcpu_info_mfn is
      set to INVALID_MFN) so that the newly restored guest can make a
      VCPUOP_register_vcpu_info hypercall.
      
      However, we end up triggering this condition in Xen:
      /* Run this command on yourself or on other offline VCPUS. */
       if ( (v != current) && !test_bit(_VPF_down, &v->pause_flags) )
      
      which means we are unable to setup the per-cpu VCPU structures
      for running VCPUS. The Linux PV code paths makes this work by
      iterating over cpu_possible in xen_vcpu_restore() with:
      
       1) is target CPU up (VCPUOP_is_up hypercall?)
       2) if yes, then VCPUOP_down to pause it
       3) VCPUOP_register_vcpu_info
       4) if it was down, then VCPUOP_up to bring it back up
      
      With Xen commit 192df6f9122d ("xen/x86: allow HVM guests to use
      hypercalls to bring up vCPUs") this is available for non-PV guests.
      As such first check if VCPUOP_is_up is actually possible before
      trying this dance.
      
      As most of this dance code is done already in xen_vcpu_restore()
      let's make it callable on PV, PVH and PVHVM.
      Based-on-patch-by: NKonrad Wilk <konrad.wilk@oracle.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NAnkur Arora <ankur.a.arora@oracle.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      0b64ffb8
    • A
      xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU · c48f64ab
      Anoob Soman 提交于
      A HVM domian booting generates around 200K (evtchn:qemu-dm xen-dyn)
      interrupts,in a short period of time. All these evtchn:qemu-dm are bound
      to VCPU 0, until irqbalance sees these IRQ and moves it to a different VCPU.
      In one configuration, irqbalance runs every 10 seconds, which means
      irqbalance doesn't get to see these burst of interrupts and doesn't
      re-balance interrupts most of the time, making all evtchn:qemu-dm to be
      processed by VCPU0. This cause VCPU0 to spend most of time processing
      hardirq and very little time on softirq. Moreover, if dom0 kernel PREEMPTION
      is disabled, VCPU0 never runs watchdog (process context), triggering a
      softlockup detection code to panic.
      
      Binding evtchn:qemu-dm to next online VCPU, will spread hardirq
      processing evenly across different CPU. Later, irqbalance will try to balance
      evtchn:qemu-dm, if required.
      Signed-off-by: NAnoob Soman <anoob.soman@citrix.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      c48f64ab
  12. 09 6月, 2017 1 次提交
  13. 02 5月, 2017 11 次提交
    • J
      xen: Implement EFI reset_system callback · e371fd76
      Julien Grall 提交于
      When rebooting DOM0 with ACPI on ARM64, the kernel is crashing with the stack
      trace [1].
      
      This is happening because when EFI runtimes are enabled, the reset code
      (see machine_restart) will first try to use EFI restart method.
      
      However, the EFI restart code is expecting the reset_system callback to
      be always set. This is not the case for Xen and will lead to crash.
      
      The EFI restart helper is used in multiple places and some of them don't
      not have fallback (see machine_power_off). So implement reset_system
      callback as a call to xen_reboot when using EFI Xen.
      
      [   36.999270] reboot: Restarting system
      [   37.002921] Internal error: Attempting to execute userspace memory: 86000004 [#1] PREEMPT SMP
      [   37.011460] Modules linked in:
      [   37.014598] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.11.0-rc1-00003-g1e248b60a39b-dirty #506
      [   37.023903] Hardware name: (null) (DT)
      [   37.027734] task: ffff800902068000 task.stack: ffff800902064000
      [   37.033739] PC is at 0x0
      [   37.036359] LR is at efi_reboot+0x94/0xd0
      [   37.040438] pc : [<0000000000000000>] lr : [<ffff00000880f2c4>] pstate: 404001c5
      [   37.047920] sp : ffff800902067cf0
      [   37.051314] x29: ffff800902067cf0 x28: ffff800902068000
      [   37.056709] x27: ffff000008992000 x26: 000000000000008e
      [   37.062104] x25: 0000000000000123 x24: 0000000000000015
      [   37.067499] x23: 0000000000000000 x22: ffff000008e6e250
      [   37.072894] x21: ffff000008e6e000 x20: 0000000000000000
      [   37.078289] x19: ffff000008e5d4c8 x18: 0000000000000010
      [   37.083684] x17: 0000ffffa7c27470 x16: 00000000deadbeef
      [   37.089079] x15: 0000000000000006 x14: ffff000088f42bef
      [   37.094474] x13: ffff000008f42bfd x12: ffff000008e706c0
      [   37.099870] x11: ffff000008e70000 x10: 0000000005f5e0ff
      [   37.105265] x9 : ffff800902067a50 x8 : 6974726174736552
      [   37.110660] x7 : ffff000008cc6fb8 x6 : ffff000008cc6fb0
      [   37.116055] x5 : ffff000008c97dd8 x4 : 0000000000000000
      [   37.121453] x3 : 0000000000000000 x2 : 0000000000000000
      [   37.126845] x1 : 0000000000000000 x0 : 0000000000000000
      [   37.132239]
      [   37.133808] Process systemd-shutdow (pid: 1, stack limit = 0xffff800902064000)
      [   37.141118] Stack: (0xffff800902067cf0 to 0xffff800902068000)
      [   37.146949] 7ce0:                                   ffff800902067d40 ffff000008085334
      [   37.154869] 7d00: 0000000000000000 ffff000008f3b000 ffff800902067d40 ffff0000080852e0
      [   37.162787] 7d20: ffff000008cc6fb0 ffff000008cc6fb8 ffff000008c7f580 ffff000008c97dd8
      [   37.170706] 7d40: ffff800902067d60 ffff0000080e2c2c 0000000000000000 0000000001234567
      [   37.178624] 7d60: ffff800902067d80 ffff0000080e2ee8 0000000000000000 ffff0000080e2df4
      [   37.186544] 7d80: 0000000000000000 ffff0000080830f0 0000000000000000 00008008ff1c1000
      [   37.194462] 7da0: ffffffffffffffff 0000ffffa7c4b1cc 0000000000000000 0000000000000024
      [   37.202380] 7dc0: ffff800902067dd0 0000000000000005 0000fffff24743c8 0000000000000004
      [   37.210299] 7de0: 0000fffff2475f03 0000000000000010 0000fffff2474418 0000000000000005
      [   37.218218] 7e00: 0000fffff2474578 000000000000000a 0000aaaad6b722c0 0000000000000001
      [   37.226136] 7e20: 0000000000000123 0000000000000038 ffff800902067e50 ffff0000081e7294
      [   37.234055] 7e40: ffff800902067e60 ffff0000081e935c ffff800902067e60 ffff0000081e9388
      [   37.241973] 7e60: ffff800902067eb0 ffff0000081ea388 0000000000000000 00008008ff1c1000
      [   37.249892] 7e80: ffffffffffffffff 0000ffffa7c4a79c 0000000000000000 ffff000000020000
      [   37.257810] 7ea0: 0000010000000004 0000000000000000 0000000000000000 ffff0000080830f0
      [   37.265729] 7ec0: fffffffffee1dead 0000000028121969 0000000001234567 0000000000000000
      [   37.273651] 7ee0: ffffffffffffffff 8080000000800000 0000800000008080 feffa9a9d4ff2d66
      [   37.281567] 7f00: 000000000000008e feffa9a9d5b60e0f 7f7fffffffff7f7f 0101010101010101
      [   37.289485] 7f20: 0000000000000010 0000000000000008 000000000000003a 0000ffffa7ccf588
      [   37.297404] 7f40: 0000aaaad6b87d00 0000ffffa7c4b1b0 0000fffff2474be0 0000aaaad6b88000
      [   37.305326] 7f60: 0000fffff2474fb0 0000000001234567 0000000000000000 0000000000000000
      [   37.313240] 7f80: 0000000000000000 0000000000000001 0000aaaad6b70d4d 0000000000000000
      [   37.321159] 7fa0: 0000000000000001 0000fffff2474ea0 0000aaaad6b5e2e0 0000fffff2474e80
      [   37.329078] 7fc0: 0000ffffa7c4b1cc 0000000000000000 fffffffffee1dead 000000000000008e
      [   37.336997] 7fe0: 0000000000000000 0000000000000000 9ce839cffee77eab fafdbf9f7ed57f2f
      [   37.344911] Call trace:
      [   37.347437] Exception stack(0xffff800902067b20 to 0xffff800902067c50)
      [   37.353970] 7b20: ffff000008e5d4c8 0001000000000000 0000000080f82000 0000000000000000
      [   37.361883] 7b40: ffff800902067b60 ffff000008e17000 ffff000008f44c68 00000001081081b4
      [   37.369802] 7b60: ffff800902067bf0 ffff000008108478 0000000000000000 ffff000008c235b0
      [   37.377721] 7b80: ffff800902067ce0 0000000000000000 0000000000000000 0000000000000015
      [   37.385643] 7ba0: 0000000000000123 000000000000008e ffff000008992000 ffff800902068000
      [   37.393557] 7bc0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [   37.401477] 7be0: 0000000000000000 ffff000008c97dd8 ffff000008cc6fb0 ffff000008cc6fb8
      [   37.409396] 7c00: 6974726174736552 ffff800902067a50 0000000005f5e0ff ffff000008e70000
      [   37.417318] 7c20: ffff000008e706c0 ffff000008f42bfd ffff000088f42bef 0000000000000006
      [   37.425234] 7c40: 00000000deadbeef 0000ffffa7c27470
      [   37.430190] [<          (null)>]           (null)
      [   37.434982] [<ffff000008085334>] machine_restart+0x6c/0x70
      [   37.440550] [<ffff0000080e2c2c>] kernel_restart+0x6c/0x78
      [   37.446030] [<ffff0000080e2ee8>] SyS_reboot+0x130/0x228
      [   37.451337] [<ffff0000080830f0>] el0_svc_naked+0x24/0x28
      [   37.456737] Code: bad PC value
      [   37.459891] ---[ end trace 76e2fc17e050aecd ]---
      Signed-off-by: NJulien Grall <julien.grall@arm.com>
      
      --
      
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      
      The x86 code has theoritically a similar issue, altought EFI does not
      seem to be the preferred method. I have only built test it on x86.
      
      This should also probably be fixed in stable tree.
      
          Changes in v2:
              - Implement xen_efi_reset_system using xen_reboot
              - Move xen_efi_reset_system in drivers/xen/efi.c
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      e371fd76
    • J
      xen: Export xen_reboot · 5d9404e1
      Julien Grall 提交于
      The helper xen_reboot will be called by the EFI code in a later patch.
      
      Note that the ARM version does not yet exist and will be added in a
      later patch too.
      Signed-off-by: NJulien Grall <julien.grall@arm.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      5d9404e1
    • S
      xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops · d5ff5061
      Stefano Stabellini 提交于
      Now that __generic_dma_ops is a xen specific function, rename it to
      xen_get_dma_ops. Change all the call sites appropriately.
      Signed-off-by: NStefano Stabellini <sstabellini@kernel.org>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Acked-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: linux@armlinux.org.uk
      CC: catalin.marinas@arm.com
      CC: will.deacon@arm.com
      CC: boris.ostrovsky@oracle.com
      CC: jgross@suse.com
      CC: Julien Grall <julien.grall@arm.com>
      d5ff5061
    • S
      xen/arm,arm64: fix xen_dma_ops after 815dd187 "Consolidate get_dma_ops..." · e0586326
      Stefano Stabellini 提交于
      The following commit:
      
        commit 815dd187
        Author: Bart Van Assche <bart.vanassche@sandisk.com>
        Date:   Fri Jan 20 13:04:04 2017 -0800
      
            treewide: Consolidate get_dma_ops() implementations
      
      rearranges get_dma_ops in a way that xen_dma_ops are not returned when
      running on Xen anymore, dev->dma_ops is returned instead (see
      arch/arm/include/asm/dma-mapping.h:get_arch_dma_ops and
      include/linux/dma-mapping.h:get_dma_ops).
      
      Fix the problem by storing dev->dma_ops in dev_archdata, and setting
      dev->dma_ops to xen_dma_ops. This way, xen_dma_ops is returned naturally
      by get_dma_ops. The Xen code can retrieve the original dev->dma_ops from
      dev_archdata when needed. It also allows us to remove __generic_dma_ops
      from common headers.
      Signed-off-by: NStefano Stabellini <sstabellini@kernel.org>
      Tested-by: NJulien Grall <julien.grall@arm.com>
      Suggested-by: NCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: <stable@vger.kernel.org>        [4.11+]
      CC: linux@armlinux.org.uk
      CC: catalin.marinas@arm.com
      CC: will.deacon@arm.com
      CC: boris.ostrovsky@oracle.com
      CC: jgross@suse.com
      CC: Julien Grall <julien.grall@arm.com>
      e0586326
    • O
      xen/displif: add ABI for para-virtual display · 8945c08e
      Oleksandr Andrushchenko 提交于
      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: NOleksandr Grytsov <oleksandr_grytsov@epam.com>
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      8945c08e
    • O
      xen/sndif: add sound-device ABI · 2843531f
      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: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Signed-off-by: NOleksandr Grytsov <oleksandr_grytsov@epam.com>
      Signed-off-by: NOleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
      Signed-off-by: NIurii Konovalenko <iurii.konovalenko@globallogic.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      2843531f
    • O
      xen/kbdif: add multi-touch support · f9ebfc22
      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: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      f9ebfc22
    • O
      xen/kbdif: update protocol description · 8ec9dd0e
      Oleksandr Andrushchenko 提交于
      The patch clarifies the protocol that is used by the PV keyboard
      drivers.
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      8ec9dd0e
    • S
      xen: introduce the header file for the Xen 9pfs transport protocol · 04c40dfc
      Stefano Stabellini 提交于
      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: NStefano Stabellini <stefano@aporeto.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      04c40dfc
    • S
      xen: import new ring macros in ring.h · 564f7dfd
      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: NStefano Stabellini <stefano@aporeto.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      564f7dfd
    • V
      xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds · 16624390
      Vitaly Kuznetsov 提交于
      xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only,
      they both contain xen_feature(XENFEAT_auto_translated_physmap) check and
      bail in the very beginning.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Reviewed-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      16624390
  14. 28 2月, 2017 1 次提交
  15. 15 2月, 2017 1 次提交
  16. 14 2月, 2017 2 次提交
  17. 10 2月, 2017 2 次提交
  18. 07 2月, 2017 3 次提交
  19. 29 1月, 2017 1 次提交
    • I
      x86/boot/e820: Clean up the E820 table size define names · 08b46d5d
      Ingo Molnar 提交于
      We've got a number of defines related to the E820 table and its size:
      
      	E820MAP
      	E820NR
      	E820_X_MAX
      	E820MAX
      
      The first two denote byte offsets into the zeropage (struct boot_params),
      and can are not used in the kernel and can be removed.
      
      The E820_*_MAX values have an inconsistent structure and it's unclear in any
      case what they mean. 'X' presuably goes for extended - but it's not very
      expressive altogether.
      
      Change these over to:
      
      	E820_MAX_ENTRIES_ZEROPAGE
      	E820_MAX_ENTRIES
      
      ... which are self-explanatory names.
      
      No change in functionality.
      
      Cc: Alex Thorlton <athorlton@sgi.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Huang, Ying <ying.huang@intel.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Jackson <pj@sgi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wei Yang <richard.weiyang@gmail.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      08b46d5d
  20. 25 1月, 2017 1 次提交
    • B
      treewide: Constify most dma_map_ops structures · 5299709d
      Bart Van Assche 提交于
      Most dma_map_ops structures are never modified. Constify these
      structures such that these can be write-protected. This patch
      has been generated as follows:
      
      git grep -l 'struct dma_map_ops' |
        xargs -d\\n sed -i \
          -e 's/struct dma_map_ops/const struct dma_map_ops/g' \
          -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
          -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
          -e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
      sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
        $(git grep -l 'struct dma_map_ops intel_dma_ops');
      sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
        $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
      sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
             -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
             -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
          drivers/pci/host/*.c
      sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
      sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
      sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: linux-arch@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: x86@kernel.org
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      5299709d
  21. 03 12月, 2016 1 次提交
  22. 08 11月, 2016 1 次提交
    • A
      swiotlb-xen: Enforce return of DMA_ERROR_CODE in mapping function · 76418421
      Alexander Duyck 提交于
      The mapping function should always return DMA_ERROR_CODE when a mapping has
      failed as this is what the DMA API expects when a DMA error has occurred.
      The current function for mapping a page in Xen was returning either
      DMA_ERROR_CODE or 0 depending on where it failed.
      
      On x86 DMA_ERROR_CODE is 0, but on other architectures such as ARM it is
      ~0. We need to make sure we return the same error value if either the
      mapping failed or the device is not capable of accessing the mapping.
      
      If we are returning DMA_ERROR_CODE as our error value we can drop the
      function for checking the error code as the default is to compare the
      return value against DMA_ERROR_CODE if no function is defined.
      
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad@kernel.org>
      76418421
  23. 07 11月, 2016 1 次提交