1. 14 11月, 2012 2 次提交
  2. 01 11月, 2012 2 次提交
    • M
      Merge branch 'for-queue' of https://github.com/agraf/linux-2.6 into queue · f026399f
      Marcelo Tosatti 提交于
      * 'for-queue' of https://github.com/agraf/linux-2.6:
        PPC: ePAPR: Convert hcall header to uapi (round 2)
        KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte()
        KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0
        KVM: PPC: Book3S HV: Fix accounting of stolen time
        KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run
        KVM: PPC: Book3S HV: Fixes for late-joining threads
        KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock
        KVM: PPC: Book3S HV: Fix some races in starting secondary threads
        KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online
        PPC: ePAPR: Convert header to uapi
        KVM: PPC: Move mtspr/mfspr emulation into own functions
        KVM: Documentation: Fix reentry-to-be-consistent paragraph
        KVM: PPC: 44x: fix DCR read/write
      f026399f
    • J
      KVM: SVM: update MAINTAINERS entry · 7de609c8
      Joerg Roedel 提交于
      I have no access to my AMD email address anymore. Update
      entry in MAINTAINERS to the new address.
      
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      7de609c8
  3. 31 10月, 2012 2 次提交
  4. 30 10月, 2012 14 次提交
    • P
      KVM: PPC: Book3S HV: Fix thinko in try_lock_hpte() · 8b5869ad
      Paul Mackerras 提交于
      This fixes an error in the inline asm in try_lock_hpte() where we
      were erroneously using a register number as an immediate operand.
      The bug only affects an error path, and in fact the code will still
      work as long as the compiler chooses some register other than r0
      for the "bits" variable.  Nevertheless it should still be fixed.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8b5869ad
    • P
      KVM: PPC: Book3S HV: Allow DTL to be set to address 0, length 0 · 9f8c8c78
      Paul Mackerras 提交于
      Commit 55b665b0 ("KVM: PPC: Book3S HV: Provide a way for userspace
      to get/set per-vCPU areas") includes a check on the length of the
      dispatch trace log (DTL) to make sure the buffer is at least one entry
      long.  This is appropriate when registering a buffer, but the
      interface also allows for any existing buffer to be unregistered by
      specifying a zero address.  In this case the length check is not
      appropriate.  This makes the check conditional on the address being
      non-zero.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      9f8c8c78
    • P
      KVM: PPC: Book3S HV: Fix accounting of stolen time · c7b67670
      Paul Mackerras 提交于
      Currently the code that accounts stolen time tends to overestimate the
      stolen time, and will sometimes report more stolen time in a DTL
      (dispatch trace log) entry than has elapsed since the last DTL entry.
      This can cause guests to underflow the user or system time measured
      for some tasks, leading to ridiculous CPU percentages and total runtimes
      being reported by top and other utilities.
      
      In addition, the current code was designed for the previous policy where
      a vcore would only run when all the vcpus in it were runnable, and so
      only counted stolen time on a per-vcore basis.  Now that a vcore can
      run while some of the vcpus in it are doing other things in the kernel
      (e.g. handling a page fault), we need to count the time when a vcpu task
      is preempted while it is not running as part of a vcore as stolen also.
      
      To do this, we bring back the BUSY_IN_HOST vcpu state and extend the
      vcpu_load/put functions to count preemption time while the vcpu is
      in that state.  Handling the transitions between the RUNNING and
      BUSY_IN_HOST states requires checking and updating two variables
      (accumulated time stolen and time last preempted), so we add a new
      spinlock, vcpu->arch.tbacct_lock.  This protects both the per-vcpu
      stolen/preempt-time variables, and the per-vcore variables while this
      vcpu is running the vcore.
      
      Finally, we now don't count time spent in userspace as stolen time.
      The task could be executing in userspace on behalf of the vcpu, or
      it could be preempted, or the vcpu could be genuinely stopped.  Since
      we have no way of dividing up the time between these cases, we don't
      count any of it as stolen.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      c7b67670
    • P
      KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run · 8455d79e
      Paul Mackerras 提交于
      Currently the Book3S HV code implements a policy on multi-threaded
      processors (i.e. POWER7) that requires all of the active vcpus in a
      virtual core to be ready to run before we run the virtual core.
      However, that causes problems on reset, because reset stops all vcpus
      except vcpu 0, and can also reduce throughput since all four threads
      in a virtual core have to wait whenever any one of them hits a
      hypervisor page fault.
      
      This relaxes the policy, allowing the virtual core to run as soon as
      any vcpu in it is runnable.  With this, the KVMPPC_VCPU_STOPPED state
      and the KVMPPC_VCPU_BUSY_IN_HOST state have been combined into a single
      KVMPPC_VCPU_NOTREADY state, since we no longer need to distinguish
      between them.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8455d79e
    • P
      KVM: PPC: Book3S HV: Fixes for late-joining threads · 2f12f034
      Paul Mackerras 提交于
      If a thread in a virtual core becomes runnable while other threads
      in the same virtual core are already running in the guest, it is
      possible for the latecomer to join the others on the core without
      first pulling them all out of the guest.  Currently this only happens
      rarely, when a vcpu is first started.  This fixes some bugs and
      omissions in the code in this case.
      
      First, we need to check for VPA updates for the latecomer and make
      a DTL entry for it.  Secondly, if it comes along while the master
      vcpu is doing a VPA update, we don't need to do anything since the
      master will pick it up in kvmppc_run_core.  To handle this correctly
      we introduce a new vcore state, VCORE_STARTING.  Thirdly, there is
      a race because we currently clear the hardware thread's hwthread_req
      before waiting to see it get to nap.  A latecomer thread could have
      its hwthread_req cleared before it gets to test it, and therefore
      never increment the nap_count, leading to messages about wait_for_nap
      timeouts.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      2f12f034
    • P
      KVM: PPC: Book3s HV: Don't access runnable threads list without vcore lock · 913d3ff9
      Paul Mackerras 提交于
      There were a few places where we were traversing the list of runnable
      threads in a virtual core, i.e. vc->runnable_threads, without holding
      the vcore spinlock.  This extends the places where we hold the vcore
      spinlock to cover everywhere that we traverse that list.
      
      Since we possibly need to sleep inside kvmppc_book3s_hv_page_fault,
      this moves the call of it from kvmppc_handle_exit out to
      kvmppc_vcpu_run, where we don't hold the vcore lock.
      
      In kvmppc_vcore_blocked, we don't actually need to check whether
      all vcpus are ceded and don't have any pending exceptions, since the
      caller has already done that.  The caller (kvmppc_run_vcpu) wasn't
      actually checking for pending exceptions, so we add that.
      
      The change of if to while in kvmppc_run_vcpu is to make sure that we
      never call kvmppc_remove_runnable() when the vcore state is RUNNING or
      EXITING.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      913d3ff9
    • P
      KVM: PPC: Book3S HV: Fix some races in starting secondary threads · 7b444c67
      Paul Mackerras 提交于
      Subsequent patches implementing in-kernel XICS emulation will make it
      possible for IPIs to arrive at secondary threads at arbitrary times.
      This fixes some races in how we start the secondary threads, which
      if not fixed could lead to occasional crashes of the host kernel.
      
      This makes sure that (a) we have grabbed all the secondary threads,
      and verified that they are no longer in the kernel, before we start
      any thread, (b) that the secondary thread loads its vcpu pointer
      after clearing the IPI that woke it up (so we don't miss a wakeup),
      and (c) that the secondary thread clears its vcpu pointer before
      incrementing the nap count.  It also removes unnecessary setting
      of the vcpu and vcore pointers in the paca in kvmppc_core_vcpu_load.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7b444c67
    • P
      KVM: PPC: Book3S HV: Allow KVM guests to stop secondary threads coming online · 512691d4
      Paul Mackerras 提交于
      When a Book3S HV KVM guest is running, we need the host to be in
      single-thread mode, that is, all of the cores (or at least all of
      the cores where the KVM guest could run) to be running only one
      active hardware thread.  This is because of the hardware restriction
      in POWER processors that all of the hardware threads in the core
      must be in the same logical partition.  Complying with this restriction
      is much easier if, from the host kernel's point of view, only one
      hardware thread is active.
      
      This adds two hooks in the SMP hotplug code to allow the KVM code to
      make sure that secondary threads (i.e. hardware threads other than
      thread 0) cannot come online while any KVM guest exists.  The KVM
      code still has to check that any core where it runs a guest has the
      secondary threads offline, but having done that check it can now be
      sure that they will not come online while the guest is running.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      512691d4
    • A
      PPC: ePAPR: Convert header to uapi · c99ec973
      Alexander Graf 提交于
      The new uapi framework splits kernel internal and user space exported
      bits of header files more cleanly. Adjust the ePAPR header accordingly.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      c99ec973
    • A
      KVM: PPC: Move mtspr/mfspr emulation into own functions · 388cf9ee
      Alexander Graf 提交于
      The mtspr/mfspr emulation code became quite big over time. Move it
      into its own function so things stay more readable.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      388cf9ee
    • A
      KVM: Documentation: Fix reentry-to-be-consistent paragraph · 686de182
      Alexander Graf 提交于
      All user space offloaded instruction emulation needs to reenter kvm
      to produce consistent state again. Fix the section in the documentation
      to mention all of them.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      686de182
    • A
      KVM: PPC: 44x: fix DCR read/write · e43a0287
      Alexander Graf 提交于
      When remembering the direction of a DCR transaction, we should write
      to the same variable that we interpret on later when doing vcpu_run
      again.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Cc: stable@vger.kernel.org
      e43a0287
    • X
      KVM: do not treat noslot pfn as a error pfn · 81c52c56
      Xiao Guangrong 提交于
      This patch filters noslot pfn out from error pfns based on Marcelo comment:
      noslot pfn is not a error pfn
      
      After this patch,
      - is_noslot_pfn indicates that the gfn is not in slot
      - is_error_pfn indicates that the gfn is in slot but the error is occurred
        when translate the gfn to pfn
      - is_error_noslot_pfn indicates that the pfn either it is error pfns or it
        is noslot pfn
      And is_invalid_pfn can be removed, it makes the code more clean
      Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      81c52c56
    • M
      Merge remote-tracking branch 'master' into queue · 19bf7f8a
      Marcelo Tosatti 提交于
      Merge reason: development work has dependency on kvm patches merged
      upstream.
      
      Conflicts:
      	arch/powerpc/include/asm/Kbuild
      	arch/powerpc/include/asm/kvm_para.h
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      19bf7f8a
  5. 29 10月, 2012 13 次提交
  6. 27 10月, 2012 7 次提交
    • A
      Revert "ARM i.MX25: Fix PWM per clock lookups" · 943bb487
      Arnd Bergmann 提交于
      This reverts commit 92063cee, it
      was applied prematurely, causing this build error for
      imx_v4_v5_defconfig:
      
      arch/arm/mach-imx/clk-imx25.c: In function 'mx25_clocks_init':
      arch/arm/mach-imx/clk-imx25.c:206:26: error: 'pwm_ipg_per' undeclared (first use in this function)
      arch/arm/mach-imx/clk-imx25.c:206:26: note: each undeclared identifier is reported only once for each function it appears in
      
      Sascha Hauer explains:
      > There are several gates missing in clk-imx25.c. I have a patch which
      > adds support for them and I seem to have missed that the above depends
      > on it.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      943bb487
    • A
      ARM: versatile: fix versatile_defconfig · 5b627ba0
      Arnd Bergmann 提交于
      With the introduction of CONFIG_ARCH_MULTIPLATFORM, versatile is
      no longer the default platform, so we need to enable
      CONFIG_ARCH_VERSATILE explicitly in order for that to be selected
      rather than the multiplatform configuration.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5b627ba0
    • T
      ARM: mvebu: update defconfig with 3.7 changes · e09348c7
      Thomas Petazzoni 提交于
      The split of 370 and XP into two Kconfig options and the multiplatform
      kernel support has changed a few Kconfig symbols, so let's update the
      mvebu_defconfig file with the latest changes.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      e09348c7
    • A
      ARM: at91: fix at91x40 build · 0654f4ab
      Arnd Bergmann 提交于
      patch 738a0fd7 "ARM: at91: fix external interrupts in non-DT case"
      fixed a run-time error on some at91 platforms but did not apply
      the same change to at91x40, which now doesn't build.
      
      This changes at91x40 in the same way that the other platforms
      were changed.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      0654f4ab
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e657e078
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "This is what we usually expect at this stage of the game, lots of
        little things, mostly in drivers.  With the occasional 'oops didn't
        mean to do that' kind of regressions in the core code."
      
       1) Uninitialized data in __ip_vs_get_timeouts(), from Arnd Bergmann
      
       2) Reject invalid ACK sequences in Fast Open sockets, from Jerry Chu.
      
       3) Lost error code on return from _rtl_usb_receive(), from Christian
          Lamparter.
      
       4) Fix reset resume on USB rt2x00, from Stanislaw Gruszka.
      
       5) Release resources on error in pch_gbe driver, from Veaceslav Falico.
      
       6) Default hop limit not set correctly in ip6_template_metrics[], fix
          from Li RongQing.
      
       7) Gianfar PTP code requests wrong kind of resource during probe, fix
          from Wei Yang.
      
       8) Fix VHOST net driver on big-endian, from Michael S Tsirkin.
      
       9) Mallenox driver bug fixes from Jack Morgenstein, Or Gerlitz, Moni
          Shoua, Dotan Barak, and Uri Habusha.
      
      10) usbnet leaks memory on TX path, fix from Hemant Kumar.
      
      11) Use socket state test, rather than presence of FIN bit packet, to
          determine FIONREAD/SIOCINQ value.  Fix from Eric Dumazet.
      
      12) Fix cxgb4 build failure, from Vipul Pandya.
      
      13) Provide a SYN_DATA_ACKED state to complement SYN_FASTOPEN in socket
          info dumps.  From Yuchung Cheng.
      
      14) Fix leak of security path in kfree_skb_partial().  Fix from Eric
          Dumazet.
      
      15) Handle RX FIFO overflows more resiliently in pch_gbe driver, from
          Veaceslav Falico.
      
      16) Fix MAINTAINERS file pattern for networking drivers, from Jean
          Delvare.
      
      17) Add iPhone5 IDs to IPHETH driver, from Jay Purohit.
      
      18) VLAN device type change restriction is too strict, and should not
          trigger for the automatically generated vlan0 device.  Fix from Jiri
          Pirko.
      
      19) Make PMTU/redirect flushing work properly again in ipv4, from
          Steffen Klassert.
      
      20) Fix memory corruptions by using kfree_rcu() in netlink_release().
          From Eric Dumazet.
      
      21) More qmi_wwan device IDs, from Bjørn Mork.
      
      22) Fix unintentional change of SNAT/DNAT hooks in generic NAT
          infrastructure, from Elison Niven.
      
      23) Fix 3.6.x regression in xt_TEE netfilter module, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits)
        tilegx: fix some issues in the SW TSO support
        qmi_wwan/cdc_ether: move Novatel 551 and E362 to qmi_wwan
        net: usb: Fix memory leak on Tx data path
        net/mlx4_core: Unmap UAR also in the case of error flow
        net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
        net/mlx4_en: Fix double-release-range in tx-rings
        bas_gigaset: fix pre_reset handling
        vhost: fix mergeable bufs on BE hosts
        gianfar_ptp: use iomem, not ioports resource tree in probe
        ipv6: Set default hoplimit as zero.
        NET_VENDOR_TI: make available for am33xx as well
        pch_gbe: fix error handling in pch_gbe_up()
        b43: Fix oops on unload when firmware not found
        mwifiex: clean up scan state on error
        mwifiex: return -EBUSY if specific scan request cannot be honored
        brcmfmac: fix potential NULL dereference
        Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz"
        ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
        rt2x00: usb: fix reset resume
        rtlwifi: pass rx setup error code to caller
        ...
      e657e078
    • L
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · f761237e
      Linus Torvalds 提交于
      Pull slave-dmaengine fixes from Vinod Koul:
       "Three fixes for slave dmanegine.
      
        Two are for typo omissions in sifr dmaengine driver and the last one
        is for the imx driver fixing a missing unlock"
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: sirf: fix a typo in moving running dma_desc to active queue
        dmaengine: sirf: fix a typo in dma_prep_interleaved
        dmaengine: imx-dma: fix missing unlock on error in imxdma_xfer_desc()
      f761237e
    • L
      Merge tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 64b1cbaa
      Linus Torvalds 提交于
      Pull power management and ACPI fixes from Rafael J Wysocki:
      
       - Fix for a memory leak in acpi_bind_one() from Jesper Juhl.
      
       - Fix for an error code path memory leak in pm_genpd_attach_cpuidle()
         from Jonghwan Choi.
      
       - Fix for smp_processor_id() usage in preemptible code in powernow-k8
         from Andreas Herrmann.
      
       - Fix for a suspend-related memory leak in cpufreq stats from Xiaobing
         Tu.
      
       - Freezer fix for failure to clear PF_NOFREEZE along with PF_KTHREAD in
         flush_old_exec() from Oleg Nesterov.
      
       - acpi_processor_notify() fix from Alan Cox.
      
      * tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: missing break
        freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD
        Fix memory leak in cpufreq stats.
        cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code
        PM / Domains: Fix memory leak on error path in pm_genpd_attach_cpuidle
        ACPI: Fix memory leak in acpi_bind_one()
      64b1cbaa