1. 24 3月, 2009 5 次提交
    • C
      KVM: s390: Fix problem state check for b2 intercepts · 70455a36
      Christian Borntraeger 提交于
      The kernel handles some priviledged instruction exits. While I was
      unable to trigger such an exit from guest userspace, the code should
      check for supervisor state before emulating a priviledged instruction.
      
      I also renamed kvm_s390_handle_priv to kvm_s390_handle_b2. After all
      there are non priviledged b2 instructions like stck (store clock).
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      70455a36
    • C
      KVM: s390: Fix printk on SIGP set arch · 2c411b48
      Christian Borntraeger 提交于
      KVM on s390 does not support the ESA/390 architecture. We refuse to
      change the architecture mode and print a warning. This patch removes
      the printk for several reasons:
      
      o A malicious guest can flood host dmesg
      o The old message had no newline
      o there is no connection between the message and the failing guest
      
      This patch simply removes the printk. We already set the condition
      code to 3 - the guest knows that something went wrong.
      Reported-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      2c411b48
    • A
      KVM: Add CONFIG_HAVE_KVM_IRQCHIP · 5d9b8e30
      Avi Kivity 提交于
      Two KVM archs support irqchips and two don't.  Add a Kconfig item to
      make selecting between the two models easier.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5d9b8e30
    • J
      KVM: Remove old kvm_guest_debug structs · 989c0f0e
      Jan Kiszka 提交于
      Remove the remaining arch fragments of the old guest debug interface
      that now break non-x86 builds.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      989c0f0e
    • J
      KVM: New guest debug interface · d0bfb940
      Jan Kiszka 提交于
      This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL
      instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic
      part, controlling the "main switch" and the single-step feature. The
      arch specific part adds an x86 interface for intercepting both types of
      debug exceptions separately and re-injecting them when the host was not
      interested. Moveover, the foundation for guest debugging via debug
      registers is layed.
      
      To signal breakpoint events properly back to userland, an arch-specific
      data block is now returned along KVM_EXIT_DEBUG. For x86, the arch block
      contains the PC, the debug exception, and relevant debug registers to
      tell debug events properly apart.
      
      The availability of this new interface is signaled by
      KVM_CAP_SET_GUEST_DEBUG. Empty stubs for not yet supported archs are
      provided.
      
      Note that both SVM and VTX are supported, but only the latter was tested
      yet. Based on the experience with all those VTX corner case, I would be
      fairly surprised if SVM will work out of the box.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d0bfb940
  2. 18 3月, 2009 6 次提交
  3. 26 2月, 2009 1 次提交
    • H
      crypto: api - Fix module load deadlock with fallback algorithms · a760a665
      Herbert Xu 提交于
      With the mandatory algorithm testing at registration, we have
      now created a deadlock with algorithms requiring fallbacks.
      This can happen if the module containing the algorithm requiring
      fallback is loaded first, without the fallback module being loaded
      first.  The system will then try to test the new algorithm, find
      that it needs to load a fallback, and then try to load that.
      
      As both algorithms share the same module alias, it can attempt
      to load the original algorithm again and block indefinitely.
      
      As algorithms requiring fallbacks are a special case, we can fix
      this by giving them a different module alias than the rest.  Then
      it's just a matter of using the right aliases according to what
      algorithms we're trying to find.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a760a665
  4. 19 2月, 2009 2 次提交
  5. 15 2月, 2009 1 次提交
  6. 11 2月, 2009 3 次提交
  7. 23 1月, 2009 5 次提交
    • M
      [S390] Add missing compat system call wrappers. · e34a6280
      Michael Holzheu 提交于
      Add wrapper functions for the following compat system calls:
      * readahead
      * sendfile64
      * tkill
      * tgkill
      * keyctl
      This ensures that the high order bits of the parameter registers are correctly
      sign extended.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      e34a6280
    • H
      [S390] etr/stp: fix possible deadlock · 179cb81a
      Heiko Carstens 提交于
      Precreate stop_machine threads in case the machine supports ETR/STP.
      Otherwise we might deadlock if a time sync operation gets scheduled
      and the creation of stop_machine threads would cause disk I/O.
      This is just the minimal fix.
      The real fix would be to only precreate stop_machine threads if
      ETR/STP is actually used. But that would be a rather large and
      complicated patch.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      179cb81a
    • H
      [S390] cputime: fix lowcore initialization on cpu hotplug · f9a2f797
      Heiko Carstens 提交于
      On (initial) cpu hotplug the lowcore values for user_timer and
      system_timer don't get initialized like they would get on each
      process schedule.
      On initial start of secondary cpus this leads to the situation
      where per thread user/system_timer values are larger than the
      corresponding contents of the lowcore. When later calculating
      time spent in user/system context the result can be negative.
      
      So for cpu hotplug we should manually initialize lowcore values.
      
      Fixes this bug:
      
      Kernel BUG at 000ec080 [verbose debug info unavailable]
      fixpoint divide exception: 0009 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 10 Not tainted 2.6.28 #4
      Process sysctl (pid: 975, task: 3fa752e0, ksp: 3fbebca0)
      Krnl PSW : 070c1000 800ec080 (show_stat+0x390/0x5fc)
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
      Krnl GPRS: 7fffffff fefc7ce5 3faec080 003879ae
                 00000001 01388000 7fffffff 01388000
                 00000000 00000000 0049ad50 3fbebcf8
                 01388000 002f51a8 800ec1fe 3fbebcf8
      Krnl Code: 800ec076: 9001b188           stm     %r0,%r1,392(%r11)
                 800ec07a: 9801b0c0           lm      %r0,%r1,192(%r11)
                 800ec07e: 1d05               dr      %r0,%r5
                >800ec080: 9001b0c0           stm     %r0,%r1,192(%r11)
                 800ec084: 5860b0c4           l       %r6,196(%r11)
                 800ec088: 1806               lr      %r0,%r6
                 800ec08a: 8c800001           srdl    %r8,1
                 800ec08e: 1d87               dr      %r8,%r7
      Call Trace:
      ([<00000000000ec1ee>] show_stat+0x4fe/0x5fc)
       [<00000000000c13e8>] seq_read+0xc4/0x3ac
       [<00000000000e4796>] proc_reg_read+0x6e/0x9c
       [<00000000000a6a44>] vfs_read+0x78/0x100
       [<00000000000a6ba8>] sys_read+0x40/0x80
       [<00000000000234a8>] sysc_do_restart+0x1a/0x1e
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      f9a2f797
    • M
      [S390] fix compat sigaltstack syscall table entry · e9a4e9d5
      Michael Holzheu 提交于
      When 31 bit user space programs call sigaltstack on a 64 bit Linux
      OS, the system call returns -1 with errno=EFAULT. The 31 bit pointer passed
      to the system call is extended to 64 bit, but the high order bits are not
      set to zero. The kernel detects the invalid user space pointer and
      returns -EFAULT. To solve the problem, sys32_sigaltstack_wrapper()
      instead of sys32_sigaltstack() has to be called. The wrapper function sets
      the high order bits to zero.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      e9a4e9d5
    • H
      [S390] personality: fix personality loss on execve · 03e4c49f
      Heiko Carstens 提交于
      Use the personality() macro to mask out all bits that are not
      relevant for the personality type.
      The personality field contains bits for other things as well,
      so without masking out the not relevalent bits the comparison
      won't do what is expected.
      Reported-by: NAndreas Krebbel <krebbel@linux.vnet.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      03e4c49f
  8. 15 1月, 2009 1 次提交
  9. 14 1月, 2009 3 次提交
  10. 09 1月, 2009 8 次提交
  11. 07 1月, 2009 5 次提交