1. 29 6月, 2018 1 次提交
  2. 12 6月, 2018 2 次提交
  3. 02 6月, 2018 1 次提交
  4. 01 6月, 2018 1 次提交
  5. 11 5月, 2018 2 次提交
  6. 07 5月, 2018 4 次提交
  7. 26 4月, 2018 1 次提交
  8. 12 3月, 2018 6 次提交
  9. 06 3月, 2018 1 次提交
  10. 03 3月, 2018 1 次提交
  11. 09 2月, 2018 2 次提交
  12. 19 1月, 2018 1 次提交
    • 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
  13. 12 1月, 2018 1 次提交
  14. 18 12月, 2017 3 次提交
  15. 02 12月, 2017 1 次提交
  16. 16 11月, 2017 2 次提交
    • D
      NUMA: Enable adding NUMA node implicitly · 7b8be49d
      Dou Liyang 提交于
      Linux and Windows need ACPI SRAT table to make memory hotplug work properly,
      however currently QEMU doesn't create SRAT table if numa options aren't present
      on CLI.
      
      Which breaks both linux and windows guests in certain conditions:
       * Windows: won't enable memory hotplug without SRAT table at all
       * Linux: if QEMU is started with initial memory all below 4Gb and no SRAT table
         present, guest kernel will use nommu DMA ops, which breaks 32bit hw drivers
         when memory is hotplugged and guest tries to use it with that drivers.
      
      Fix above issues by automatically creating a numa node when QEMU is started with
      memory hotplug enabled but without '-numa' options on CLI.
      (PS: auto-create numa node only for new machine types so not to break migration).
      
      Which would provide SRAT table to guests without explicit -numa options on CLI
      and would allow:
       * Windows: to enable memory hotplug
       * Linux: switch to SWIOTLB DMA ops, to bounce DMA transfers to 32bit allocated
         buffers that legacy drivers/hw can handle.
      
      [Rewritten by Igor]
      Reported-by: NThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Suggested-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: Alistair Francis <alistair23@gmail.com>
      Cc: Takao Indoh <indou.takao@jp.fujitsu.com>
      Cc: Izumi Taku <izumi.taku@jp.fujitsu.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      7b8be49d
    • M
      hw/pci-host: Fix x86 Host Bridges 64bit PCI hole · 9fa99d25
      Marcel Apfelbaum 提交于
      Currently there is no MMIO range over 4G
      reserved for PCI hotplug. Since the 32bit PCI hole
      depends on the number of cold-plugged PCI devices
      and other factors, it is very possible is too small
      to hotplug PCI devices with large BARs.
      
      Fix it by reserving 2G for I4400FX chipset
      in order to comply with older Win32 Guest OSes
      and 32G for Q35 chipset.
      
      Even if the new defaults of pci-hole64-size will appear in
      "info qtree" also for older machines, the property was
      not implemented so no changes will be visible to guests.
      
      Note this is a regression since prev QEMU versions had
      some range reserved for 64bit PCI hotplug.
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9fa99d25
  17. 27 10月, 2017 1 次提交
  18. 12 10月, 2017 1 次提交
    • I
      pc: make sure that plugged CPUs are of the same type · 6970c5ff
      Igor Mammedov 提交于
      heterogeneous cpus are not supported and hotplugging different
      cpu model crashes QEMU:
      
        qemu-system-x86_64 -cpu qemu64 -smp 1,maxcpus=2
        (qemu) device_add host-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=foo
        (qemu) info cpus
        error: failed to get MSR 0x38d
        qemu-system-x86_64: target/i386/kvm.c:2121: kvm_get_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
        Aborted (core dumped)
      
      Gracefully fail hotplug process in case of user mistake.
      Reported-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1507638879-200718-1-git-send-email-imammedo@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6970c5ff
  19. 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
  20. 19 9月, 2017 3 次提交
    • 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
    • A
      hw/i386: Improve some of the warning messages · 9e5d2c52
      Alistair Francis 提交于
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Suggested-by: NEduardo Habkost <ehabkost@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1d6ef2ccd9667878ed5820fcf17eef35957ea5d8.1505158760.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9e5d2c52
    • I
      pc: use generic cpu_model parsing · 311ca98d
      Igor Mammedov 提交于
      define default CPU type in generic way in pc_machine_class_init()
      and let common machine code to handle cpu_model parsing
      
      Patch also introduces TARGET_DEFAULT_CPU_TYPE define for 2 purposes:
        * make foo_machine_class_init() look uniform on every target
        * use define in [bsd|linux]-user targets to pick default
          cpu type
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <1505318697-77161-5-git-send-email-imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      311ca98d
  21. 22 8月, 2017 1 次提交
    • T
      hw/ppc/spapr: Fix segfault when instantiating a 'pc-dimm' without 'memdev' · 04790978
      Thomas Huth 提交于
      QEMU currently crashes when trying to use a 'pc-dimm' on the pseries
      machine without specifying its 'memdev' property. This happens because
      pc_dimm_get_memory_region() does not check whether the 'memdev' property
      has properly been set by the user. Looking closer at this function, it's
      also obvious that it is using &error_abort to call another function - and
      this is bad in a function that is used in the hot-plugging calling chain
      since this can also cause QEMU to exit unexpectedly.
      
      So let's fix these issues in a proper way now: Add a "Error **errp"
      parameter to pc_dimm_get_memory_region() which we use in case the 'memdev'
      property has not been set by the user, and which we can use instead of
      the &error_abort, and change the callers of get_memory_region() to make
      use of this "errp" parameter for proper error checking.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      04790978
  22. 02 8月, 2017 1 次提交
    • I
      pc: make 'pc.rom' readonly when machine has PCI enabled · 208fa0e4
      Igor Mammedov 提交于
      looking at bios ROM mapping in QEMU it seems that only isapc
      (i.e. not PCI enabled machine) requires ROM being mapped as
      RW in other cases BIOS is mapped as RO. Do the same for option
      ROM 'pc.rom' when machine has PCI enabled.
      
      As useful side-effect pc.rom MemoryRegion stops being
      put in vhost memory map (filtered out by vhost_section()),
      which reduces number of entries by 1.
      
      Coincidentally it fixes migration failure reported in
      
      "[PATCH V2]  vhost: fix a migration failed because of vhost region merge"
      
      where following destination CLI with /sys/module/vhost/parameters/max_mem_regions = 8
      
      export DIMMSCOUNT=6
      QEMU -enable-kvm \
           -netdev type=tap,id=guest0,vhost=on,script=no,vhostforce \
           -device virtio-net-pci,netdev=guest0 \
           -m 256,slots=256,maxmem=2G \
           `i=0; while [ $i -lt $DIMMSCOUNT ]; do echo \
               "-object memory-backend-ram,id=m$i,size=128M \
                -device pc-dimm,id=d$i,memdev=m$i"; i=$(($i + 1)); \
           done`
      
      will fail to startup with error:
      
       "-device pc-dimm,id=d5,memdev=m5: a used vhost backend has no free memory slots left"
      
      while it's possible to add the 6th DIMM during hotplug
      on source.
      
      Issue is caused by the fact that number of entries in vhost map
      is bigger on 1 entry, when -device is processed, than
      after guest boots up, and that offending entry belongs to
      'pc.rom', it's not like vhost intends to do IO in ROM range
      so making it RO hides region from vhost and makes number
      of entries in vhost memory map at -device/machine_done time
      match number of entries after guest boots.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reported-by: NPeng Hao <peng.hao2@zte.com.cn>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      208fa0e4
  23. 15 7月, 2017 2 次提交