1. 19 9月, 2017 2 次提交
    • A
      target/mips: Convert VM clock update prints to warn_report · 288cb949
      Alistair Francis 提交于
      Convert the fprintf() messages in kvm_mips_update_state() to use
      warn_report() as they aren't errors, but are just warnings.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Message-Id: <e6acff8db6d264f913a18c86858b9aa600554e51.1505158760.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      288cb949
    • A
      Convert single line fprintf(.../n) to warn_report() · 2ab4b135
      Alistair Francis 提交于
      Convert all the single line uses of fprintf(stderr, "warning:"..."\n"...
      to use warn_report() instead. This helps standardise on a single
      method of printing warnings to the user.
      
      All of the warnings were changed using this command:
        find ./* -type f -exec sed -i \
          's|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig' \
          {} +
      
      Some of the lines were manually edited to reduce the line length to below
      80 charecters.
      
      The #include lines were manually updated to allow the code to compile.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Yongbok Kim <yongbok.kim@imgtec.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: James Hogan <james.hogan@imgtec.com> [mips]
      Message-Id: <ae8f8a7f0a88ded61743dff2adade21f8122a9e7.1505158760.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2ab4b135
  2. 04 7月, 2017 1 次提交
  3. 03 3月, 2017 2 次提交
  4. 17 1月, 2017 1 次提交
  5. 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
  6. 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
  7. 17 6月, 2016 1 次提交
  8. 19 5月, 2016 1 次提交
  9. 26 2月, 2016 7 次提交
    • J
      mips/kvm: Support MSA in MIPS KVM guests · bee62662
      James Hogan 提交于
      Support the new KVM_CAP_MIPS_MSA capability, which allows MIPS SIMD
      Architecture (MSA) to be exposed to the KVM guest.
      
      The capability is enabled if the guest core has MSA according to its
      Config3 register. Various config bits are now writeable so that KVM is
      aware of the configuration (Config3.MSAP) and so that QEMU can
      save/restore the guest modifiable bits (Config5.MSAEn). The MSACSR/MSAIR
      registers and the MSA vector registers are now saved/restored. Since the
      FP registers are a subset of the vector registers, they are omitted if
      the guest has MSA.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      bee62662
    • J
      mips/kvm: Support FPU in MIPS KVM guests · 152db36a
      James Hogan 提交于
      Support the new KVM_CAP_MIPS_FPU capability, which allows the host's FPU
      to be exposed to the KVM guest.
      
      The capability is enabled if the guest core has an FPU according to its
      Config1 register. Various config bits are now writeable so that KVM is
      aware of the configuration (Config1.FP) and so that QEMU can
      save/restore the guest modifiable bits (Config5.FRE, Config5.UFR,
      Config5.UFE). The FCSR/FIR registers and the floating point registers
      are now saved/restored (depending on the FR mode bit).
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      152db36a
    • J
      mips/kvm: Support signed 64-bit KVM registers · d319f83f
      James Hogan 提交于
      Rename kvm_mips_{get,put}_one_reg64() to kvm_mips_{get,put}_one_ureg64()
      since they take an int64_t pointer, and add separate signed 64-bit
      accessors. These will be used for double precision floating point
      registers.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      d319f83f
    • J
      mips/kvm: Support unsigned KVM registers · 0759487b
      James Hogan 提交于
      Add KVM register access functions for the uint32_t type. This is
      required for FP and MSA control registers, which are represented as
      unsigned 32-bit integers.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      0759487b
    • J
      mips/kvm: Implement Config CP0 registers · 03cbfd7b
      James Hogan 提交于
      Implement saving and restoring to KVM state of the Config CP0 registers
      (namely Config, Config1, Config2, Config3, Config4, and Config5). These
      control the features available to a guest, and a few of the fields will
      soon be writeable by a guest so QEMU needs to know about them so as not
      to clobber them on migration/savevm.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      03cbfd7b
    • J
      mips/kvm: Implement PRid CP0 register · 461a1582
      James Hogan 提交于
      Implement saving and restoring to KVM state of the Processor ID (PRid)
      CP0 register. This allows QEMU to control the PRid exposed to the guest
      instead of using the default set by KVM.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NLeon Alrae <leon.alrae@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      461a1582
    • J
      mips/kvm: Remove a couple of noisy DPRINTFs · c489e559
      James Hogan 提交于
      The DPRINTFs in cpu_mips_io_interrupts_pending() and kvm_arch_pre_run()
      are particularly noisy during normal execution, and also not
      particularly helpful. Remove them so that more important debug messages
      can be more easily seen.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NLeon Alrae <leon.alrae@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      c489e559
  10. 23 1月, 2016 1 次提交
  11. 22 1月, 2016 1 次提交
  12. 19 10月, 2015 1 次提交
    • P
      kvm: Pass PCI device pointer to MSI routing functions · dc9f06ca
      Pavel Fedin 提交于
      In-kernel ITS emulation on ARM64 will require to supply requester IDs.
      These IDs can now be retrieved from the device pointer using new
      pci_requester_id() function.
      
      This patch adds pci_dev pointer to KVM GSI routing functions and makes
      callers passing it.
      
      x86 architecture does not use requester IDs, but hw/i386/kvm/pci-assign.c
      also made passing PCI device pointer instead of NULL for consistency with
      the rest of the code.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Message-Id: <ce081423ba2394a4efc30f30708fca07656bc500.1444916432.git.p.fedin@samsung.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dc9f06ca
  13. 17 7月, 2015 2 次提交
    • J
      mips/kvm: Sign extend registers written to KVM · 02dae26a
      James Hogan 提交于
      In case we're running on a 64-bit host, be sure to sign extend the
      general purpose registers and hi/lo/pc before writing them to KVM, so as
      to take advantage of MIPS32/MIPS64 compatibility.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: kvm@vger.kernel.org
      Cc: qemu-stable@nongnu.org
      Message-Id: <1429871214-23514-3-git-send-email-james.hogan@imgtec.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      02dae26a
    • J
      mips/kvm: Fix Big endian 32-bit register access · f8b3e48b
      James Hogan 提交于
      Fix access to 32-bit registers on big endian targets. The pointer passed
      to the kernel must be for the actual 32-bit value, not a temporary
      64-bit value, otherwise on big endian systems the kernel will only
      interpret the upper half.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: kvm@vger.kernel.org
      Cc: qemu-stable@nongnu.org
      Message-Id: <1429871214-23514-2-git-send-email-james.hogan@imgtec.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f8b3e48b
  14. 09 7月, 2015 1 次提交
    • J
      mips/kvm: Sync with newer MIPS KVM headers · 5a2db896
      James Hogan 提交于
      The KVM_REG_MIPS_COUNT_* definitions are now included in
      linux-headers/asm-mips/kvm.h since commit b061808d ("linux-headers:
      update linux headers to kvm/next"), therefore the duplicate definitions
      in target-mips/kvm.c can now be dropped (the definitions were tweaked
      slightly in commit 7a52ce8a ("linux-headers: update") which
      triggered the following build warnings turned errors):
      
      target-mips/kvm.c:232:0: error: "KVM_REG_MIPS_COUNT_CTL" redefined [-Werror]
      linux-headers/asm/kvm.h:129:0: note: this is the location of the previous definition
      target-mips/kvm.c:236:0: error: "KVM_REG_MIPS_COUNT_RESUME" redefined [-Werror]
      linux-headers/asm/kvm.h:141:0: note: this is the location of the previous definition
      target-mips/kvm.c:239:0: error: "KVM_REG_MIPS_COUNT_HZ" redefined [-Werror]
      linux-headers/asm/kvm.h:147:0: note: this is the location of the previous definition
      
      Also update the MIPS_C0_{32,64} macros to utilise definitions more
      recently added to the asm-mips/kvm.h header.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NLeon Alrae <leon.alrae@imgtec.com>
      Message-id: 1436433435-24898-3-git-send-email-james.hogan@imgtec.com
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: kvm@vger.kernel.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5a2db896
  15. 01 7月, 2015 1 次提交
    • J
      kvm: First step to push iothread lock out of inner run loop · 4b8523ee
      Jan Kiszka 提交于
      This opens the path to get rid of the iothread lock on vmexits in KVM
      mode. On x86, the in-kernel irqchips has to be used because we otherwise
      need to synchronize APIC and other per-cpu state accesses that could be
      changed concurrently.
      
      Regarding pre/post-run callbacks, s390x and ARM should be fine without
      specific locking as the callbacks are empty. MIPS and POWER require
      locking for the pre-run callback.
      
      For the handle_exit callback, it is non-empty in x86, POWER and s390.
      Some POWER cases could do without the locking, but it is left in
      place for now.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <1434646046-27150-7-git-send-email-pbonzini@redhat.com>
      4b8523ee
  16. 02 6月, 2015 1 次提交
  17. 30 4月, 2015 1 次提交
  18. 12 3月, 2015 1 次提交
  19. 12 1月, 2015 1 次提交
  20. 15 12月, 2014 1 次提交
  21. 10 7月, 2014 1 次提交
    • J
      mips/kvm: Disable FPU on reset with KVM · 0e928b12
      James Hogan 提交于
      KVM doesn't yet support the MIPS FPU, or writing to the guest's Config1
      register which contains the FPU implemented bit. Clear QEMU's version of
      that bit on reset and display a warning that the FPU has been disabled.
      
      The previous incorrect Config1 CP0 register value wasn't being passed to
      KVM yet, however we should ensure it is set correctly now to reduce the
      risk of breaking migration/loadvm to a future version of QEMU/Linux that
      does support it.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0e928b12
  22. 18 6月, 2014 1 次提交