1. 27 9月, 2017 1 次提交
  2. 21 9月, 2017 1 次提交
  3. 15 9月, 2017 1 次提交
  4. 08 9月, 2017 6 次提交
  5. 07 9月, 2017 1 次提交
  6. 31 8月, 2017 1 次提交
  7. 01 8月, 2017 2 次提交
  8. 31 7月, 2017 1 次提交
  9. 17 7月, 2017 2 次提交
  10. 15 7月, 2017 1 次提交
  11. 13 7月, 2017 1 次提交
  12. 04 7月, 2017 4 次提交
  13. 20 6月, 2017 1 次提交
  14. 13 6月, 2017 2 次提交
  15. 07 6月, 2017 1 次提交
  16. 06 6月, 2017 1 次提交
  17. 02 6月, 2017 2 次提交
  18. 26 5月, 2017 1 次提交
  19. 23 5月, 2017 2 次提交
    • S
      e1000e: Fix ICR "Other" causes clear logic · 82342e91
      Sameeh Jubran 提交于
      This commit fixes a bug which causes the guest to hang. The bug was
      observed upon a "receive overrun" (bit #6 of the ICR register)
      interrupt which could be triggered post migration in a heavy traffic
      environment. Even though the "receive overrun" bit (#6) is masked out
      by the IMS register (refer to the log below) the driver still receives
      an interrupt as the "receive overrun" bit (#6) causes the "Other" -
      bit #24 of the ICR register - bit to be set as documented below. The
      driver handles the interrupt and clears the "Other" bit (#24) but
      doesn't clear the "receive overrun" bit (#6) which leads to an
      infinite loop. Apparently the Windows driver expects that the "receive
      overrun" bit and other ones - documented below - to be cleared when
      the "Other" bit (#24) is cleared.
      
      So to sum that up:
      1. Bit #6 of the ICR register is set by heavy traffic
      2. As a results of setting bit #6, bit #24 is set
      3. The driver receives an interrupt for bit 24 (it doesn't receieve an
         interrupt for bit #6 as it is masked out by IMS)
      4. The driver handles and clears the interrupt of bit #24
      5. Bit #6 is still set.
      6. 2 happens all over again
      
      The Interrupt Cause Read - ICR register:
      
      The ICR has the "Other" bit - bit #24 - that is set when one or more
      of the following ICR register's bits are set:
      
      LSC - bit #2, RXO - bit #6, MDAC - bit #9, SRPD - bit #16, ACK - bit
      #17, MNG - bit #18
      
      This bug can occur with any of these bits depending on the driver's
      behaviour and the way it configures the device. However, trying to
      reproduce it with any bit other than RX0 is challenging and came to
      failure as the drivers don't implement most of these bits, trying to
      reproduce it with LSC (Link Status Change - bit #2) bit didn't succeed
      too as it seems that Windows handles this bit differently.
      
      Log sample of the storm:
      
      27563@1494850819.411877:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
      27563@1494850819.411900:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.411915:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412380:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412395:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412436:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412441:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412998:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
      
      * This bug behaviour wasn't observed with the Linux driver.
      
      This commit solves:
      https://bugzilla.redhat.com/show_bug.cgi?id=1447935
      https://bugzilla.redhat.com/show_bug.cgi?id=1449490
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NSameeh Jubran <sjubran@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      82342e91
    • Y
      virtio-net: fix wild pointer when remove virtio-net queues · f989c30c
      Yunjian Wang 提交于
      The tx_bh or tx_timer will free in virtio_net_del_queue() function, when
      removing virtio-net queues if the guest doesn't support multiqueue. But
      it might be still referenced by virtio_net_set_status(), which needs to
      be set NULL. And also the tx_waiting needs to be set zero to prevent
      virtio_net_set_status() accessing tx_bh or tx_timer.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NYunjian Wang <wangyunjian@huawei.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      f989c30c
  20. 17 5月, 2017 2 次提交
    • E
      sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE · e4f4fb1e
      Eduardo Habkost 提交于
      commit 33cd52b5 unset
      cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all
      sysbus devices appear on "-device help" and lack the "no-user"
      flag in "info qdm".
      
      To fix this, we can set user_creatable=false by default on
      TYPE_SYS_BUS_DEVICE, but this requires setting
      user_creatable=true explicitly on the sysbus devices that
      actually work with -device.
      
      Fortunately today we have just a few has_dynamic_sysbus=1
      machines: virt, pc-q35-*, ppce500, and spapr.
      
      virt, ppce500, and spapr have extra checks to ensure just a few
      device types can be instantiated:
      
      * virt supports only TYPE_VFIO_CALXEDA_XGMAC, TYPE_VFIO_AMD_XGBE.
      * ppce500 supports only TYPE_ETSEC_COMMON.
      * spapr supports only TYPE_SPAPR_PCI_HOST_BRIDGE.
      
      This patch sets user_creatable=true explicitly on those 4 device
      classes.
      
      Now, the more complex cases:
      
      pc-q35-*: q35 has no sysbus device whitelist yet (which is a
      separate bug). We are in the process of fixing it and building a
      sysbus whitelist on q35, but in the meantime we can fix the
      "-device help" and "info qdm" bugs mentioned above. Also, despite
      not being strictly necessary for fixing the q35 bug, reducing the
      list of user_creatable=true devices will help us be more
      confident when building the q35 whitelist.
      
      xen: We also have a hack at xen_set_dynamic_sysbus(), that sets
      has_dynamic_sysbus=true at runtime when using the Xen
      accelerator. This hack is only used to allow xen-backend devices
      to be dynamically plugged/unplugged.
      
      This means today we can use -device with the following 22 device
      types, that are the ones compiled into the qemu-system-x86_64 and
      qemu-system-i386 binaries:
      
      * allwinner-ahci
      * amd-iommu
      * cfi.pflash01
      * esp
      * fw_cfg_io
      * fw_cfg_mem
      * generic-sdhci
      * hpet
      * intel-iommu
      * ioapic
      * isabus-bridge
      * kvmclock
      * kvm-ioapic
      * kvmvapic
      * SUNW,fdtwo
      * sysbus-ahci
      * sysbus-fdc
      * sysbus-ohci
      * unimplemented-device
      * virtio-mmio
      * xen-backend
      * xen-sysdev
      
      This patch adds user_creatable=true explicitly to those devices,
      temporarily, just to keep 100% compatibility with existing
      behavior of q35. Subsequent patches will remove
      user_creatable=true from the devices that are really not meant to
      user-creatable on any machine, and remove the FIXME comment from
      the ones that are really supposed to be user-creatable. This is
      being done in separate patches because we still don't have an
      obvious list of devices that will be whitelisted by q35, and I
      would like to get each device reviewed individually.
      
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: Beniamino Galvani <b.galvani@gmail.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Frank Blaschka <frank.blaschka@de.ibm.com>
      Cc: Gabriel L. Somlo <somlo@cmu.edu>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Pierre Morel <pmorel@linux.vnet.ibm.com>
      Cc: Prasad J Pandit <pjp@fedoraproject.org>
      Cc: qemu-arm@nongnu.org
      Cc: qemu-block@nongnu.org
      Cc: qemu-ppc@nongnu.org
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Shannon Zhao <zhaoshenglong@huawei.com>
      Cc: sstabellini@kernel.org
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-3-ehabkost@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [ehabkost: Small changes at sysbus_device_class_init() comments]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e4f4fb1e
    • E
      qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable · e90f2a8c
      Eduardo Habkost 提交于
      cannot_instantiate_with_device_add_yet was introduced by commit
      efec3dd6 to replace no_user. It was
      supposed to be a temporary measure.
      
      When it was introduced, we had 54
      cannot_instantiate_with_device_add_yet=true lines in the code.
      Today (3 years later) this number has not shrunk: we now have
      57 cannot_instantiate_with_device_add_yet=true lines. I think it
      is safe to say it is not a temporary measure, and we won't see
      the flag go away soon.
      
      Instead of a long field name that misleads people to believe it
      is temporary, replace it a shorter and less misleading field:
      user_creatable.
      
      Except for code comments, changes were generated using the
      following Coccinelle patch:
      
        @@
        expression DC;
        @@
        (
        -DC->cannot_instantiate_with_device_add_yet = false;
        +DC->user_creatable = true;
        |
        -DC->cannot_instantiate_with_device_add_yet = true;
        +DC->user_creatable = false;
        )
      
        @@
        typedef ObjectClass;
        expression dc;
        identifier class, data;
        @@
         static void device_class_init(ObjectClass *class, void *data)
         {
         ...
         dc->hotpluggable = true;
        +dc->user_creatable = true;
         ...
         }
      
        @@
        @@
         struct DeviceClass {
         ...
        -bool cannot_instantiate_with_device_add_yet;
        +bool user_creatable;
         ...
        }
      
        @@
        expression DC;
        @@
        (
        -!DC->cannot_instantiate_with_device_add_yet
        +DC->user_creatable
        |
        -DC->cannot_instantiate_with_device_add_yet
        +!DC->user_creatable
        )
      
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Thomas Huth <thuth@redhat.com>
      Acked-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-2-ehabkost@redhat.com>
      [ehabkost: kept "TODO remove once we're there" comment]
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e90f2a8c
  21. 25 4月, 2017 1 次提交
  22. 24 4月, 2017 1 次提交
    • C
      net: add FTGMAC100 support · bd44300d
      Cédric Le Goater 提交于
      The FTGMAC100 device is an Ethernet controller with DMA function that
      can be found on Aspeed SoCs (which include NCSI).
      
      It is fully compliant with IEEE 802.3 specification for 10/100 Mbps
      Ethernet and IEEE 802.3z specification for 1000 Mbps Ethernet and
      includes Reduced Media Independent Interface (RMII) and Reduced
      Gigabit Media Independent Interface (RGMII) interfaces. It adopts an
      AHB bus interface and integrates a link list DMA engine with direct
      M-Bus accesses for transmitting and receiving packets. It has
      independent TX/RX fifos, supports half and full duplex (1000 Mbps mode
      only supports full duplex), flow control for full duplex and
      backpressure for half duplex.
      
      The FTGMAC100 also implements IP, TCP, UDP checksum offloads and
      supports IEEE 802.1Q VLAN tag insertion and removal. It offers
      high-priority transmit queue for QoS and CoS applications
      
      This model is backed with a RealTek 8211E PHY which is the chip found
      on the AST2500 EVB. It is complete enough to satisfy two different
      Linux drivers and a U-Boot driver. Not supported features are :
      
       - IEEE 802.1Q VLAN
       - High Priority Transmit Queue
       - Wake-On-LAN functions
      
      The code is based on the Coldfire Fast Ethernet Controller model.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      bd44300d
  23. 21 4月, 2017 4 次提交