[SLOF] [PATCH v1 22/27] virtio: change signature of virtio_set_qaddr
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Thu Jan 14 22:26:02 AEDT 2016
Alexey Kardashevskiy <aik at ozlabs.ru> writes:
> On 01/13/2016 10:17 PM, Nikunj A Dadhania wrote:
>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>
>
> This should go to 15/27.
Sure I can squash that, I had purposely kept this separate as there was
change in the signature. while 15/26 does the virtio 1.0 changes.
>
>
>> ---
>> lib/libvirtio/virtio.c | 4 ++--
>> lib/libvirtio/virtio.h | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/libvirtio/virtio.c b/lib/libvirtio/virtio.c
>> index e1ab97f..e073c8b 100644
>> --- a/lib/libvirtio/virtio.c
>> +++ b/lib/libvirtio/virtio.c
>> @@ -358,7 +358,7 @@ void virtio_queue_notify(struct virtio_device *dev, int queue)
>> /**
>> * Set queue address
>> */
>> -void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr)
>> +void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned long qaddr)
>> {
>> if (dev->type != VIRTIO_TYPE_PCI)
>> return;
>> @@ -375,7 +375,7 @@ void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr)
>> virtio_write64(dev->common.addr + offset_of(struct virtio_dev_common, q_used), q_used);
>> ci_write_16(dev->common.addr + offset_of(struct virtio_dev_common, q_enable), cpu_to_le16(1));
>> } else {
>> - uint32_t val = qaddr;
>> + uint32_t val = (uint32_t)qaddr;
>> val = val >> 12;
>> ci_write_16(dev->base+VIRTIOHDR_QUEUE_SELECT,
>> cpu_to_le16(queue));
>> diff --git a/lib/libvirtio/virtio.h b/lib/libvirtio/virtio.h
>> index afa3c9c..f5f6a15 100644
>> --- a/lib/libvirtio/virtio.h
>> +++ b/lib/libvirtio/virtio.h
>> @@ -122,7 +122,7 @@ extern void virtio_setup_device(struct virtio_device *dev);
>> extern void virtio_reset_device(struct virtio_device *dev);
>> extern void virtio_queue_notify(struct virtio_device *dev, int queue);
>> extern void virtio_set_status(struct virtio_device *dev, int status);
>> -extern void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned int qaddr);
>> +extern void virtio_set_qaddr(struct virtio_device *dev, int queue, unsigned long qaddr);
>> extern void virtio_set_guest_features(struct virtio_device *dev, int features);
>> extern void virtio_get_host_features(struct virtio_device *dev, int *features);
>> extern void virtio_set_guest_features_long(struct virtio_device *dev, uint64_t features);
>>
>
>
> --
> Alexey
More information about the SLOF
mailing list