1. 09 Sep, 2013 10 commits
    • Konrad Rzeszutek Wilk's avatar
      Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM" · fb78e58c
      Konrad Rzeszutek Wilk authored
      This reverts commit 70dd4998.
      
      Now that the bugs have been resolved we can re-enable the
      PV ticketlock implementation under PVHVM Xen guests.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      fb78e58c
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: Don't setup xen spinlock IPI kicker if disabled. · 3310bbed
      Konrad Rzeszutek Wilk authored
      There is no need to setup this kicker IPI if we are never going
      to use the paravirtualized ticketlock mechanism.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      3310bbed
    • Konrad Rzeszutek Wilk's avatar
      xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM · 26a79995
      Konrad Rzeszutek Wilk authored
      Before this patch we would patch all of the pv_lock_ops sites
      using alternative assembler. Then later in the bootup cycle
      change the unlock_kick and lock_spinning to the Xen specific -
      without re patching.
      
      That meant that for the core of the kernel we would be running
      with the baremetal version of unlock_kick and lock_spinning while
      for modules we would have the proper Xen specific slowpaths.
      
      As most of the module uses some API from the core kernel that ended
      up with slowpath lockers waiting forever to be kicked (b/c they
      would be using the Xen specific slowpath logic). And the
      kick never came b/c the unlock path that was taken was the
      baremetal one.
      
      On PV we do not have the problem as we initialise before the
      alternative code kicks in.
      
      The fix is to make the updating of the pv_lock_ops function
      be done before the alternative code starts patching.
      
      Note that this patch fixes issues discovered by commit
      f10cd522.
      ("xen: disable PV spinlocks on HVM") wherein it mentioned
      
         PV spinlocks cannot possibly work with the current code because they are
         enabled after pvops patching has already been done, and because PV
         spinlocks use a different data structure than native spinlocks so we
         cannot switch between them dynamically.
      
      The first problem is solved by this patch.
      
      The second problem has been solved by commit
      816434ec
      (Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
      
      P.S.
      There is still the commit 70dd4998
      (xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM) to
      revert but that can be done later after all other bugs have been
      fixed.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      26a79995
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: We don't need the old structure anymore · 6055aaf8
      Konrad Rzeszutek Wilk authored
      As we are using the generic ticketlock structs and these
      old structures are not needed anymore.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      6055aaf8
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: Fix locking path engaging too soon under PVHVM. · 1fb3a8b2
      Konrad Rzeszutek Wilk authored
      The xen_lock_spinning has a check for the kicker interrupts
      and if it is not initialized it will spin normally (not enter
      the slowpath).
      
      But for PVHVM case we would initialize the kicker interrupt
      before the CPU came online. This meant that if the booting
      CPU used a spinlock and went in the slowpath - it would
      enter the slowpath and block forever. The forever part because
      during bootup: the spinlock would be taken _before_ the CPU
      sets itself to be online (more on this further), and we enter
      to poll on the event channel forever.
      
      The bootup CPU (see commit fc78d343
      "xen/smp: initialize IPI vectors before marking CPU online"
      for details) and the CPU that started the bootup consult
      the cpu_online_mask to determine whether the booting CPU should
      get an IPI. The booting CPU has to set itself in this mask via:
      
        set_cpu_online(smp_processor_id(), true);
      
      However, if the spinlock is taken before this (and it is) and
      it polls on an event channel - it will never be woken up as
      the kernel will never send an IPI to an offline CPU.
      
      Note that the PVHVM logic in sending IPIs is using the HVM
      path which has numerous checks using the cpu_online_mask
      and cpu_active_mask. See above mention git commit for details.
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      1fb3a8b2
    • Konrad Rzeszutek Wilk's avatar
      Merge tag 'v3.11-rc7' into stable/for-linus-3.12 · 65320fce
      Konrad Rzeszutek Wilk authored
      Linux 3.11-rc7
      
      As we need the git commit 28817e9de4f039a1a8c1fe1df2fa2df524626b9e
      Author: Chuck Anderson <chuck.anderson@oracle.com>
      Date:   Tue Aug 6 15:12:19 2013 -0700
      
          xen/smp: initialize IPI vectors before marking CPU online
      
      * tag 'v3.11-rc7': (443 commits)
        Linux 3.11-rc7
        ARC: [lib] strchr breakage in Big-endian configuration
        VFS: collect_mounts() should return an ERR_PTR
        bfs: iget_locked() doesn't return an ERR_PTR
        efs: iget_locked() doesn't return an ERR_PTR()
        proc: kill the extra proc_readfd_common()->dir_emit_dots()
        cope with potentially long ->d_dname() output for shmem/hugetlb
        usb: phy: fix build breakage
        USB: OHCI: add missing PCI PM callbacks to ohci-pci.c
        staging: comedi: bug-fix NULL pointer dereference on failed attach
        lib/lz4: correct the LZ4 license
        memcg: get rid of swapaccount leftovers
        nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection
        nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
        drivers/platform/olpc/olpc-ec.c: initialise earlier
        ipv4: expose IPV4_DEVCONF
        ipv6: handle Redirect ICMP Message with no Redirected Header option
        be2net: fix disabling TX in be_close()
        Revert "ACPI / video: Always call acpi_video_init_brightness() on init"
        Revert "genetlink: fix family dump race"
        ...
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      65320fce
    • Konrad Rzeszutek Wilk's avatar
      Merge branch 'x86/spinlocks' of... · c3f31f6a
      Konrad Rzeszutek Wilk authored
      Merge branch 'x86/spinlocks' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into stable/for-linus-3.12
      
      * 'x86/spinlocks' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kvm/guest: Fix sparse warning: "symbol 'klock_waiting' was not declared as static"
        kvm: Paravirtual ticketlocks support for linux guests running on KVM hypervisor
        kvm guest: Add configuration support to enable debug information for KVM Guests
        kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi
        xen, pvticketlock: Allow interrupts to be enabled while blocking
        x86, ticketlock: Add slowpath logic
        jump_label: Split jumplabel ratelimit
        x86, pvticketlock: When paravirtualizing ticket locks, increment by 2
        x86, pvticketlock: Use callee-save for lock_spinning
        xen, pvticketlocks: Add xen_nopvspin parameter to disable xen pv ticketlocks
        xen, pvticketlock: Xen implementation for PV ticket locks
        xen: Defer spinlock setup until boot CPU setup
        x86, ticketlock: Collapse a layer of functions
        x86, ticketlock: Don't inline _spin_unlock when using paravirt spinlocks
        x86, spinlock: Replace pv spinlocks with pv ticketlocks
      c3f31f6a
    • Julien Grall's avatar
      xen/arm: disable cpuidle and cpufreq when linux is running as dom0 · e1a9c16b
      Julien Grall authored
      When linux is running as dom0, Xen doesn't show the physical cpu but a
      virtual CPU.
      On some ARM SOC (for instance the exynos 5250), linux registers callbacks
      for cpuidle and cpufreq. When these callbacks are called, they will modify
      directly the physical cpu not the virtual one. It can impact the whole board
      instead of only dom0.
      Signed-off-by: default avatarJulien Grall <julien.grall@linaro.org>
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      e1a9c16b
    • Boris Ostrovsky's avatar
      xen/p2m: Don't call get_balloon_scratch_page() twice, keep interrupts disabled for multicalls · d7f8f48d
      Boris Ostrovsky authored
      m2p_remove_override() calls get_balloon_scratch_page() in
      MULTI_update_va_mapping() even though it already has pointer to this page from
      the earlier call (in scratch_page). This second call doesn't have a matching
      put_balloon_scratch_page() thus not restoring preempt count back. (Also, there
      is no put_balloon_scratch_page() in the error path.)
      
      In addition, the second multicall uses __xen_mc_entry() which does not disable
      interrupts. Rearrange xen_mc_* calls to keep interrupts off while performing
      multicalls.
      
      This commit fixes a regression introduced by:
      
      commit ee072640
      Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Date:   Tue Jul 23 17:23:54 2013 +0000
      
          xen/m2p: use GNTTABOP_unmap_and_replace to reinstate the original mapping
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      d7f8f48d
    • Rob Herring's avatar
      ARM: xen: only set pm function ptrs for Xen guests · 9dd4b294
      Rob Herring authored
      xen_pm_init was unconditionally setting pm_power_off and arm_pm_restart
      function pointers. This breaks multi-platform kernels. Make this
      conditional on running as a Xen guest and make it a late_initcall to
      ensure it is setup after platform code for Dom0.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      CC: stable@vger.kernel.org
      9dd4b294
  2. 30 Aug, 2013 5 commits
  3. 26 Aug, 2013 1 commit
  4. 25 Aug, 2013 4 commits
  5. 24 Aug, 2013 8 commits
  6. 23 Aug, 2013 12 commits