1. 24 10月, 2018 2 次提交
  2. 10 3月, 2018 1 次提交
    • P
      target/arm: Query host CPU features on-demand at instance init · c4487d76
      Peter Maydell 提交于
      Currently we query the host CPU features in the class init function
      for the TYPE_ARM_HOST_CPU class, so that we can later copy them
      from the class object into the instance object in the object
      instance init function. This is awkward for implementing "-cpu max",
      which should work like "-cpu host" for KVM but like "cpu with all
      implemented features" for TCG.
      
      Move the place where we store the information about the host CPU from
      a class object to static variables in kvm.c, and then in the instance
      init function call a new kvm_arm_set_cpu_features_from_host()
      function which will query the host kernel if necessary and then
      fill in the CPU instance fields.
      
      This allows us to drop the special class struct and class init
      function for TYPE_ARM_HOST_CPU entirely.
      
      We can't delay the probe until realize, because the ARM
      instance_post_init hook needs to look at the feature bits we
      set, so we need to do it in the initfn. This is safe because
      the probing doesn't affect the actual VM state (it creates a
      separate scratch VM to do its testing), but the probe might fail.
      Because we can't report errors in retrieving the host features
      in the initfn, we check this belatedly in the realize function
      (the intervening code will be able to cope with the relevant
      fields in the CPU structure being zero).
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20180308130626.12393-2-peter.maydell@linaro.org
      c4487d76
  3. 25 1月, 2018 1 次提交
  4. 04 9月, 2017 3 次提交
  5. 21 4月, 2017 1 次提交
  6. 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
  7. 28 10月, 2016 1 次提交
  8. 17 6月, 2016 1 次提交
  9. 14 6月, 2016 2 次提交
  10. 19 5月, 2016 1 次提交
  11. 26 2月, 2016 2 次提交
  12. 19 1月, 2016 1 次提交
  13. 17 12月, 2015 5 次提交
  14. 07 9月, 2015 1 次提交
  15. 21 7月, 2015 1 次提交
  16. 16 6月, 2015 1 次提交
  17. 02 4月, 2015 3 次提交
  18. 13 2月, 2015 1 次提交
  19. 05 2月, 2015 1 次提交
  20. 11 12月, 2014 1 次提交
    • A
      target-arm/kvm: make reg sync code common between kvm32/64 · 38df27c8
      Alex Bennée 提交于
      Before we launch a guest we query KVM for the list of "co-processor"
      registers it knows about. This is used to synchronize system
      register state for the bulk of coprocessor/system registers.
      Move this code from the 32-bit specific vcpu init function into
      a common routine and call it also from the 64-bit vcpu init.
      
      This allows system registers to migrate correctly when using
      KVM, and also permits QEMU code to see the current KVM register
      state (which will be needed to support big-endian guests, since
      the virtio endianness callback must check for some system register
      settings).
      
      Since vcpu reset also has to sync registers, we move the
      32 bit kvm_arm_reset_vcpu() into common code as well and
      share it with the 64 bit version.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      [PMM: just copy the 32-bit code rather than improving it along the way;
       don't share reg_syncs_via_tuple_list() between 32 and 64 bit;
       tweak function names; move reset]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      38df27c8
  21. 04 8月, 2014 1 次提交
  22. 20 6月, 2014 4 次提交
  23. 28 5月, 2014 1 次提交
  24. 13 5月, 2014 1 次提交
    • P
      kvm: reset state from the CPU's reset method · 50a2c6e5
      Paolo Bonzini 提交于
      Now that we have a CPU object with a reset method, it is better to
      keep the KVM reset close to the CPU reset.  Using qemu_register_reset
      as we do now keeps them far apart.
      
      With this patch, PPC no longer calls the kvm_arch_ function, so
      it can get removed there.  Other arches call it from their CPU
      reset handler, and the function gets an ARMCPU/X86CPU/S390CPU.
      
      Note that ARM- and s390-specific functions are called kvm_arm_*
      and kvm_s390_*, while x86-specific functions are called kvm_arch_*.
      That follows the convention used by the different architectures.
      Changing that is the topic of a separate patch.
      Reviewed-by: NGleb Natapov <gnatapov@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      50a2c6e5
  25. 18 4月, 2014 2 次提交
    • P
      target-arm: Implement AArch64 SPSR_EL1 · a65f1de9
      Peter Maydell 提交于
      Implement the AArch64 SPSR_EL1. For compatibility with how KVM
      handles SPSRs and with the architectural mapping between AArch32
      and AArch64, we put this in the banked_spsr[] array in the slot
      that is used for SVC in AArch32. This means we need to extend the
      array from uint32_t to uint64_t, which requires some reworking
      of the 32 bit KVM save/restore code.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Acked-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      a65f1de9
    • P
      target-arm: Implement SP_EL0, SP_EL1 · f502cfc2
      Peter Maydell 提交于
      Implement handling for the AArch64 SP_EL0 system register.
      This holds the EL0 stack pointer, and is only accessible when
      it's not being used as the stack pointer, ie when we're in EL1
      and EL1 is using its own stack pointer. We also provide a
      definition of the SP_EL1 register; this isn't guest visible
      as a system register for an implementation like QEMU which
      doesn't provide EL2 or EL3; however it is useful for ensuring
      the underlying state is migrated.
      
      We need to update the state fields in the CPU state whenever
      we switch stack pointers; this happens when we take an exception
      and also when SPSEL is used to change the bit in PSTATE which
      indicates which stack pointer EL1 should use.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      f502cfc2