Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Q qemu
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TheBigBang
  • qemu
  • Repository
Switch branch/tag
  • qemu
  • hw
  • virtio
  • vhost.c
Find file BlameHistoryPermalink
  • Maxime Coquelin's avatar
    vhost: restore avail index from vring used index on disconnection · 2ae39a11
    Maxime Coquelin authored Nov 16, 2017
    vhost_virtqueue_stop() gets avail index value from the backend,
    except if the backend is not responding.
    
    It happens when the backend crashes, and in this case, internal
    state of the virtio queue is inconsistent, making packets
    to corrupt the vring state.
    
    With a Linux guest, it results in following error message on
    backend reconnection:
    
    [   22.444905] virtio_net virtio0: output.0:id 0 is not a head!
    [   22.446746] net enp0s3: Unexpected TXQ (0) queue failure: -5
    [   22.476360] net enp0s3: Unexpected TXQ (0) queue failure: -5
    
    Fixes: 283e2c2a
    
     ("net: virtio-net discards TX data after link down")
    Cc: qemu-stable@nongnu.org
    Signed-off-by: default avatarMaxime Coquelin <maxime.coquelin@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    2ae39a11