1. 29 6月, 2018 5 次提交
  2. 22 6月, 2018 2 次提交
  3. 15 6月, 2018 1 次提交
    • P
      arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC · 95f87565
      Peter Maydell 提交于
      The Cortex-M CPU and its NVIC are two intimately intertwined parts of
      the same hardware; it is not possible to use one without the other.
      Unfortunately a lot of our board models don't do any sanity checking
      on the CPU type the user asks for, so a command line like
          qemu-system-arm -M versatilepb -cpu cortex-m3
      will create an M3 without an NVIC, and coredump immediately.
      In the other direction, trying a non-M-profile CPU in an M-profile
      board won't blow up, but doesn't do anything useful either:
          qemu-system-arm -M lm3s6965evb -cpu arm926
      
      Add some checking in the NVIC and CPU realize functions that the
      user isn't trying to use an NVIC without an M-profile CPU or
      an M-profile CPU without an NVIC, so we can produce a helpful
      error message rather than a core dump.
      
      Fixes: https://bugs.launchpad.net/qemu/+bug/1766896Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180601160355.15393-1-peter.maydell@linaro.org
      95f87565
  4. 12 6月, 2018 1 次提交
    • M
      object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence · 265b578c
      Marc-André Lureau 提交于
      A link property can be set during creation, with
      object_property_add_link() and later with object_property_set_link().
      
      add_link() doesn't add a reference to the target object, while
      set_link() does.
      
      Furthemore, OBJ_PROP_LINK_UNREF_ON_RELEASE flags, set during add_link,
      says whether a reference must be released when the property is destroyed.
      This can lead to leaks if the property was later set_link(), as the
      added reference is never released.
      
      Instead, rename OBJ_PROP_LINK_UNREF_ON_RELEASE to OBJ_PROP_LINK_STRONG
      and use that has an indication on how the link handle reference
      management in set_link().
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 20180531195119.22021-3-marcandre.lureau@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      265b578c
  5. 19 5月, 2018 1 次提交
  6. 15 5月, 2018 1 次提交
  7. 26 4月, 2018 2 次提交
  8. 10 3月, 2018 5 次提交
    • P
      target/arm: Make 'any' CPU just an alias for 'max' · a0032cc5
      Peter Maydell 提交于
      Now we have a working '-cpu max', the linux-user-only
      'any' CPU is pretty much the same thing, so implement it
      that way.
      
      For the moment we don't add any of the extra feature bits
      to the system-emulation "max", because we don't set the
      ID register bits we would need to to advertise those
      features as present.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20180308130626.12393-5-peter.maydell@linaro.org
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      a0032cc5
    • P
      target/arm: Add "-cpu max" support · bab52d4b
      Peter Maydell 提交于
      Add support for "-cpu max" for ARM guests. This CPU type behaves
      like "-cpu host" when KVM is enabled, and like a system CPU with
      the maximum possible feature set otherwise. (Note that this means
      it won't be migratable across versions, as we will likely add
      features to it in future.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20180308130626.12393-4-peter.maydell@linaro.org
      bab52d4b
    • P
      target/arm: Move definition of 'host' cpu type into cpu.c · 86f0a186
      Peter Maydell 提交于
      Move the definition of the 'host' cpu type into cpu.c, where all the
      other CPU types are defined.  We can do this now we've decoupled it
      from the KVM-specific host feature probing.  This means we now create
      the type unconditionally (assuming we were built with KVM support at
      all), but if you try to use it without -enable-kvm this will end
      up in the "host cpu probe failed and KVM not enabled" path in
      arm_cpu_realizefn(), for an appropriate error message.
      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-3-peter.maydell@linaro.org
      86f0a186
    • 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
    • A
      target/arm: Add a core count property · f9a69711
      Alistair Francis 提交于
      The cortex A53 TRM specifies that bits 24 and 25 of the L2CTLR register
      specify the number of cores in the processor, not the total number of
      cores in the system. To report this correctly on machines with multiple
      CPU clusters (ARM's big.LITTLE or Xilinx's ZynqMP) we need to allow
      the machine to overwrite this value. To do this let's add an optional
      property.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-id: ef01d95c0759e88f47f22d11b14c91512a658b4f.1520018138.git.alistair.francis@xilinx.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f9a69711
  9. 02 3月, 2018 5 次提交
  10. 21 2月, 2018 1 次提交
  11. 16 2月, 2018 1 次提交
  12. 05 2月, 2018 1 次提交
  13. 25 1月, 2018 1 次提交
    • L
      accel/tcg: add size paremeter in tlb_fill() · 98670d47
      Laurent Vivier 提交于
      The MC68040 MMU provides the size of the access that
      triggers the page fault.
      
      This size is set in the Special Status Word which
      is written in the stack frame of the access fault
      exception.
      
      So we need the size in m68k_cpu_unassigned_access() and
      m68k_cpu_handle_mmu_fault().
      
      To be able to do that, this patch modifies the prototype of
      handle_mmu_fault handler, tlb_fill() and probe_write().
      do_unassigned_access() already includes a size parameter.
      
      This patch also updates handle_mmu_fault handlers and
      tlb_fill() of all targets (only parameter, no code change).
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20180118193846.24953-2-laurent@vivier.eu>
      98670d47
  14. 21 12月, 2017 1 次提交
  15. 09 11月, 2017 1 次提交
  16. 27 10月, 2017 1 次提交
  17. 25 10月, 2017 4 次提交
  18. 10 10月, 2017 1 次提交
  19. 06 10月, 2017 1 次提交
    • P
      nvic: Implement Security Attribution Unit registers · 9901c576
      Peter Maydell 提交于
      Implement the register interface for the SAU: SAU_CTRL,
      SAU_TYPE, SAU_RNR, SAU_RBAR and SAU_RLAR. None of the
      actual behaviour is implemented here; registers just
      read back as written.
      
      When the CPU definition for Cortex-M33 is eventually
      added, its initfn will set cpu->sau_sregion, in the same
      way that we currently set cpu->pmsav7_dregion for the
      M3 and M4.
      
      Number of SAU regions is typically a configurable
      CPU parameter, but this patch doesn't provide a
      QEMU CPU property for it. We can easily add one when
      we have a board that requires it.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1506092407-26985-14-git-send-email-peter.maydell@linaro.org
      9901c576
  20. 22 9月, 2017 1 次提交
  21. 21 9月, 2017 1 次提交
    • P
      nvic: Implement AIRCR changes for v8M · 3b2e9344
      Peter Maydell 提交于
      The Application Interrupt and Reset Control Register has some changes
      for v8M:
       * new bits SYSRESETREQS, BFHFNMINS and PRIS: these all have
         real state if the security extension is implemented and otherwise
         are constant
       * the PRIGROUP field is banked between security states
       * non-secure code can be blocked from using the SYSRESET bit
         to reset the system if SYSRESETREQS is set
      
      Implement the new state and the changes to register read and write.
      For the moment we ignore the effects of the secure PRIGROUP.
      We will implement the effects of PRIS and BFHFNMIS later.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1505240046-11454-6-git-send-email-peter.maydell@linaro.org
      3b2e9344
  22. 19 9月, 2017 1 次提交
    • I
      arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly · ba1ba5cc
      Igor Mammedov 提交于
      there are 2 use cases to deal with:
        1: fixed CPU models per board/soc
        2: boards with user configurable cpu_model and fallback to
           default cpu_model if user hasn't specified one explicitly
      
      For the 1st
        drop intermediate cpu_model parsing and use const cpu type
        directly, which replaces:
           typename = object_class_get_name(
                 cpu_class_by_name(TYPE_ARM_CPU, cpu_model))
           object_new(typename)
        with
           object_new(FOO_CPU_TYPE_NAME)
        or
           cpu_generic_init(BASE_CPU_TYPE, "my cpu model")
        with
           cpu_create(FOO_CPU_TYPE_NAME)
      
      as result 1st use case doesn't have to invoke not necessary
      translation and not needed code is removed.
      
      For the 2nd
       1: set default cpu type with MachineClass::default_cpu_type and
       2: use generic cpu_model parsing that done before machine_init()
          is run and:
          2.1: drop custom cpu_model parsing where pattern is:
             typename = object_class_get_name(
                 cpu_class_by_name(TYPE_ARM_CPU, cpu_model))
             [parse_features(typename, cpu_model, &err) ]
      
          2.2: or replace cpu_generic_init() which does what
               2.1 does + create_cpu(typename) with just
               create_cpu(machine->cpu_type)
      as result cpu_name -> cpu_type translation is done using
      generic machine code one including parsing optional features
      if supported/present (removes a bunch of duplicated cpu_model
      parsing code) and default cpu type is defined in an uniform way
      within machine_class_init callbacks instead of adhoc places
      in boadr's machine_init code.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1505318697-77161-6-git-send-email-imammedo@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      ba1ba5cc
  23. 15 9月, 2017 1 次提交