1. 13 3月, 2014 1 次提交
  2. 30 1月, 2014 4 次提交
  3. 27 1月, 2014 21 次提交
    • P
      KVM: PPC: Book3S PR: Cope with doorbell interrupts · 40688909
      Paul Mackerras 提交于
      When the PR host is running on a POWER8 machine in POWER8 mode, it
      will use doorbell interrupts for IPIs.  If one of them arrives while
      we are in the guest, we pop out of the guest with trap number 0xA00,
      which isn't handled by kvmppc_handle_exit_pr, leading to the following
      BUG_ON:
      
      [  331.436215] exit_nr=0xa00 | pc=0x1d2c | msr=0x800000000000d032
      [  331.437522] ------------[ cut here ]------------
      [  331.438296] kernel BUG at arch/powerpc/kvm/book3s_pr.c:982!
      [  331.439063] Oops: Exception in kernel mode, sig: 5 [#2]
      [  331.439819] SMP NR_CPUS=1024 NUMA pSeries
      [  331.440552] Modules linked in: tun nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6t_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw virtio_net kvm binfmt_misc ibmvscsi scsi_transport_srp scsi_tgt virtio_blk
      [  331.447614] CPU: 11 PID: 1296 Comm: qemu-system-ppc Tainted: G      D      3.11.7-200.2.fc19.ppc64p7 #1
      [  331.448920] task: c0000003bdc8c000 ti: c0000003bd32c000 task.ti: c0000003bd32c000
      [  331.450088] NIP: d0000000025d6b9c LR: d0000000025d6b98 CTR: c0000000004cfdd0
      [  331.451042] REGS: c0000003bd32f420 TRAP: 0700   Tainted: G      D       (3.11.7-200.2.fc19.ppc64p7)
      [  331.452331] MSR: 800000000282b032 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI>  CR: 28004824  XER: 20000000
      [  331.454616] SOFTE: 1
      [  331.455106] CFAR: c000000000848bb8
      [  331.455726]
      GPR00: d0000000025d6b98 c0000003bd32f6a0 d0000000026017b8 0000000000000032
      GPR04: c0000000018627f8 c000000001873208 320d0a3030303030 3030303030643033
      GPR08: c000000000c490a8 0000000000000000 0000000000000000 0000000000000002
      GPR12: 0000000028004822 c00000000fdc6300 0000000000000000 00000100076ec310
      GPR16: 000000002ae343b8 00003ffffd397398 0000000000000000 0000000000000000
      GPR20: 00000100076f16f4 00000100076ebe60 0000000000000008 ffffffffffffffff
      GPR24: 0000000000000000 0000008001041e60 0000000000000000 0000008001040ce8
      GPR28: c0000003a2d80000 0000000000000a00 0000000000000001 c0000003a2681810
      [  331.466504] NIP [d0000000025d6b9c] .kvmppc_handle_exit_pr+0x75c/0xa80 [kvm]
      [  331.466999] LR [d0000000025d6b98] .kvmppc_handle_exit_pr+0x758/0xa80 [kvm]
      [  331.467517] Call Trace:
      [  331.467909] [c0000003bd32f6a0] [d0000000025d6b98] .kvmppc_handle_exit_pr+0x758/0xa80 [kvm] (unreliable)
      [  331.468553] [c0000003bd32f750] [d0000000025d98f0] kvm_start_lightweight+0xb4/0xc4 [kvm]
      [  331.469189] [c0000003bd32f920] [d0000000025d7648] .kvmppc_vcpu_run_pr+0xd8/0x270 [kvm]
      [  331.469838] [c0000003bd32f9c0] [d0000000025cf748] .kvmppc_vcpu_run+0xc8/0xf0 [kvm]
      [  331.470790] [c0000003bd32fa50] [d0000000025cc19c] .kvm_arch_vcpu_ioctl_run+0x5c/0x1b0 [kvm]
      [  331.471401] [c0000003bd32fae0] [d0000000025c4888] .kvm_vcpu_ioctl+0x478/0x730 [kvm]
      [  331.472026] [c0000003bd32fc90] [c00000000026192c] .do_vfs_ioctl+0x4dc/0x7a0
      [  331.472561] [c0000003bd32fd80] [c000000000261cc4] .SyS_ioctl+0xd4/0xf0
      [  331.473095] [c0000003bd32fe30] [c000000000009ed8] syscall_exit+0x0/0x98
      [  331.473633] Instruction dump:
      [  331.473766] 4bfff9b4 2b9d0800 419efc18 60000000 60420000 3d220000 e8bf11a0 e8df12a8
      [  331.474733] 7fa4eb78 e8698660 48015165 e8410028 <0fe00000> 813f00e4 3ba00000 39290001
      [  331.475386] ---[ end trace 49fc47d994c1f8f2 ]---
      [  331.479817]
      
      This fixes the problem by making kvmppc_handle_exit_pr() recognize the
      interrupt.  We also need to jump to the doorbell interrupt handler in
      book3s_segment.S to handle the interrupt on the way out of the guest.
      Having done that, there's nothing further to be done in
      kvmppc_handle_exit_pr().
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      40688909
    • M
      KVM: PPC: Book3S HV: Add software abort codes for transactional memory · b17dfec0
      Michael Neuling 提交于
      This adds the software abort code defines for transactional memory (TM).
      These values are from PAPR.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b17dfec0
    • M
      KVM: PPC: Book3S HV: Add new state for transactional memory · 7b490411
      Michael Neuling 提交于
      Add new state for transactional memory (TM) to kvm_vcpu_arch.  Also add
      asm-offset bits that are going to be required.
      
      This also moves the existing TFHAR, TFIAR and TEXASR SPRs into a
      CONFIG_PPC_TRANSACTIONAL_MEM section.  This requires some code changes to
      ensure we still compile with CONFIG_PPC_TRANSACTIONAL_MEM=N.  Much of the added
      the added #ifdefs are removed in a later patch when the bulk of the TM code is
      added.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      [agraf: fix merge conflict]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7b490411
    • M
      powerpc/Kconfig: Make TM select VSX and VMX · 7b37a123
      Michael Neuling 提交于
      There are no processors in existence that have TM but no VMX or VSX.  So let's
      makes CONFIG_PPC_TRANSACTIONAL_MEM select both CONFIG_VSX and CONFIG_ALTIVEC.
      This makes the code a lot simpler by removing the need for a bunch of #ifdefs.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7b37a123
    • A
      KVM: PPC: Book3S HV: Basic little-endian guest support · d682916a
      Anton Blanchard 提交于
      We create a guest MSR from scratch when delivering exceptions in
      a few places.  Instead of extracting LPCR[ILE] and inserting it
      into MSR_LE each time, we simply create a new variable intr_msr which
      contains the entire MSR to use.  For a little-endian guest, userspace
      needs to set the ILE (interrupt little-endian) bit in the LPCR for
      each vcpu (or at least one vcpu in each virtual core).
      
      [paulus@samba.org - removed H_SET_MODE implementation from original
      version of the patch, and made kvmppc_set_lpcr update vcpu->arch.intr_msr.]
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d682916a
    • P
      KVM: PPC: Book3S HV: Add support for DABRX register on POWER7 · 8563bf52
      Paul Mackerras 提交于
      The DABRX (DABR extension) register on POWER7 processors provides finer
      control over which accesses cause a data breakpoint interrupt.  It
      contains 3 bits which indicate whether to enable accesses in user,
      kernel and hypervisor modes respectively to cause data breakpoint
      interrupts, plus one bit that enables both real mode and virtual mode
      accesses to cause interrupts.  Currently, KVM sets DABRX to allow
      both kernel and user accesses to cause interrupts while in the guest.
      
      This adds support for the guest to specify other values for DABRX.
      PAPR defines a H_SET_XDABR hcall to allow the guest to set both DABR
      and DABRX with one call.  This adds a real-mode implementation of
      H_SET_XDABR, which shares most of its code with the existing H_SET_DABR
      implementation.  To support this, we add a per-vcpu field to store the
      DABRX value plus code to get and set it via the ONE_REG interface.
      
      For Linux guests to use this new hcall, userspace needs to add
      "hcall-xdabr" to the set of strings in the /chosen/hypertas-functions
      property in the device tree.  If userspace does this and then migrates
      the guest to a host where the kernel doesn't include this patch, then
      userspace will need to implement H_SET_XDABR by writing the specified
      DABR value to the DABR using the ONE_REG interface.  In that case, the
      old kernel will set DABRX to DABRX_USER | DABRX_KERNEL.  That should
      still work correctly, at least for Linux guests, since Linux guests
      cope with getting data breakpoint interrupts in modes that weren't
      requested by just ignoring the interrupt, and Linux guests never set
      DABRX_BTI.
      
      The other thing this does is to make H_SET_DABR and H_SET_XDABR work
      on POWER8, which has the DAWR and DAWRX instead of DABR/X.  Guests that
      know about POWER8 should use H_SET_MODE rather than H_SET_[X]DABR, but
      guests running in POWER7 compatibility mode will still use H_SET_[X]DABR.
      For them, this adds the logic to convert DABR/X values into DAWR/X values
      on POWER8.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      8563bf52
    • P
      KVM: PPC: Book3S HV: Prepare for host using hypervisor doorbells · 5d00f66b
      Paul Mackerras 提交于
      POWER8 has support for hypervisor doorbell interrupts.  Though the
      kernel doesn't use them for IPIs on the powernv platform yet, it
      probably will in future, so this makes KVM cope gracefully if a
      hypervisor doorbell interrupt arrives while in a guest.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5d00f66b
    • P
      KVM: PPC: Book3S HV: Handle new LPCR bits on POWER8 · e0622bd9
      Paul Mackerras 提交于
      POWER8 has a bit in the LPCR to enable or disable the PURR and SPURR
      registers to count when in the guest.  Set this bit.
      
      POWER8 has a field in the LPCR called AIL (Alternate Interrupt Location)
      which is used to enable relocation-on interrupts.  Allow userspace to
      set this field.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e0622bd9
    • P
      KVM: PPC: Book3S HV: Handle guest using doorbells for IPIs · aa31e843
      Paul Mackerras 提交于
      * SRR1 wake reason field for system reset interrupt on wakeup from nap
        is now a 4-bit field on P8, compared to 3 bits on P7.
      
      * Set PECEDP in LPCR when napping because of H_CEDE so guest doorbells
        will wake us up.
      
      * Waking up from nap because of a guest doorbell interrupt is not a
        reason to exit the guest.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      aa31e843
    • P
      KVM: PPC: Book3S HV: Consolidate code that checks reason for wake from nap · e3bbbbfa
      Paul Mackerras 提交于
      Currently in book3s_hv_rmhandlers.S we have three places where we
      have woken up from nap mode and we check the reason field in SRR1
      to see what event woke us up.  This consolidates them into a new
      function, kvmppc_check_wake_reason.  It looks at the wake reason
      field in SRR1, and if it indicates that an external interrupt caused
      the wakeup, calls kvmppc_read_intr to check what sort of interrupt
      it was.
      
      This also consolidates the two places where we synthesize an external
      interrupt (0x500 vector) for the guest.  Now, if the guest exit code
      finds that there was an external interrupt which has been handled
      (i.e. it was an IPI indicating that there is now an interrupt pending
      for the guest), it jumps to deliver_guest_interrupt, which is in the
      last part of the guest entry code, where we synthesize guest external
      and decrementer interrupts.  That code has been streamlined a little
      and now clears LPCR[MER] when appropriate as well as setting it.
      
      The extra clearing of any pending IPI on a secondary, offline CPU
      thread before going back to nap mode has been removed.  It is no longer
      necessary now that we have code to read and acknowledge IPIs in the
      guest exit path.
      
      This fixes a minor bug in the H_CEDE real-mode handling - previously,
      if we found that other threads were already exiting the guest when we
      were about to go to nap mode, we would branch to the cede wakeup path
      and end up looking in SRR1 for a wakeup reason.  Now we branch to a
      point after we have checked the wakeup reason.
      
      This also fixes a minor bug in kvmppc_read_intr - previously it could
      return 0xff rather than 1, in the case where we find that a host IPI
      is pending after we have cleared the IPI.  Now it returns 1.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e3bbbbfa
    • P
      KVM: PPC: Book3S HV: Implement architecture compatibility modes for POWER8 · 5557ae0e
      Paul Mackerras 提交于
      This allows us to select architecture 2.05 (POWER6) or 2.06 (POWER7)
      compatibility modes on a POWER8 processor.  (Note that transactional
      memory is disabled for usermode if either or both of the PCR_TM_DIS
      and PCR_ARCH_206 bits are set.)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5557ae0e
    • M
      KVM: PPC: Book3S HV: Add handler for HV facility unavailable · bd3048b8
      Michael Ellerman 提交于
      At present this should never happen, since the host kernel sets
      HFSCR to allow access to all facilities.  It's better to be prepared
      to handle it cleanly if it does ever happen, though.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      bd3048b8
    • P
      KVM: PPC: Book3S HV: Flush the correct number of TLB sets on POWER8 · ca252055
      Paul Mackerras 提交于
      POWER8 has 512 sets in the TLB, compared to 128 for POWER7, so we need
      to do more tlbiel instructions when flushing the TLB on POWER8.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ca252055
    • M
      KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs · b005255e
      Michael Neuling 提交于
      This adds fields to the struct kvm_vcpu_arch to store the new
      guest-accessible SPRs on POWER8, adds code to the get/set_one_reg
      functions to allow userspace to access this state, and adds code to
      the guest entry and exit to context-switch these SPRs between host
      and guest.
      
      Note that DPDES (Directed Privileged Doorbell Exception State) is
      shared between threads on a core; hence we store it in struct
      kvmppc_vcore and have the master thread save and restore it.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b005255e
    • P
      KVM: PPC: Book3S HV: Align physical and virtual CPU thread numbers · e0b7ec05
      Paul Mackerras 提交于
      On a threaded processor such as POWER7, we group VCPUs into virtual
      cores and arrange that the VCPUs in a virtual core run on the same
      physical core.  Currently we don't enforce any correspondence between
      virtual thread numbers within a virtual core and physical thread
      numbers.  Physical threads are allocated starting at 0 on a first-come
      first-served basis to runnable virtual threads (VCPUs).
      
      POWER8 implements a new "msgsndp" instruction which guest kernels can
      use to interrupt other threads in the same core or sub-core.  Since
      the instruction takes the destination physical thread ID as a parameter,
      it becomes necessary to align the physical thread IDs with the virtual
      thread IDs, that is, to make sure virtual thread N within a virtual
      core always runs on physical thread N.
      
      This means that it's possible that thread 0, which is where we call
      __kvmppc_vcore_entry, may end up running some other vcpu than the
      one whose task called kvmppc_run_core(), or it may end up running
      no vcpu at all, if for example thread 0 of the virtual core is
      currently executing in userspace.  However, we do need thread 0
      to be responsible for switching the MMU -- a previous version of
      this patch that had other threads switching the MMU was found to
      be responsible for occasional memory corruption and machine check
      interrupts in the guest on POWER7 machines.
      
      To accommodate this, we no longer pass the vcpu pointer to
      __kvmppc_vcore_entry, but instead let the assembly code load it from
      the PACA.  Since the assembly code will need to know the kvm pointer
      and the thread ID for threads which don't have a vcpu, we move the
      thread ID into the PACA and we add a kvm pointer to the virtual core
      structure.
      
      In the case where thread 0 has no vcpu to run, it still calls into
      kvmppc_hv_entry in order to do the MMU switch, and then naps until
      either its vcpu is ready to run in the guest, or some other thread
      needs to exit the guest.  In the latter case, thread 0 jumps to the
      code that switches the MMU back to the host.  This control flow means
      that now we switch the MMU before loading any guest vcpu state.
      Similarly, on guest exit we now save all the guest vcpu state before
      switching the MMU back to the host.  This has required substantial
      code movement, making the diff rather large.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      e0b7ec05
    • M
      KVM: PPC: Book3S HV: Don't set DABR on POWER8 · eee7ff9d
      Michael Neuling 提交于
      POWER8 doesn't have the DABR and DABRX registers; instead it has
      new DAWR/DAWRX registers, which will be handled in a later patch.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      eee7ff9d
    • S
      kvm/ppc: IRQ disabling cleanup · 6c85f52b
      Scott Wood 提交于
      Simplify the handling of lazy EE by going directly from fully-enabled
      to hard-disabled.  This replaces the lazy_irq_pending() check
      (including its misplaced kvm_guest_exit() call).
      
      As suggested by Tiejun Chen, move the interrupt disabling into
      kvmppc_prepare_to_enter() rather than have each caller do it.  Also
      move the IRQ enabling on heavyweight exit into
      kvmppc_prepare_to_enter().
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6c85f52b
    • M
      KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() · 70713fe3
      Mihai Caraman 提交于
      Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss().
      Signed-off-by: NMihai Caraman <mihai.caraman@freescale.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      70713fe3
    • A
      KVM: PPC: Book3S HV: use xics_wake_cpu only when defined · 48eaef05
      Andreas Schwab 提交于
      Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      48eaef05
    • C
      KVM: PPC: Book3S: MMIO emulation support for little endian guests · 73601775
      Cédric Le Goater 提交于
      MMIO emulation reads the last instruction executed by the guest
      and then emulates. If the guest is running in Little Endian order,
      or more generally in a different endian order of the host, the
      instruction needs to be byte-swapped before being emulated.
      
      This patch adds a helper routine which tests the endian order of
      the host and the guest in order to decide whether a byteswap is
      needed or not. It is then used to byteswap the last instruction
      of the guest in the endian order of the host before MMIO emulation
      is performed.
      
      Finally, kvmppc_handle_load() of kvmppc_handle_store() are modified
      to reverse the endianness of the MMIO if required.
      Signed-off-by: NCédric Le Goater <clg@fr.ibm.com>
      [agraf: add booke handling]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      73601775
    • J
      KVM: x86: Validate guest writes to MSR_IA32_APICBASE · 58cb628d
      Jan Kiszka 提交于
      Check for invalid state transitions on guest-initiated updates of
      MSR_IA32_APICBASE. This address both enabling of the x2APIC when it is
      not supported and all invalid transitions as described in SDM section
      10.12.5. It also checks that no reserved bit is set in APICBASE by the
      guest.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      [Use cpuid_maxphyaddr instead of guest_cpuid_get_phys_bits. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      58cb628d
  4. 24 1月, 2014 2 次提交
  5. 23 1月, 2014 12 次提交
    • P
      Merge tag 'kvm-s390-20140117' of... · c760f5e2
      Paolo Bonzini 提交于
      Merge tag 'kvm-s390-20140117' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-queue
      
      This deals with 2 guest features that need enablement in the kvm host:
      - transactional execution
      - lpp sampling support
      
      In addition there is also a fix to the virtio-ccw guest driver. This will
      enable future features
      c760f5e2
    • L
      Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 0dc3fd02
      Linus Torvalds 提交于
      Pull module updates from Rusty Russell.
      
      * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        module: Add missing newline in printk call.
        module: fix coding style
        export: declare ksymtab symbols
        module.h: Remove unnecessary semicolon
        params: improve standard definitions
        Add Documentation/module-signing.txt file
      0dc3fd02
    • L
      Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 93b05cba
      Linus Torvalds 提交于
      Pull virtio update from Rusty Russell:
       "A few simple fixes.  Quiet cycle"
      
      * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        drivers: virtio: Mark function virtballoon_migratepage() as static in virtio_balloon.c
        virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
        virtio: pci: remove unnecessary pci_set_drvdata()
      93b05cba
    • L
      Merge tag 'stable/for-linus-3.14-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 84621c9b
      Linus Torvalds 提交于
      Pull Xen updates from Konrad Rzeszutek Wilk:
       "Two major features that Xen community is excited about:
      
        The first is event channel scalability by David Vrabel - we switch
        over from an two-level per-cpu bitmap of events (IRQs) - to an FIFO
        queue with priorities.  This lets us be able to handle more events,
        have lower latency, and better scalability.  Good stuff.
      
        The other is PVH by Mukesh Rathor.  In short, PV is a mode where the
        kernel lets the hypervisor program page-tables, segments, etc.  With
        EPT/NPT capabilities in current processors, the overhead of doing this
        in an HVM (Hardware Virtual Machine) container is much lower than the
        hypervisor doing it for us.
      
        In short we let a PV guest run without doing page-table, segment,
        syscall, etc updates through the hypervisor - instead it is all done
        within the guest container.  It is a "hybrid" PV - hence the 'PVH'
        name - a PV guest within an HVM container.
      
        The major benefits are less code to deal with - for example we only
        use one function from the the pv_mmu_ops (which has 39 function
        calls); faster performance for syscall (no context switches into the
        hypervisor); less traps on various operations; etc.
      
        It is still being baked - the ABI is not yet set in stone.  But it is
        pretty awesome and we are excited about it.
      
        Lastly, there are some changes to ARM code - you should get a simple
        conflict which has been resolved in #linux-next.
      
        In short, this pull has awesome features.
      
        Features:
         - FIFO event channels.  Key advantages: support for over 100,000
           events (2^17), 16 different event priorities, improved fairness in
           event latency through the use of FIFOs.
         - Xen PVH support.  "It’s a fully PV kernel mode, running with
           paravirtualized disk and network, paravirtualized interrupts and
           timers, no emulated devices of any kind (and thus no qemu), no BIOS
           or legacy boot — but instead of requiring PV MMU, it uses the HVM
           hardware extensions to virtualize the pagetables, as well as system
           calls and other privileged operations." (from "The
           Paravirtualization Spectrum, Part 2: From poles to a spectrum")
      
        Bug-fixes:
         - Fixes in balloon driver (refactor and make it work under ARM)
         - Allow xenfb to be used in HVM guests.
         - Allow xen_platform_pci=0 to work properly.
         - Refactors in event channels"
      
      * tag 'stable/for-linus-3.14-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (52 commits)
        xen/pvh: Set X86_CR0_WP and others in CR0 (v2)
        MAINTAINERS: add git repository for Xen
        xen/pvh: Use 'depend' instead of 'select'.
        xen: delete new instances of __cpuinit usage
        xen/fb: allow xenfb initialization for hvm guests
        xen/evtchn_fifo: fix error return code in evtchn_fifo_setup()
        xen-platform: fix error return code in platform_pci_init()
        xen/pvh: remove duplicated include from enlighten.c
        xen/pvh: Fix compile issues with xen_pvh_domain()
        xen: Use dev_is_pci() to check whether it is pci device
        xen/grant-table: Force to use v1 of grants.
        xen/pvh: Support ParaVirtualized Hardware extensions (v3).
        xen/pvh: Piggyback on PVHVM XenBus.
        xen/pvh: Piggyback on PVHVM for grant driver (v4)
        xen/grant: Implement an grant frame array struct (v3).
        xen/grant-table: Refactor gnttab_init
        xen/grants: Remove gnttab_max_grant_frames dependency on gnttab_init.
        xen/pvh: Piggyback on PVHVM for event channels (v2)
        xen/pvh: Update E820 to work with PVH (v2)
        xen/pvh: Secondary VCPU bringup (non-bootup CPUs)
        ...
      84621c9b
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7ebd3faa
      Linus Torvalds 提交于
      Pull KVM updates from Paolo Bonzini:
       "First round of KVM updates for 3.14; PPC parts will come next week.
      
        Nothing major here, just bugfixes all over the place.  The most
        interesting part is the ARM guys' virtualized interrupt controller
        overhaul, which lets userspace get/set the state and thus enables
        migration of ARM VMs"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (67 commits)
        kvm: make KVM_MMU_AUDIT help text more readable
        KVM: s390: Fix memory access error detection
        KVM: nVMX: Update guest activity state field on L2 exits
        KVM: nVMX: Fix nested_run_pending on activity state HLT
        KVM: nVMX: Clean up handling of VMX-related MSRs
        KVM: nVMX: Add tracepoints for nested_vmexit and nested_vmexit_inject
        KVM: nVMX: Pass vmexit parameters to nested_vmx_vmexit
        KVM: nVMX: Leave VMX mode on clearing of feature control MSR
        KVM: VMX: Fix DR6 update on #DB exception
        KVM: SVM: Fix reading of DR6
        KVM: x86: Sync DR7 on KVM_SET_DEBUGREGS
        add support for Hyper-V reference time counter
        KVM: remove useless write to vcpu->hv_clock.tsc_timestamp
        KVM: x86: fix tsc catchup issue with tsc scaling
        KVM: x86: limit PIT timer frequency
        KVM: x86: handle invalid root_hpa everywhere
        kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub
        kvm: vfio: silence GCC warning
        KVM: ARM: Remove duplicate include
        arm/arm64: KVM: relax the requirements of VMA alignment for THP
        ...
      7ebd3faa
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · bb1281f2
      Linus Torvalds 提交于
      Pull trivial tree updates from Jiri Kosina:
       "Usual rocket science stuff from trivial.git"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
        neighbour.h: fix comment
        sched: Fix warning on make htmldocs caused by wait.h
        slab: struct kmem_cache is protected by slab_mutex
        doc: Fix typo in USB Gadget Documentation
        of/Kconfig: Spelling s/one/once/
        mkregtable: Fix sscanf handling
        lp5523, lp8501: comment improvements
        thermal: rcar: comment spelling
        treewide: fix comments and printk msgs
        IXP4xx: remove '1 &&' from a condition check in ixp4xx_restart()
        Documentation: update /proc/uptime field description
        Documentation: Fix size parameter for snprintf
        arm: fix comment header and macro name
        asm-generic: uaccess: Spelling s/a ny/any/
        mtd: onenand: fix comment header
        doc: driver-model/platform.txt: fix a typo
        drivers: fix typo in DEVTMPFS_MOUNT Kconfig help text
        doc: Fix typo (acces_process_vm -> access_process_vm)
        treewide: Fix typos in printk
        drivers/gpu/drm/qxl/Kconfig: reformat the help text
        ...
      bb1281f2
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 4988abf1
      Linus Torvalds 提交于
      Pull HID updates from Jiri Kosina:
      
       - quite some work on hid-sony driver in order to have DualShock 4
         device properly supported, from Frank Praznik
      
       - fixed support for suspending I2C conntected devices, from Mika
         Westerberg
      
       - regression fix for 0xff05 usage on Microsoft Ergonomy, from Jiri
         Kosina
      
       - support for Synaptics HD touchscreen, from AceLan Kao
      
       - workaround for USB 3.0 problem for logitech-dj connected devices,
         from Benjamin Tisssoires
      
       - support for Logitech Dual Action pads, from Vitaly Katraew
      
       - quite a few other assorted fixes and device ID additions
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (33 commits)
        HID: sony: Use colors for the Dualshock 4 LED names
        HID: sony: Add annotated HID descriptor for the Dualshock 4
        HID: sony: Cache the output report for the Dualshock 4
        HID: sony: Map gyroscopes and accelerometers to axes
        HID: sony: Fix spacing in the device definitions.
        HID: sony: Use standard output reports instead of raw reports to send data to the Dualshock 4.
        HID: sony: Use separate identifiers for USB and Bluetooth connected Dualshock 4 controllers.
        HID: hid-holtek-mouse: add new a070 mouse
        HID: hid-sensor-hub: Fix buggy report descriptors
        HID: logitech-dj: Fix USB 3.0 issue
        HID: sony: Rename worker function
        HID: sony: Add LED controls for the Dualshock 4
        HID: sony: Add force-feedback support for the Dualshock 4
        HID: hidraw: make comment more accurate and nicer
        HID: sony: fix error return code
        HID: input: fix input sysfs path for hid devices
        HID: debug: add labels for some new buttons
        HID: remove SIS entries from hid_have_special_driver[]
        HID: microsoft: no fallthrough in MS ergonomy 0xff05 usage
        HID: add support for SiS multitouch panel in the touch monitor LG 23ET83V
        ...
      4988abf1
    • L
      Merge tag 'dm-3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · fe41c2c0
      Linus Torvalds 提交于
      Pull device-mapper changes from Mike Snitzer:
       "A lot of attention was paid to improving the thin-provisioning
        target's handling of metadata operation failures and running out of
        space.  A new 'error_if_no_space' feature was added to allow users to
        error IOs rather than queue them when either the data or metadata
        space is exhausted.
      
        Additional fixes/features include:
         - a few fixes to properly support thin metadata device resizing
         - a solution for reliably waiting for a DM device's embedded kobject
           to be released before destroying the device
         - old dm-snapshot is updated to use the dm-bufio interface to take
           advantage of readahead capabilities that improve snapshot
           activation
         - new dm-cache target tunables to control how quickly data is
           promoted to the cache (fast) device
         - improved write efficiency of cluster mirror target by combining
           userspace flush and mark requests"
      
      * tag 'dm-3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (35 commits)
        dm log userspace: allow mark requests to piggyback on flush requests
        dm space map metadata: fix bug in resizing of thin metadata
        dm cache: add policy name to status output
        dm thin: fix pool feature parsing
        dm sysfs: fix a module unload race
        dm snapshot: use dm-bufio prefetch
        dm snapshot: use dm-bufio
        dm snapshot: prepare for switch to using dm-bufio
        dm snapshot: use GFP_KERNEL when initializing exceptions
        dm cache: add block sizes and total cache blocks to status output
        dm btree: add dm_btree_find_lowest_key
        dm space map metadata: fix extending the space map
        dm space map common: make sure new space is used during extend
        dm: wait until embedded kobject is released before destroying a device
        dm: remove pointless kobject comparison in dm_get_from_kobject
        dm snapshot: call destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
        dm cache policy mq: introduce three promotion threshold tunables
        dm cache policy mq: use list_del_init instead of list_del + INIT_LIST_HEAD
        dm thin: fix set_pool_mode exposed pool operation races
        dm thin: eliminate the no_free_space flag
        ...
      fe41c2c0
    • L
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 194e57fd
      Linus Torvalds 提交于
      Pull SCSI updates from James Bottomley:
       "This patch set is a lot of driver updates for qla4xxx, bfa, hpsa,
        qla2xxx.  It also removes the aic7xxx_old driver (which has been
        deprecated for nearly a decade) and adds support for deadlines in
        error handling"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (75 commits)
        [SCSI] hpsa: allow SCSI mid layer to handle unit attention
        [SCSI] hpsa: do not require board "not ready" status after hard reset
        [SCSI] hpsa: enable unit attention reporting
        [SCSI] hpsa: rename scsi prefetch field
        [SCSI] hpsa: use workqueue instead of kernel thread for lockup detection
        [SCSI] ipr: increase dump size in ipr driver
        [SCSI] mac_scsi: Fix crash on out of memory
        [SCSI] st: fix enlarge_buffer
        [SCSI] qla1280: Annotate timer on stack so object debug does not complain
        [SCSI] qla4xxx: Update driver version to 5.04.00-k3
        [SCSI] qla4xxx: Recreate chap data list during get chap operation
        [SCSI] qla4xxx: Add support for ISCSI_PARAM_LOCAL_IPADDR sysfs attr
        [SCSI] libiscsi: Add local_ipaddr parameter in iscsi_conn struct
        [SCSI] scsi_transport_iscsi: Export ISCSI_PARAM_LOCAL_IPADDR attr for iscsi_connection
        [SCSI] qla4xxx: Add host statistics support
        [SCSI] scsi_transport_iscsi: Add host statistics support
        [SCSI] qla4xxx: Added support for Diagnostics MBOX command
        [SCSI] bfa: Driver version upgrade to 3.2.23.0
        [SCSI] bfa: change FC_ELS_TOV to 20sec
        [SCSI] bfa: Observed auto D-port mode instead of manual
        ...
      194e57fd
    • L
      Merge tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · e1ba8459
      Linus Torvalds 提交于
      Pull PCI updates from Bjorn Helgaas:
       "PCI changes for the v3.14 merge window:
      
        Resource management
          - Change pci_bus_region addresses to dma_addr_t (Bjorn Helgaas)
          - Support 64-bit AGP BARs (Bjorn Helgaas, Yinghai Lu)
          - Add pci_bus_address() to get bus address of a BAR (Bjorn Helgaas)
          - Use pci_resource_start() for CPU address of AGP BARs (Bjorn Helgaas)
          - Enforce bus address limits in resource allocation (Yinghai Lu)
          - Allocate 64-bit BARs above 4G when possible (Yinghai Lu)
          - Convert pcibios_resource_to_bus() to take pci_bus, not pci_dev (Yinghai Lu)
      
        PCI device hotplug
          - Major rescan/remove locking update (Rafael J. Wysocki)
          - Make ioapic builtin only (not modular) (Yinghai Lu)
          - Fix release/free issues (Yinghai Lu)
          - Clean up pciehp (Bjorn Helgaas)
          - Announce pciehp slot info during enumeration (Bjorn Helgaas)
      
        MSI
          - Add pci_msi_vec_count(), pci_msix_vec_count() (Alexander Gordeev)
          - Add pci_enable_msi_range(), pci_enable_msix_range() (Alexander Gordeev)
          - Deprecate "tri-state" interfaces: fail/success/fail+info (Alexander Gordeev)
          - Export MSI mode using attributes, not kobjects (Greg Kroah-Hartman)
          - Drop "irq" param from *_restore_msi_irqs() (DuanZhenzhong)
      
        SR-IOV
          - Clear NumVFs when disabling SR-IOV in sriov_init() (ethan.zhao)
      
        Virtualization
          - Add support for save/restore of extended capabilities (Alex Williamson)
          - Add Virtual Channel to save/restore support (Alex Williamson)
          - Never treat a VF as a multifunction device (Alex Williamson)
          - Add pci_try_reset_function(), et al (Alex Williamson)
      
        AER
          - Ignore non-PCIe error sources (Betty Dall)
          - Support ACPI HEST error sources for domains other than 0 (Betty Dall)
          - Consolidate HEST error source parsers (Bjorn Helgaas)
          - Add a TLP header print helper (Borislav Petkov)
      
        Freescale i.MX6
          - Remove unnecessary code (Fabio Estevam)
          - Make reset-gpio optional (Marek Vasut)
          - Report "link up" only after link training completes (Marek Vasut)
          - Start link in Gen1 before negotiating for Gen2 mode (Marek Vasut)
          - Fix PCIe startup code (Richard Zhu)
      
        Marvell MVEBU
          - Remove duplicate of_clk_get_by_name() call (Andrew Lunn)
          - Drop writes to bridge Secondary Status register (Jason Gunthorpe)
          - Obey bridge PCI_COMMAND_MEM and PCI_COMMAND_IO bits (Jason Gunthorpe)
          - Support a bridge with no IO port window (Jason Gunthorpe)
          - Use max_t() instead of max(resource_size_t,) (Jingoo Han)
          - Remove redundant of_match_ptr (Sachin Kamat)
          - Call pci_ioremap_io() at startup instead of dynamically (Thomas Petazzoni)
      
        NVIDIA Tegra
          - Disable Gen2 for Tegra20 and Tegra30 (Eric Brower)
      
        Renesas R-Car
          - Add runtime PM support (Valentine Barshak)
          - Fix rcar_pci_probe() return value check (Wei Yongjun)
      
        Synopsys DesignWare
          - Fix crash in dw_msi_teardown_irq() (Bjørn Erik Nilsen)
          - Remove redundant call to pci_write_config_word() (Bjørn Erik Nilsen)
          - Fix missing MSI IRQs (Harro Haan)
          - Add dw_pcie prefix before cfg_read/write (Pratyush Anand)
          - Fix I/O transfers by using CPU (not realio) address (Pratyush Anand)
          - Whitespace cleanup (Jingoo Han)
      
        EISA
          - Call put_device() if device_register() fails (Levente Kurusa)
          - Revert EISA initialization breakage ((Bjorn Helgaas)
      
        Miscellaneous
          - Remove unused code, including PCIe 3.0 interfaces (Stephen Hemminger)
          - Prevent bus conflicts while checking for bridge apertures (Bjorn Helgaas)
          - Stop clearing bridge Secondary Status when setting up I/O aperture (Bjorn Helgaas)
          - Use dev_is_pci() to identify PCI devices (Yijing Wang)
          - Deprecate DEFINE_PCI_DEVICE_TABLE (Joe Perches)
          - Update documentation 00-INDEX (Erik Ekman)"
      
      * tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (119 commits)
        Revert "EISA: Initialize device before its resources"
        Revert "EISA: Log device resources in dmesg"
        vfio-pci: Use pci "try" reset interface
        PCI: Check parent kobject in pci_destroy_dev()
        xen/pcifront: Use global PCI rescan-remove locking
        powerpc/eeh: Use global PCI rescan-remove locking
        PCI: Fix pci_check_and_unmask_intx() comment typos
        PCI: Add pci_try_reset_function(), pci_try_reset_slot(), pci_try_reset_bus()
        MPT / PCI: Use pci_stop_and_remove_bus_device_locked()
        platform / x86: Use global PCI rescan-remove locking
        PCI: hotplug: Use global PCI rescan-remove locking
        pcmcia: Use global PCI rescan-remove locking
        ACPI / hotplug / PCI: Use global PCI rescan-remove locking
        ACPI / PCI: Use global PCI rescan-remove locking in PCI root hotplug
        PCI: Add global pci_lock_rescan_remove()
        PCI: Cleanup pci.h whitespace
        PCI: Reorder so actual code comes before stubs
        PCI/AER: Support ACPI HEST AER error sources for PCI domains other than 0
        ACPICA: Add helper macros to extract bus/segment numbers from HEST table.
        PCI: Make local functions static
        ...
      e1ba8459
    • L
      Merge tag 'trace-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 60eaa019
      Linus Torvalds 提交于
      Pull tracing updates from Steven Rostedt:
       "This pull request has a new feature to ftrace, namely the trace event
        triggers by Tom Zanussi.  A trigger is a way to enable an action when
        an event is hit.  The actions are:
      
         o  trace on/off - enable or disable tracing
         o  snapshot     - save the current trace buffer in the snapshot
         o  stacktrace   - dump the current stack trace to the ringbuffer
         o  enable/disable events - enable or disable another event
      
        Namhyung Kim added updates to the tracing uprobes code.  Having the
        uprobes add support for fetch methods.
      
        The rest are various bug fixes with the new code, and minor ones for
        the old code"
      
      * tag 'trace-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (38 commits)
        tracing: Fix buggered tee(2) on tracing_pipe
        tracing: Have trace buffer point back to trace_array
        ftrace: Fix synchronization location disabling and freeing ftrace_ops
        ftrace: Have function graph only trace based on global_ops filters
        ftrace: Synchronize setting function_trace_op with ftrace_trace_function
        tracing: Show available event triggers when no trigger is set
        tracing: Consolidate event trigger code
        tracing: Fix counter for traceon/off event triggers
        tracing: Remove double-underscore naming in syscall trigger invocations
        tracing/kprobes: Add trace event trigger invocations
        tracing/probes: Fix build break on !CONFIG_KPROBE_EVENT
        tracing/uprobes: Add @+file_offset fetch method
        uprobes: Allocate ->utask before handler_chain() for tracing handlers
        tracing/uprobes: Add support for full argument access methods
        tracing/uprobes: Fetch args before reserving a ring buffer
        tracing/uprobes: Pass 'is_return' to traceprobe_parse_probe_arg()
        tracing/probes: Implement 'memory' fetch method for uprobes
        tracing/probes: Add fetch{,_size} member into deref fetch method
        tracing/probes: Move 'symbol' fetch method to kprobes
        tracing/probes: Implement 'stack' fetch method for uprobes
        ...
      60eaa019
    • J
      Merge branch 'misc' into for-linus · 4b1a9a5e
      James Bottomley 提交于
      4b1a9a5e