All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Asias He <asias@redhat.com>
Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	seabios@seabios.org, qemu-devel@nongnu.org,
	virtualization@lists.linux-foundation.org,
	Kevin O'Connor <kevin@koconnor.net>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd}
Date: Fri, 15 Mar 2013 09:15:10 +0100	[thread overview]
Message-ID: <5142D88E.1080405@redhat.com> (raw)
In-Reply-To: <1363311916-23121-3-git-send-email-asias@redhat.com>

Il 15/03/2013 02:45, Asias He ha scritto:
> Device needs the exact size of these data structure. Prevent padding.
> 
> This fixes guest hang when booting seabios + tcm_vhost.
> 
> Signed-off-by: Asias He <asias@redhat.com>
> ---
>  src/virtio-scsi.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/virtio-scsi.h b/src/virtio-scsi.h
> index bbfbf30..96c3701 100644
> --- a/src/virtio-scsi.h
> +++ b/src/virtio-scsi.h
> @@ -26,7 +26,7 @@ struct virtio_scsi_req_cmd {
>      u8 prio;
>      u8 crn;
>      char cdb[VIRTIO_SCSI_CDB_SIZE];
> -};
> +} __attribute__((packed));
>  
>  /* This is the first element of the "in" scatter-gather list. */
>  struct virtio_scsi_resp_cmd {
> @@ -36,7 +36,7 @@ struct virtio_scsi_resp_cmd {
>      u8 status;
>      u8 response;
>      u8 sense[VIRTIO_SCSI_SENSE_SIZE];
> -};
> +} __attribute__((packed));
>  
>  #define VIRTIO_SCSI_S_OK            0
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Asias He <asias@redhat.com>
Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	seabios@seabios.org, qemu-devel@nongnu.org,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	virtualization@lists.linux-foundation.org,
	Kevin O'Connor <kevin@koconnor.net>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd}
Date: Fri, 15 Mar 2013 09:15:10 +0100	[thread overview]
Message-ID: <5142D88E.1080405@redhat.com> (raw)
In-Reply-To: <1363311916-23121-3-git-send-email-asias@redhat.com>

Il 15/03/2013 02:45, Asias He ha scritto:
> Device needs the exact size of these data structure. Prevent padding.
> 
> This fixes guest hang when booting seabios + tcm_vhost.
> 
> Signed-off-by: Asias He <asias@redhat.com>
> ---
>  src/virtio-scsi.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/virtio-scsi.h b/src/virtio-scsi.h
> index bbfbf30..96c3701 100644
> --- a/src/virtio-scsi.h
> +++ b/src/virtio-scsi.h
> @@ -26,7 +26,7 @@ struct virtio_scsi_req_cmd {
>      u8 prio;
>      u8 crn;
>      char cdb[VIRTIO_SCSI_CDB_SIZE];
> -};
> +} __attribute__((packed));
>  
>  /* This is the first element of the "in" scatter-gather list. */
>  struct virtio_scsi_resp_cmd {
> @@ -36,7 +36,7 @@ struct virtio_scsi_resp_cmd {
>      u8 status;
>      u8 response;
>      u8 sense[VIRTIO_SCSI_SENSE_SIZE];
> -};
> +} __attribute__((packed));
>  
>  #define VIRTIO_SCSI_S_OK            0
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-03-15  8:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  1:45 [PATCH 0/2] Fix booting tcm_vhost + seabios Asias He
2013-03-15  1:45 ` [Qemu-devel] " Asias He
2013-03-15  1:45 ` [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning Asias He
2013-03-15  1:45   ` [Qemu-devel] " Asias He
2013-03-17  9:16   ` Michael S. Tsirkin
2013-03-17  9:16     ` [Qemu-devel] " Michael S. Tsirkin
2013-03-15  1:45 ` [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} Asias He
2013-03-15  1:45   ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd} Asias He
2013-03-15  8:15   ` Paolo Bonzini [this message]
2013-03-15  8:15     ` Paolo Bonzini
2013-03-17  9:16   ` [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd} Michael S. Tsirkin
2013-03-17  9:16     ` [Qemu-devel] [PATCH 2/2] virtio-scsi: Pack struct virtio_scsi_{req_cmd, resp_cmd} Michael S. Tsirkin
2013-03-17 14:28 ` [PATCH 0/2] Fix booting tcm_vhost + seabios Kevin O'Connor
2013-03-17 14:28 ` Kevin O'Connor
2013-03-17 14:28   ` [Qemu-devel] " Kevin O'Connor
2013-03-18 21:26 ` Nicholas A. Bellinger
2013-03-18 21:26   ` [Qemu-devel] " Nicholas A. Bellinger
2013-03-19  0:58   ` Asias He
2013-03-19  0:58     ` [Qemu-devel] " Asias He

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=5142D88E.1080405@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=asias@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=stefanha@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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.