qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/15] virtio-scsi: Add virtio-scsi stub device


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 11/15] virtio-scsi: Add virtio-scsi stub device
Date: Fri, 10 Feb 2012 12:41:25 +0000

On Mon, Jan 16, 2012 at 4:30 PM, Paolo Bonzini <address@hidden> wrote:
> +static void virtio_scsi_get_config(VirtIODevice *vdev,
> +                                   uint8_t *config)
> +{
> +    VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config;
> +    VirtIOSCSI *s = (VirtIOSCSI *)vdev;
> +
> +    stl_raw(&scsiconf->num_queues, s->conf->num_queues);
> +    stl_raw(&scsiconf->seg_max, 128 - 2);
> +    stl_raw(&scsiconf->max_sectors, s->conf->max_sectors);
> +    stl_raw(&scsiconf->cmd_per_lun, s->conf->cmd_per_lun);
> +    stl_raw(&scsiconf->event_info_size, sizeof(VirtIOSCSIEvent));
> +    stl_raw(&scsiconf->sense_size, s->sense_size);
> +    stl_raw(&scsiconf->cdb_size, s->cdb_size);
> +    stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> +    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);

At this early stage we still have the option of designing the device
to be little- or big-endian.  I'm in favour of a fixed endianness even
though existing virtio devices tend to use guest-endian.

What do you think?

Stefan



reply via email to

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