[ipxe-devel] [PATCH 2/4] [virtio] Remove virtio 1.0 workaround for old QEMU

Stefan Hajnoczi stefanha at redhat.com
Mon Dec 19 14:54:37 UTC 2016


On Fri, Dec 16, 2016 at 03:30:03PM +0100, Ladi Prosek wrote:
> QEMU properly reverts queue_enable to 0 on device reset as of:
> 
>   commit 75fd6f13af8513f1e14add754549141e415f8704
>   Author: Gerd Hoffmann <kraxel at redhat.com>
>   Date:   Thu Jan 28 16:08:07 2016 +0100
> 
>   virtio-pci: call pci reset variant when guest requests reset.

What about new iPXE on old QEMU?

> Signed-off-by: Ladi Prosek <lprosek at redhat.com>
> ---
>  src/drivers/bus/virtio-pci.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/drivers/bus/virtio-pci.c b/src/drivers/bus/virtio-pci.c
> index 1fcf9ba..89c4512 100644
> --- a/src/drivers/bus/virtio-pci.c
> +++ b/src/drivers/bus/virtio-pci.c
> @@ -347,10 +347,7 @@ int vpm_find_vqs(struct virtio_pci_modern_device *vdev,
>  
>          /* Check if queue is either not available or already active. */
>          size = vpm_ioread16(vdev, &vdev->common, COMMON_OFFSET(queue_size));
> -        /* QEMU has a bug where queues don't revert to inactive on device
> -         * reset. Skip checking the queue_enable field until it is fixed.
> -         */
> -        if (!size /*|| vpm_ioread16(vdev, &vdev->common.queue_enable)*/)
> +        if (!size || vpm_ioread16(vdev, &vdev->common, COMMON_OFFSET(queue_enable)))
>              return -ENOENT;
>  
>          if (size & (size - 1)) {
> -- 
> 2.7.4
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20161219/b1d3cc91/attachment.sig>


More information about the ipxe-devel mailing list