1. 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
  2. 10 3月, 2018 2 次提交
  3. 09 2月, 2018 1 次提交
  4. 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
  5. 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
  6. 16 1月, 2018 1 次提交
  7. 24 11月, 2017 1 次提交
  8. 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
  9. 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
  10. 15 9月, 2017 1 次提交
  11. 04 9月, 2017 4 次提交
  12. 07 8月, 2017 1 次提交
  13. 15 7月, 2017 2 次提交
  14. 06 6月, 2017 1 次提交
  15. 02 6月, 2017 1 次提交
  16. 12 5月, 2017 6 次提交
  17. 28 2月, 2017 2 次提交
  18. 11 2月, 2017 3 次提交
  19. 28 1月, 2017 1 次提交
  20. 20 1月, 2017 5 次提交
  21. 09 1月, 2017 1 次提交