Re: [PATCH 05/22] virtio: add support for 64 bit features.

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

 



On Thu, 21 Mar 2013 18:59:26 +1030
Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:

> Change the u32 to a u64, and make sure to use 1ULL everywhere!
> 
> Cc: Ohad Ben-Cohen <ohad@xxxxxxxxxx>
> Cc: Brian Swetland <swetland@xxxxxxxxxx>
> Cc: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
> Cc: Pawel Moll <pawel.moll@xxxxxxx>
> Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
> ---
>  drivers/char/virtio_console.c          |    2 +-
>  drivers/lguest/lguest_device.c         |   10 +++++-----
>  drivers/remoteproc/remoteproc_virtio.c |    6 +++++-
>  drivers/s390/kvm/kvm_virtio.c          |   10 +++++-----
>  drivers/virtio/virtio.c                |   12 ++++++------
>  drivers/virtio/virtio_mmio.c           |   14 +++++++++-----
>  drivers/virtio/virtio_pci.c            |    5 ++---
>  drivers/virtio/virtio_ring.c           |    2 +-
>  include/linux/virtio.h                 |    2 +-
>  include/linux/virtio_config.h          |    8 ++++----
>  tools/virtio/linux/virtio.h            |    2 +-
>  tools/virtio/linux/virtio_config.h     |    2 +-
>  12 files changed, 41 insertions(+), 34 deletions(-)
> 

And a not-even-compiled change for virtio_ccw as well:

diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index eb0616b..2ca6dc5 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -454,8 +454,17 @@ static void virtio_ccw_finalize_features(struct virtio_device *vdev)
 	vring_transport_features(vdev);
 
 	features->index = 0;
-	features->features = cpu_to_le32(vdev->features);
-	/* Write the feature bits to the host. */
+	features->features = cpu_to_le32((u32)vdev->features);
+	/* Write the first half of the feature bits to the host. */
+	ccw->cmd_code = CCW_CMD_WRITE_FEAT;
+	ccw->flags = 0;
+	ccw->count = sizeof(*features);
+	ccw->cda = (__u32)(unsigned long)features;
+	ccw_io_helper(vcdev, ccw, VIRTIO_CCW_DOING_WRITE_FEAT);
+
+	features->index = 1;
+	features->features = cpu_to_le32(vdev->features >> 32);
+	/* Write the second half of the feature bits to the host. */
 	ccw->cmd_code = CCW_CMD_WRITE_FEAT;
 	ccw->flags = 0;
 	ccw->count = sizeof(*features);

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux