1. 27 6月, 2018 5 次提交
  2. 15 6月, 2018 1 次提交
  3. 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
  4. 08 6月, 2018 4 次提交
  5. 02 6月, 2018 2 次提交
  6. 01 6月, 2018 2 次提交
  7. 23 5月, 2018 1 次提交
  8. 20 5月, 2018 1 次提交
  9. 05 5月, 2018 1 次提交
  10. 10 4月, 2018 5 次提交
  11. 26 3月, 2018 2 次提交
    • T
      hw/net/can: Fix segfaults when using the devices without bus · 089eac81
      Thomas Huth 提交于
      The CAN devices can currently be used to crash QEMU, e.g.:
      
      $ x86_64-softmmu/qemu-system-x86_64 -device kvaser_pci
      Segmentation fault (core dumped)
      
      So we've got to add a proper check here that the corresponding
      bus is available.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1521193892-15552-2-git-send-email-thuth@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      089eac81
    • G
      virtio_net: flush uncompleted TX on reset · 94b52958
      Greg Kurz 提交于
      If the backend could not transmit a packet right away for some reason,
      the packet is queued for asynchronous sending. The corresponding vq
      element is tracked in the async_tx.elem field of the VirtIONetQueue,
      for later freeing when the transmission is complete.
      
      If a reset happens before completion, virtio_net_tx_complete() will push
      async_tx.elem back to the guest anyway, and we end up with the inuse flag
      of the vq being equal to -1. The next call to virtqueue_pop() is then
      likely to fail with "Virtqueue size exceeded".
      
      This can be reproduced easily by starting a guest with an hubport backend
      that is not connected to a functional network, eg,
      
       -device virtio-net-pci,netdev=hub0 -netdev hubport,id=hub0,hubid=0
      
      and no other -netdev hubport,hubid=0 on the command line.
      
      The appropriate fix is to ensure that such an asynchronous transmission
      cannot survive a device reset. So for all queues, we first try to send
      the packet again, and eventually we purge it if the backend still could
      not deliver it.
      
      CC: qemu-stable@nongnu.org
      Reported-by: NR. Nageswara Sastry <nasastry@in.ibm.com>
      Buglink: https://github.com/open-power-host-os/qemu/issues/37Signed-off-by: NGreg Kurz <groug@kaod.org>
      Tested-by: NR. Nageswara Sastry <nasastry@in.ibm.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      94b52958
  12. 20 3月, 2018 1 次提交
    • G
      fsl-imx6: Swap Ethernet interrupt defines · 6461d7e2
      Guenter Roeck 提交于
      The sabrelite machine model used by qemu-system-arm is based on the
      Freescale/NXP i.MX6Q processor. This SoC has an on-board ethernet
      controller which is supported in QEMU using the imx_fec.c module
      (actually called imx.enet for this model.)
      
      The include/hw/arm/fsm-imx6.h file defines the interrupt vectors for the
      imx.enet device like this:
      
       #define FSL_IMX6_ENET_MAC_1588_IRQ 118
       #define FSL_IMX6_ENET_MAC_IRQ 119
      
      According to https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf,
      page 225, in Table 3-1. ARM Cortex A9 domain interrupt summary,
      interrupts are as follows.
      
      150 ENET MAC 0 IRQ
      151 ENET MAC 0 1588 Timer interrupt
      
      where
      
      150 - 32 == 118
      151 - 32 == 119
      
      In other words, the vector definitions in the fsl-imx6.h file are reversed.
      
      Fixing the interrupts alone causes problems with older Linux kernels:
      The Ethernet interface will fail to probe with Linux v4.9 and earlier.
      Linux v4.1 and earlier will crash due to a bug in Ethernet driver probe
      error handling. This is a Linux kernel problem, not a qemu problem:
      the Linux kernel only worked by accident since it requested both interrupts.
      
      For backward compatibility, generate the Ethernet interrupt on both interrupt
      lines. This was shown to work from all Linux kernel releases starting with
      v3.16.
      
      Link: https://bugs.launchpad.net/qemu/+bug/1753309Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Message-id: 1520723090-22130-1-git-send-email-linux@roeck-us.net
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6461d7e2
  13. 14 3月, 2018 2 次提交
  14. 05 3月, 2018 1 次提交
  15. 03 3月, 2018 2 次提交
    • M
      Include less of the generated modular QAPI headers · 9af23989
      Markus Armbruster 提交于
      In my "build everything" tree, a change to the types in
      qapi-schema.json triggers a recompile of about 4800 out of 5100
      objects.
      
      The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h,
      qapi-types.h.  Each of these headers still includes all its shards.
      Reduce compile time by including just the shards we actually need.
      
      To illustrate the benefits: adding a type to qapi/migration.json now
      recompiles some 2300 instead of 4800 objects.  The next commit will
      improve it further.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20180211093607.27351-24-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [eblake: rebase to master]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9af23989
    • M
      net: fix misaligned member access · 4f51e1d3
      Marc-André Lureau 提交于
      Fixes the following ASAN warnings:
      
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:201:27: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                   ^
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:208:63: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                   ^
      /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:210:13: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
      0x631000028846: note: pointer points here
       01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20180209190340.19516-1-marcandre.lureau@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4f51e1d3
  16. 13 2月, 2018 5 次提交
  17. 09 2月, 2018 3 次提交
  18. 05 2月, 2018 1 次提交