1. 14 7月, 2017 2 次提交
  2. 06 6月, 2017 1 次提交
  3. 23 5月, 2017 1 次提交
    • E
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake 提交于
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      cf83f140
  4. 13 5月, 2017 1 次提交
  5. 21 4月, 2017 1 次提交
  6. 03 3月, 2017 2 次提交
  7. 24 2月, 2017 1 次提交
    • C
      s390x/kvm: detect some program check loops · 409422cd
      Christian Borntraeger 提交于
      Sometimes (e.g. early boot) a guest is broken in such ways that it loops
      100% delivering operation exceptions (illegal operation) but the pgm new
      PSW is not set properly. This will result in code being read from
      address zero, which usually contains another illegal op. Let's detect
      this case and put the guest in crashed state. Instead of only detecting
      this for address zero apply a heuristic that will work for any program
      check new psw so that it will also reach the crashed state if you
      provide some random elf file to the -kernel option.
      We do not want guest problem state to be able to trigger a guest panic,
      e.g. by faulting on an address that is the same as the program check
      new PSW, so we check for the problem state bit being off.
      
      With this we
      a: get rid of CPU consumption of such broken guests
      b: keep the program old PSW. This allows to find out the original illegal
         operation - making debugging such early boot issues much easier than
         with single stepping
      
      This relies on the kernel using a similar heuristic and passing such
      operation exceptions to user space.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      409422cd
  8. 16 2月, 2017 1 次提交
  9. 24 1月, 2017 2 次提交
    • C
      s390x/kvm: fix cmma reset for KVM · 0cf4d747
      Christian Borntraeger 提交于
      We must reset the CMMA states for normal memory (when not on mem path),
      but the current code does the opposite. This was unnoticed for some time
      as the kernel since 4.6 also had a bug which mostly disabled the paging
      optimizations.
      
      Fixes: 07059eff ("s390x/kvm: let the CPU model control CMM(A)")
      Cc: qemu-stable@nongnu.org # v2.8
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      0cf4d747
    • C
      s390x/kvm: include hw_accel.h instead of kvm.h · 8195d899
      Cornelia Huck 提交于
      Commit b3946626 ("kvm: move cpu synchronization code") switched
      to hw_accel.h instead of kvm.h, but missed s390x, resulting in
      
        CC      s390x-softmmu/target/s390x/kvm.o
      /home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘kvm_sclp_service_call’:
      /home/cohuck/git/qemu/target/s390x/kvm.c:1034:5: error: implicit declaration of function ‘cpu_synchronize_state’ [-Werror=implicit-function-declaration]
           cpu_synchronize_state(CPU(cpu));
           ^
      /home/cohuck/git/qemu/target/s390x/kvm.c:1034:5: error: nested extern declaration of ‘cpu_synchronize_state’ [-Werror=nested-externs]
      /home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘sigp_initial_cpu_reset’:
      /home/cohuck/git/qemu/target/s390x/kvm.c:1628:5: error: implicit declaration of function ‘cpu_synchronize_post_reset’ [-Werror=implicit-function-declaration]
           cpu_synchronize_post_reset(cs);
           ^
      /home/cohuck/git/qemu/target/s390x/kvm.c:1628:5: error: nested extern declaration of ‘cpu_synchronize_post_reset’ [-Werror=nested-externs]
      /home/cohuck/git/qemu/target/s390x/kvm.c: In function ‘sigp_set_prefix’:
      /home/cohuck/git/qemu/target/s390x/kvm.c:1665:5: error: implicit declaration of function ‘cpu_synchronize_post_init’ [-Werror=implicit-function-declaration]
           cpu_synchronize_post_init(cs);
           ^
      /home/cohuck/git/qemu/target/s390x/kvm.c:1665:5: error: nested extern declaration of ‘cpu_synchronize_post_init’ [-Werror=nested-externs]
      cc1: all warnings being treated as errors
      /home/cohuck/git/qemu/rules.mak:64: recipe for target 'target/s390x/kvm.o' failed
      
      Fix this.
      
      Fixes: b3946626 ("kvm: move cpu synchronization code")
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Acked-by: NVincent Palatin <vpalatin@chromium.org>
      8195d899
  10. 20 1月, 2017 1 次提交
  11. 17 1月, 2017 1 次提交
  12. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  13. 07 11月, 2016 1 次提交
  14. 31 10月, 2016 1 次提交
  15. 28 9月, 2016 2 次提交
  16. 27 9月, 2016 1 次提交
    • A
      cpus: pass CPUState to run_on_cpu helpers · e0eeb4a2
      Alex Bennée 提交于
      CPUState is a fairly common pointer to pass to these helpers. This means
      if you need other arguments for the async_run_on_cpu case you end up
      having to do a g_malloc to stuff additional data into the routine. For
      the current users this isn't a massive deal but for MTTCG this gets
      cumbersome when the only other parameter is often an address.
      
      This adds the typedef run_on_cpu_func for helper functions which has an
      explicit CPUState * passed as the first parameter. All the users of
      run_on_cpu and async_run_on_cpu have had their helpers updated to use
      CPUState where available.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      [Sergey Fedorov:
       - eliminate more CPUState in user data;
       - remove unnecessary user data passing;
       - fix target-s390x/kvm.c and target-s390x/misc_helper.c]
      Signed-off-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> (ppc parts)
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> (s390 parts)
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <1470158864-17651-3-git-send-email-alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e0eeb4a2
  17. 19 9月, 2016 1 次提交
  18. 06 9月, 2016 5 次提交
  19. 05 9月, 2016 1 次提交
    • D
      s390x/kvm: 2 byte software breakpoint support · b60fae32
      David Hildenbrand 提交于
      Diag 501 (4 bytes) was used until now for software breakpoints on s390.
      As instructions on s390 might be 2 bytes long, temporarily overwriting them
      with 4 bytes is evil and can result in very strange guest behaviour.
      
      We make use of invalid instruction 0x0000 as new sw breakpoint instruction.
      We have to enable interception of that instruction in KVM using a
      capability.
      
      If no software breakpoint has been inserted at the reported position, an
      operation exception has to be injected into the guest. Otherwise a
      breakpoint has been hit and the pc has to be rewound.
      
      If KVM doesn't yet support interception of instruction 0x0000 the
      existing mechanism exploiting diag 501 is used. To keep overhead low,
      interception of instruction 0x0000 will only be enabled if sw breakpoints
      are really used.
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      b60fae32
  20. 22 7月, 2016 1 次提交
    • P
      kvm-irqchip: i386: add hook for add/remove virq · 38d87493
      Peter Xu 提交于
      Adding two hooks to be notified when adding/removing msi routes. There
      are two kinds of MSI routes:
      
      - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by
        vhost, vfio, etc.
      
      - in kvm_irqchip_send_msi(): when sending direct MSI message, if
        direct MSI not allowed, we will first create one MSI route entry
        in the kernel, then trigger it.
      
      This patch only hooks the first one (irqfd case). We do not need to
      take care for the 2nd one, since it's only used by QEMU userspace
      (kvm-apic) and the messages will always do in-time translation when
      triggered. While we need to note them down for the 1st one, so that we
      can notify the kernel when cache invalidation happens.
      
      Also, we do not hook IOAPIC msi routes (we have explicit notifier for
      IOAPIC to keep its cache updated). We only need to care about irqfd
      users.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      38d87493
  21. 11 7月, 2016 1 次提交
  22. 17 6月, 2016 1 次提交
  23. 14 6月, 2016 1 次提交
  24. 19 5月, 2016 1 次提交
  25. 17 5月, 2016 1 次提交
  26. 01 3月, 2016 2 次提交
  27. 29 1月, 2016 1 次提交
  28. 22 1月, 2016 1 次提交
  29. 12 11月, 2015 1 次提交
  30. 21 10月, 2015 2 次提交