1. 16 10月, 2018 2 次提交
  2. 08 10月, 2018 1 次提交
    • P
      virt: Suppress external aborts on virt-2.10 and earlier · 846690de
      Peter Maydell 提交于
      In commit c79c0a31 we enabled emulation of external aborts
      when the guest attempts to access a physical address with no
      mapped device. In commit 4672cbd7 we suppress this for
      most legacy boards to prevent breakage of previously working
      guests, but we didn't suppress it in the 'virt' board, with
      the rationale "we know that guests won't try to prod devices
      that we don't describe in the device tree or ACPI tables". This
      is mostly true, but we've had a report of a Linux guest image
      that this did break. The problem seems to be that the guest
      is (incorrectly) configured with a DEBUG_UART_PHYS value that
      tells it there is a uart at 0x10009000 (which is true for
      vexpress but not for virt), so in early bootup the kernel
      probes this bogus address.
      
      This is a misconfigured guest, so we don't need to worry
      about it too much, but we can arrange that guests that ran
      on QEMU v2.10 (before c79c0a31) will still run on
      the "virt-2.10" board model, by suppressing external aborts
      only for that version and earlier. This seems a reasonable
      compromise: "virt-2.10" is supposed to behave the same way
      that "virt" did in the 2.10 release, and making it do that
      provides a usable workaround for guests with bugs like this.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20180925144127.31965-1-peter.maydell@linaro.org
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      846690de
  3. 20 8月, 2018 1 次提交
  4. 15 8月, 2018 1 次提交
  5. 29 6月, 2018 2 次提交
  6. 22 6月, 2018 7 次提交
  7. 18 6月, 2018 1 次提交
  8. 04 6月, 2018 1 次提交
  9. 01 6月, 2018 1 次提交
  10. 11 5月, 2018 3 次提交
    • I
      make sure that we aren't overwriting mc->get_hotplug_handler by accident · debbdc00
      Igor Mammedov 提交于
      Suggested-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 1525691524-32265-5-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      debbdc00
    • I
      arm/boot: split load_dtb() from arm_load_kernel() · 3b77f6c3
      Igor Mammedov 提交于
      load_dtb() depends on arm_load_kernel() to figure out place
      in RAM where it should be loaded, but it's not required for
      arm_load_kernel() to work. Sometimes it's neccesary for
      devices added with -device/device_add to be enumerated in
      DTB as well, which's lead to [1] and surrounding commits to
      add 2 more machine_done notifiers with non obvious ordering
      to make dynamic sysbus devices initialization happen in
      the right order.
      
      However instead of moving whole arm_load_kernel() in to
      machine_done, it's sufficient to move only load_dtb() into
      virt_machine_done() notifier and remove ArmLoadKernelNotifier/
      /PlatformBusFDTNotifierParams notifiers, which saves us ~90LOC
      and simplifies code flow quite a bit.
      Later would allow to consolidate DTB generation within one
      function for 'mach-virt' board and make it reentrant so it
      could generate updated DTB in device hotplug secenarios.
      
      While at it rename load_dtb() to arm_load_dtb() since it's
      public now.
      
      Add additional field skip_dtb_autoload to struct arm_boot_info
      to allow manual DTB load later in mach-virt and to avoid touching
      all other boards to explicitly call arm_load_dtb().
      
       1) (ac9d32e3 hw/arm/boot: arm_load_kernel implemented as a machine init done notifier)
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Message-id: 1525691524-32265-4-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3b77f6c3
    • I
      platform-bus-device: use device plug callback instead of machine_done notifier · a3fc8396
      Igor Mammedov 提交于
      platform-bus were using machine_done notifier to get and map
      (assign irq/mmio resources) dynamically added sysbus devices
      after all '-device' options had been processed.
      That however creates non obvious dependencies on ordering of
      machine_done notifiers and requires carefull line juggling
      to keep it working. For example see comment above
      create_platform_bus() and 'straitforward' arm_load_kernel()
      had to converted to machine_done notifier and that lead to
      yet another machine_done notifier to keep it working
      arm_register_platform_bus_fdt_creator().
      
      Instead of hiding resource assignment in platform-bus-device
      to magically initialize sysbus devices, use device plug
      callback and assign resources explicitly at board level
      at the moment each -device option is being processed.
      
      That adds a bunch of machine declaration boiler plate to
      e500plat board, similar to ARM/x86 but gets rid of hidden
      machine_done notifier and would allow to remove the dependent
      notifiers in ARM code simplifying it and making code flow
      easier to follow.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-id: 1525691524-32265-3-git-send-email-imammedo@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a3fc8396
  11. 05 5月, 2018 3 次提交
  12. 26 4月, 2018 1 次提交
  13. 24 3月, 2018 1 次提交
    • W
      mach-virt: Set VM's SMBIOS system version to mc->name · dfadc3bf
      Wei Huang 提交于
      Instead of using "1.0" as the system version of SMBIOS, we should use
      mc->name for mach-virt machine type to be consistent other architectures.
      With this patch, "dmidecode -t 1" (e.g., "-M virt-2.12,accel=kvm") will
      show:
      
          Handle 0x0100, DMI type 1, 27 bytes
          System Information
                  Manufacturer: QEMU
                  Product Name: KVM Virtual Machine
                  Version: virt-2.12
                  Serial Number: Not Specified
                  ...
      
      instead of:
      
          Handle 0x0100, DMI type 1, 27 bytes
          System Information
                  Manufacturer: QEMU
                  Product Name: KVM Virtual Machine
                  Version: 1.0
                  Serial Number: Not Specified
                  ...
      
      For backward compatibility, we allow older machine types to keep "1.0"
      as the default system version.
      Signed-off-by: NWei Huang <wei@redhat.com>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Message-id: 20180322212318.7182-1-wei@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      dfadc3bf
  14. 10 3月, 2018 2 次提交
  15. 09 2月, 2018 1 次提交
  16. 25 1月, 2018 1 次提交
    • P
      hw/arm/virt: Check that the CPU realize method succeeded · c88bc3e0
      Peter Maydell 提交于
      We were passing a NULL error pointer to the object_property_set_bool()
      call that realizes the CPU object. This meant that we wouldn't detect
      failure, and would plough blindly on to crash later trying to use a
      NULL CPU object pointer. Detect errors and fail instead.
      
      In particular, this will be necessary to detect the user error
      of using "-cpu host" without "-enable-kvm" once we make the host
      CPU type be registered unconditionally rather than only in
      kvm_arch_init().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c88bc3e0
  17. 19 1月, 2018 3 次提交
    • I
      possible_cpus: add CPUArchId::type field · d342eb76
      Igor Mammedov 提交于
      Remove dependency of possible_cpus on 1st CPU instance,
      which decouples configuration data from CPU instances that
      are created using that data.
      
      Also later it would be used for enabling early cpu to numa node
      configuration at runtime qmp_query_hotpluggable_cpus() should
      provide a list of available cpu slots at early stage,
      before machine_init() is called and the 1st cpu is created,
      so that mgmt might be able to call it and use output to set
      numa mapping.
      
      Use MachineClass::possible_cpu_arch_ids() callback to set
      cpu type info, along with the rest of possible cpu properties,
      to let machine define which cpu type* will be used.
      
      * for SPAPR it will be a spapr core type and for ARM/s390x/x86
        a respective descendant of CPUClass.
      
      Move parse_numa_opts() in vl.c after cpu_model is parsed into
      cpu_type so that possible_cpu_arch_ids() would know which
      cpu_type to use during layout initialization.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-Id: <1515597770-268979-1-git-send-email-imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      d342eb76
    • E
      hw/arm/virt: Allow only supported dynamic sysbus devices · 6f2062b9
      Eduardo Habkost 提交于
      Replace the TYPE_SYS_BUS_DEVICE entry in the allowed sysbus
      device list with the two device types that are really supported
      by the virt machine: vfio-amd-xgbe and vfio-calxeda-xgmac.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20171125151610.20547-3-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      6f2062b9
    • E
      machine: Replace has_dynamic_sysbus with list of allowed devices · 0bd1909d
      Eduardo Habkost 提交于
      The existing has_dynamic_sysbus flag makes the machine accept
      every user-creatable sysbus device type on the command-line.
      Replace it with a list of allowed device types, so machines can
      easily accept some sysbus devices while rejecting others.
      
      To keep exactly the same behavior as before, the existing
      has_dynamic_sysbus=true assignments are replaced with a
      TYPE_SYS_BUS_DEVICE entry on the allowed list.  Other patches
      will replace the TYPE_SYS_BUS_DEVICE entries with more specific
      lists of devices.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Anthony Perard <anthony.perard@citrix.com>
      Cc: qemu-arm@nongnu.org
      Cc: qemu-ppc@nongnu.org
      Cc: xen-devel@lists.xenproject.org
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20171125151610.20547-2-ehabkost@redhat.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0bd1909d
  18. 16 1月, 2018 1 次提交
  19. 24 11月, 2017 1 次提交
  20. 20 9月, 2017 1 次提交
    • I
      numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed · 79e07936
      Igor Mammedov 提交于
      Calculating default node-ids for CPUs in possible_cpu_arch_ids()
      is rather fragile since defaults calculation uses nb_numa_nodes but
      callback might be potentially called early before all -numa CLI
      options are parsed, which would lead to cpus assigned only upto
      nb_numa_nodes at the time possible_cpu_arch_ids() is called.
      
      Issue was introduced by
      (7c88e65d numa: mirror cpu to node mapping in MachineState::possible_cpus)
      and for example CLI:
        -smp 4 -numa node,cpus=0 -numa node
      would set props.node-id in possible_cpus array for every non
      explicitly mapped CPU to the first node.
      
      Issue is not visible to guest nor to mgmt interface due to
        1) implictly mapped cpus are forced to the first node in
           case of partial mapping
        2) in case of default mapping possible_cpu_arch_ids() is
           called after all -numa options are parsed (resulting
           in correct mapping).
      
      However it's fragile to rely on late execution of
      possible_cpu_arch_ids(), therefore add machine specific
      callback that returns node-id for CPU and use it to calculate/
      set defaults at machine_numa_finish_init() time when all -numa
      options are parsed.
      Reported-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1496314408-163972-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      79e07936
  21. 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
  22. 15 9月, 2017 1 次提交
  23. 04 9月, 2017 3 次提交