qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 06/10] pc-bios/s390-ccw: Add code for virtio


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v3 06/10] pc-bios/s390-ccw: Add code for virtio feature negotiation
Date: Tue, 11 Jul 2017 10:47:24 +0200

On Mon, 10 Jul 2017 17:32:36 +0200
Thomas Huth <address@hidden> wrote:

> The upcoming virtio-net driver needs to negotiate some features,
> so we need the possibility to do this in the core virtio code.
> 
> Signed-off-by: Thomas Huth <address@hidden>
> ---
>  pc-bios/s390-ccw/s390-ccw.h      |  2 ++
>  pc-bios/s390-ccw/virtio-blkdev.c |  3 ++-
>  pc-bios/s390-ccw/virtio.c        | 25 ++++++++++++++++++-------
>  pc-bios/s390-ccw/virtio.h        |  2 +-
>  4 files changed, 23 insertions(+), 9 deletions(-)
> 

> diff --git a/pc-bios/s390-ccw/virtio-blkdev.c 
> b/pc-bios/s390-ccw/virtio-blkdev.c
> index 6cb77bc..ed4026f 100644
> --- a/pc-bios/s390-ccw/virtio-blkdev.c
> +++ b/pc-bios/s390-ccw/virtio-blkdev.c
> @@ -266,9 +266,10 @@ uint64_t virtio_get_blocks(void)
>  void virtio_blk_setup_device(SubChannelId schid)
>  {
>      VDev *vdev = virtio_get_device();
> +    uint32_t guestfeats[2] = { 0, 0 };
>  
>      vdev->schid = schid;
> -    virtio_setup_ccw(vdev);
> +    virtio_setup_ccw(vdev, guestfeats);

I'd tack the feature bits onto the VDev instead. Even if you're not
doing anything fancy right now, it makes validating the feature bits
more straightforward.

>  
>      switch (vdev->senseid.cu_model) {
>      case VIRTIO_ID_BLOCK:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]