All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p
Date: Wed, 17 Sep 2014 13:47:51 +0300	[thread overview]
Message-ID: <20140917104751.GB12253@redhat.com> (raw)
In-Reply-To: <1410950473-6226-1-git-send-email-pbonzini@redhat.com>

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 <pbonzini@redhat.com>
> ---
>  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

  reply	other threads:[~2014-09-17 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 10:41 [Qemu-devel] [PATCH] vhost-scsi: use virtio_ldl_p Paolo Bonzini
2014-09-17 10:47 ` Michael S. Tsirkin [this message]
2014-09-17 11:03   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140917104751.GB12253@redhat.com \
    --to=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.