From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUCj1-0003CP-Im for qemu-devel@nongnu.org; Wed, 17 Sep 2014 06:44:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUCiv-0001ey-EK for qemu-devel@nongnu.org; Wed, 17 Sep 2014 06:44:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUCiv-0001dk-74 for qemu-devel@nongnu.org; Wed, 17 Sep 2014 06:44:33 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8HAiShW016970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 17 Sep 2014 06:44:29 -0400 Date: Wed, 17 Sep 2014 13:47:51 +0300 From: "Michael S. Tsirkin" Message-ID: <20140917104751.GB12253@redhat.com> References: <1410950473-6226-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1410950473-6226-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Wed, Sep 17, 2014 at 12:41:13PM +0200, Paolo Bonzini wrote: I'm guessing you are fixing cross-endian configs? Commit log should mention this? > Signed-off-by: Paolo Bonzini > --- > hw/scsi/vhost-scsi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c > index 7146e0e..308b393 100644 > --- a/hw/scsi/vhost-scsi.c > +++ b/hw/scsi/vhost-scsi.c > @@ -23,6 +23,7 @@ > #include "hw/virtio/vhost.h" > #include "hw/virtio/virtio-scsi.h" > #include "hw/virtio/virtio-bus.h" > +#include "hw/virtio/virtio-access.h" > > /* Features supported by host kernel. */ > static const int kernel_feature_bits[] = { > @@ -163,8 +164,8 @@ static void vhost_scsi_set_config(VirtIODevice *vdev, > VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config; > VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev); > > - if ((uint32_t) ldl_p(&scsiconf->sense_size) != vs->sense_size || > - (uint32_t) ldl_p(&scsiconf->cdb_size) != vs->cdb_size) { > + if ((uint32_t) virtio_ldl_p(vdev, &scsiconf->sense_size) != vs->sense_size || > + (uint32_t) virtio_ldl_p(vdev, &scsiconf->cdb_size) != vs->cdb_size) { > error_report("vhost-scsi does not support changing the sense data and CDB sizes"); > exit(1); > } > -- > 1.8.3.1