Re: [RFCv2 5/7] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-03-17 Thread Nicholas A. Bellinger
On Mon, 2014-03-17 at 12:02 +0100, Paolo Bonzini wrote: > Il 17/03/2014 06:32, Nicholas A. Bellinger ha scritto: > > + if (vq->iov[0].iov_len == sizeof(v_req_pi)) { > > + req = (unsigned char *)&v_req_pi; > > + target = &v_req_pi.lun[1]; > > +

Re: [RFCv2 5/7] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-03-17 Thread Paolo Bonzini
Il 17/03/2014 06:32, Nicholas A. Bellinger ha scritto: > + if (vq->iov[0].iov_len == sizeof(v_req_pi)) { > + req = (unsigned char *)&v_req_pi; > + target = &v_req_pi.lun[1]; > + req_size = sizeof(v_req_pi); > +

[RFCv2 5/7] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num. Also update tcm_vhost_submission_work() to pass the pre-allocated cmd->tvc_pro