Skip to content
Snippets Groups Projects
  1. May 17, 2017
    • Greg Kurz's avatar
      virtio: allow broken device to notify guest · 66453cff
      Greg Kurz authored
      
      According to section 2.1.2 of the virtio-1 specification:
      
      "The device SHOULD set DEVICE_NEEDS_RESET when it enters an error state that
      a reset is needed. If DRIVER_OK is set, after it sets DEVICE_NEEDS_RESET,
      the device MUST send a device configuration change notification to the
      driver."
      
      Commit "f5ed3663 virtio: stop virtqueue processing if device is broken"
      introduced a virtio_error() call that just does that:
      
      - internally mark the device as broken
      - set the DEVICE_NEEDS_RESET bit in the status
      - send a configuration change notification
      
      Unfortunately, virtio_notify_vector(), called by virtio_notify_config(),
      returns right away when the device is marked as broken and the notification
      isn't sent in this case.
      
      The spec doesn't say whether a broken device can send notifications
      in other situations or not. But since the driver isn't supposed to do
      anything but to reset the device, it makes sense to keep the check in
      virtio_notify_config().
      
      Marking the device as broken AFTER the configuration change notification was
      sent is enough to fix the issue.
      
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      66453cff
    • Marcel Apfelbaum's avatar
      Revert "hw/pci: disable pci-bridge's shpc by default" · 2fa35662
      Marcel Apfelbaum authored
      
      This reverts commit dc0ae767.
      
      Disabling the shpc controller has an undesired side effect.
      The PCI bridge remains with no attached devices at boot time,
      and the guest operating systems do not allocate any resources
      for it, leaving the bridge unusable. Note that the behaviour
      is dictated by the pci bridge specification.
      
      Revert the commit and leave the shpc controller even if is not
      actually used by any architecture. Slot 0 remains unusable at boot time.
      
      Keep shpc off for QEMU 2.9 machines.
      
      Signed-off-by: default avatarMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      2fa35662
  2. May 10, 2017
  3. May 09, 2017
  4. May 08, 2017
Loading