[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170116172656.GB11780@lemon>
Date: Tue, 17 Jan 2017 01:26:56 +0800
From: Fam Zheng <famz@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
stefanha@...hat.com, virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH 2/2] virtio_scsi: Implement fc_host
On Mon, 01/16 17:45, Paolo Bonzini wrote:
>
>
> On 16/01/2017 17:04, Fam Zheng wrote:
> > + node_name = virtio_cread64(vdev,
> > + offsetof(struct virtio_scsi_config, primary_wwnn));
> > + port_name = virtio_cread64(vdev,
> > + offsetof(struct virtio_scsi_config, primary_wwpn));
> > + } else {
> > + node_name = virtio_cread64(vdev,
> > + offsetof(struct virtio_scsi_config, secondary_wwnn));
> > + port_name = virtio_cread64(vdev,
> > + offsetof(struct virtio_scsi_config, secondary_wwpn));
>
> Is the endianness correct for big-endian host here?
I think so. The fc_host sysfs uses u64 to represent port_name and node_name,
this patch does the same, so using virtio_* helpers for these fields should
handle the endianness correctly.
Maybe we should use u64 in struct virtio_scsi_config as well?
Fam
Powered by blists - more mailing lists