1. 24 3月, 2015 2 次提交
  2. 20 3月, 2015 5 次提交
    • G
      ehci: fix segfault when hot-unplugging ehci controller · 4e289b1b
      Gonglei 提交于
      When hot-unplugging the usb controllers (ehci/uhci),
      we have to clean all resouce of these devices,
      involved registered reset handler. Otherwise, it
      may cause NULL pointer access and/or segmentation fault
      if we reboot the guest os after hot-unplugging.
      
      Let's hook up reset via DeviceClass->reset() and drop
      the qemu_register_reset() call. Then Qemu will register
      and unregister the reset handler automatically.
      
      Cc: qemu-stable <qemu-stable@nongnu.org>
      Reported-by: NLidonglin <lidonglin@huawei.com>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4e289b1b
    • G
      ohci: fix resource cleanup leak · 88dd1b8d
      Gonglei 提交于
      When hot-unplugging the usb controllers (ehci/uhci),
      we have to clean all resouce of these devices,
      involved registered reset handler. Otherwise, it
      may cause NULL pointer access and/or segmentation fault
      if we reboot the guest os after hot-unplugging.
      
      Let's hook up reset via DeviceClass->reset() and drop
      the qemu_register_reset() call. Then Qemu will register
      and unregister the reset handler automatically.
      
      Ohci does't support hotplugging/hotunplugging yet, but
      existing resource cleanup leak logic likes ehci/uhci.
      
      Cc: qemu-stable <qemu-stable@nongnu.org>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      88dd1b8d
    • G
      uhci: fix segfault when hot-unplugging uhci controller · 537e572a
      Gonglei 提交于
      When hot-unplugging the usb controllers (ehci/uhci),
      we have to clean all resouce of these devices,
      involved registered reset handler. Otherwise, it
      may cause NULL pointer access and/or segmentation fault
      if we reboot the guest os after hot-unplugging.
      
      Let's hook up reset via DeviceClass->reset() and drop
      the qemu_register_reset() call. Then Qemu will register
      and unregister the reset handler automatically.
      
      Cc: qemu-stable <qemu-stable@nongnu.org>
      Reported-by: NLidonglin <lidonglin@huawei.com>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      537e572a
    • E
      Revert "target-i386: Disable HLE and RTM on Haswell & Broadwell" · 1ee91598
      Eduardo Habkost 提交于
      This reverts commit 13704e4c.
      
      With the Intel microcode update that removed HLE and RTM, there will be
      different kinds of Haswell and Broadwell CPUs out there: some that still
      have the HLE and RTM features, and some that don't have the HLE and RTM
      features. On both cases people may be willing to use the pc-*-2.3
      machine-types.
      
      So instead of making the CPU model results confusing by making it depend
      on the machine-type, keep HLE and RTM on the existing Haswell and
      Broadwell CPU models. The plan is to introduce "Haswell-noTSX" and
      "Broadwell-noTSX" CPU models later, for people who have CPUs that don't
      have TSX feature available.
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      1ee91598
    • I
      pc: fix default VCPU to NUMA node mapping · fb43b73b
      Igor Mammedov 提交于
      Since commit
         dd0247e0 pc: acpi: mark all possible CPUs as enabled in SRAT
      Linux kernel actually tries to use CPU to Node mapping from
      QEMU provided SRAT table instead of discarding it, and that
      in some cases breaks build_sched_domains() which expects
      sane mapping where cores/threads belonging to the same socket
      are on the same NUMA node.
      
      With current default round-robin mapping of VCPUs to nodes
      guest ends-up with cores/threads belonging to the same socket
      being on different NUMA nodes.
      
      For example with following CLI:
      
         qemu-system-x86_64 -m 4G \
               -cpu Opteron_G3,vendor=AuthenticAMD \
               -smp 5,sockets=1,cores=4,threads=1,maxcpus=8 \
               -numa node,nodeid=0 -numa node,nodeid=1
      
      2.6.32 based kernels will hang on boot due to incorrectly built
      sched_group-s list in update_sd_lb_stats()
      
      Replacing default mapping with a manual, where VCPUs belonging to
      the same socket are on the same NUMA node, fixes the issue for
      guests which can't handle nonsense topology i.e. changing CLI to:
        -numa node,nodeid=0,cpus=0-3 -numa node,nodeid=1,cpus=4-7
      
      So instead of simply scattering VCPUs around nodes, provide
      callback to map the same socket VCPUs to the same NUMA node,
      which is what guests would expect from a sane hardware/BIOS.
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      fb43b73b
  3. 19 3月, 2015 10 次提交
    • A
      virtio: serial: expose a 'guest_writable' callback for users · 4add73aa
      Amit Shah 提交于
      Users of virtio-serial may want to know when a port becomes writable.  A
      port can stop accepting writes if the guest port is open but not being
      read from.  In this case, data gets queued up in the virtqueue, and
      after the vq is full, writes to the port do not succeed.
      
      When the guest reads off a vq element, and adds a new one for the host
      to put data in, we can tell users the port is available for more writes,
      via the new ->guest_writable() callback.
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      4add73aa
    • S
      elf-loader: Fix truncation warning from coverity · 6cbfb86f
      Stefan Weil 提交于
      Coverity reports a truncation due to cast operation on operand
      reltab->sh_size from 64 bits to 32 bits for calls of load_at.
      
      Fix the types of the function arguments to match their use in
      function load_at: the offset is used for lseek which takes an
      off_t parameter, the size is used for g_malloc and read.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      6cbfb86f
    • G
    • P
      pc-dimm: Add description for device list. · bdd09778
      Paulo Vital 提交于
      The pc-dimm option presented on device list (by argument "-device \?")
      is the unique option that don't have any information about it. This
      patch adds a description for the pc-dimm device to help users to
      identify it.
      Signed-off-by: NPaulo Vital <paulo.vital@profitbricks.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      bdd09778
    • Z
      error: Replace error_report() & error_free() with error_report_err() · 19867549
      zhanghailiang 提交于
      This is a continuation of the work started in commit 565f65d2:
      "error: Use error_report_err() where appropriate"
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      19867549
    • G
      arm: fix memory leak · 6e05a12f
      Gonglei 提交于
      Cc: Michael Tokarev <mjt@tls.msk.ru>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      6e05a12f
    • S
      Fix remaining warnings from Sparse (void return) · e7ae771f
      Stefan Weil 提交于
      Sparse report:
      
      hw/display/vga.c:2000:5: warning: returning void-valued expression
      hw/intc/arm_gic.c:707:9: warning: returning void-valued expression
      hw/intc/etraxfs_pic.c:138:9: warning: returning void-valued expression
      hw/nvram/fw_cfg.c:475:5: warning: returning void-valued expression
      hw/timer/a9gtimer.c:124:5: warning: returning void-valued expression
      hw/tpm/tpm_tis.c:794:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:558:9: warning: returning void-valued expression
      hw/usb/hcd-musb.c:776:13: warning: returning void-valued expression
      hw/usb/hcd-musb.c:867:5: warning: returning void-valued expression
      hw/usb/hcd-musb.c:932:5: warning: returning void-valued expression
      include/qom/cpu.h:584:5: warning: returning void-valued expression
      monitor.c:4686:13: warning: returning void-valued expression
      monitor.c:4690:13: warning: returning void-valued expression
      
      Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Andreas Färber <afaerber@suse.de>
      Cc: Luiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      e7ae771f
    • S
      arm/nseries: Fix warnings from Sparse · 30d76f13
      Stefan Weil 提交于
      Sparse report:
      
      arm/nseries.c:1406:5: warning: returning void-valued expression
      arm/nseries.c:1411:5: warning: returning void-valued expression
      
      Cc: Andrzej Zaborowski <balrogg@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      30d76f13
    • S
      omap: Fix warnings from Sparse · 77a8257e
      Stefan Weil 提交于
      Sparse report:
      
      arm/omap1.c:1015:9: warning: returning void-valued expression
      arm/omap1.c:1084:9: warning: returning void-valued expression
      arm/omap1.c:1178:9: warning: returning void-valued expression
      arm/omap1.c:1287:9: warning: returning void-valued expression
      arm/omap1.c:1382:9: warning: returning void-valued expression
      arm/omap1.c:1650:9: warning: returning void-valued expression
      arm/omap1.c:1778:9: warning: returning void-valued expression
      arm/omap1.c:1985:9: warning: returning void-valued expression
      arm/omap1.c:210:9: warning: returning void-valued expression
      arm/omap1.c:2213:9: warning: returning void-valued expression
      arm/omap1.c:2352:9: warning: returning void-valued expression
      arm/omap1.c:2447:9: warning: returning void-valued expression
      arm/omap1.c:2640:9: warning: returning void-valued expression
      arm/omap1.c:317:9: warning: returning void-valued expression
      arm/omap1.c:3413:13: warning: returning void-valued expression
      arm/omap1.c:3414:13: warning: returning void-valued expression
      arm/omap1.c:3415:14: warning: returning void-valued expression
      arm/omap1.c:3589:9: warning: returning void-valued expression
      arm/omap1.c:443:9: warning: returning void-valued expression
      arm/omap1.c:588:9: warning: returning void-valued expression
      arm/omap1.c:860:9: warning: returning void-valued expression
      arm/omap2.c:1362:9: warning: returning void-valued expression
      arm/omap2.c:450:9: warning: returning void-valued expression
      arm/omap2.c:695:9: warning: returning void-valued expression
      arm/omap2.c:760:9: warning: returning void-valued expression
      hw/char/omap_uart.c:115:9: warning: returning void-valued expression
      hw/display/omap_dss.c:1019:9: warning: returning void-valued expression
      hw/display/omap_dss.c:215:9: warning: returning void-valued expression
      hw/display/omap_dss.c:380:9: warning: returning void-valued expression
      hw/display/omap_dss.c:739:9: warning: returning void-valued expression
      hw/display/omap_dss.c:931:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:139:5: warning: returning void-valued expression
      hw/dma/omap_dma.c:1505:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:1860:9: warning: returning void-valued expression
      hw/gpio/omap_gpio.c:116:9: warning: returning void-valued expression
      hw/misc/omap_gpmc.c:627:9: warning: returning void-valued expression
      hw/misc/omap_l4.c:85:9: warning: returning void-valued expression
      hw/misc/omap_sdrc.c:95:9: warning: returning void-valued expression
      hw/misc/omap_tap.c:98:9: warning: returning void-valued expression
      hw/sd/omap_mmc.c:409:9: warning: returning void-valued expression
      hw/ssi/omap_spi.c:229:9: warning: returning void-valued expression
      hw/timer/omap_gptimer.c:447:9: warning: returning void-valued expression
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      77a8257e
    • S
      9pfs: Fix warnings from Sparse · 0289a412
      Stefan Weil 提交于
      Sparse report:
      
      9pfs/virtio-9p.c:1953:9: warning: returning void-valued expression
      9pfs/virtio-9p-handle.c:143:5: warning: returning void-valued expression
      9pfs/virtio-9p-handle.c:160:5: warning: returning void-valued expression
      9pfs/virtio-9p-local.c:384:5: warning: returning void-valued expression
      9pfs/virtio-9p-local.c:415:5: warning: returning void-valued expression
      9pfs/virtio-9p-proxy.c:672:5: warning: returning void-valued expression
      9pfs/virtio-9p-proxy.c:689:5: warning: returning void-valued expression
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      0289a412
  4. 18 3月, 2015 8 次提交
  5. 17 3月, 2015 11 次提交
  6. 16 3月, 2015 4 次提交