From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, Nicholas Bellinger <nab@linux-iscsi.org>,
virtualization@lists.linux-foundation.org,
target-devel@vger.kernel.org,
Stefan Hajnoczi <stefanha@redhat.com>,
Asias He <asias@redhat.com>
Subject: Re: [Qemu-devel] [PATCH V2 WIP 0/2] vhost-scsi: new device supporting the tcm_vhost Linux kernel module
Date: Thu, 14 Mar 2013 12:21:19 +0200 [thread overview]
Message-ID: <20130314102119.GA16859@redhat.com> (raw)
In-Reply-To: <51419FB8.6010805@redhat.com>
On Thu, Mar 14, 2013 at 11:00:24AM +0100, Paolo Bonzini wrote:
>
> >> --------------- 8 ---------------> seabios patch:
> >> diff --git a/src/virtio-scsi.c b/src/virtio-scsi.c
> >> index 879ddfb..4de1255 100644
> >> --- a/src/virtio-scsi.c
> >> +++ b/src/virtio-scsi.c
> >> @@ -147,6 +147,9 @@ init_virtio_scsi(struct pci_device *pci)
> >> goto fail;
> >> }
> >>
> >> + vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
> >> + VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
> >> +
> >> int i, tot;
> >> for (tot = 0, i = 0; i < 256; i++)
> >> tot += virtio_scsi_scan_target(pci, ioaddr, vq, i);
> >> @@ -154,8 +157,6 @@ init_virtio_scsi(struct pci_device *pci)
> >> if (!tot)
> >> goto fail;
> >>
> >> - vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE |
> >> - VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK);
> >> return;
> >>
> >> fail:
>
> ACK.
>
> >> 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
> >
> > I see, the padding creates the problem?
>
> Looks like it does for req_cmd (which has length 51 and is padded to
> 56). QEMU incorrectly relies on the framing.
That's bad though. Let's fix this in qemu.
> Both of these are SeaBIOS bugs, please do submit the patch.
>
> Paolo
Right but in parallel we can use the old BIOS to
make sure qemu does not rely on framing.
--
MST
next prev parent reply other threads:[~2013-03-14 10:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 6:29 [Qemu-devel] [PATCH V2 WIP 0/2] vhost-scsi: new device supporting the tcm_vhost Linux kernel module Asias He
2013-03-12 6:29 ` [Qemu-devel] [PATCH V2 WIP 1/2] virtio-scsi: create VirtIOSCSICommon Asias He
2013-03-12 6:29 ` [Qemu-devel] [PATCH V2 WIP 2/2] vhost-scsi: new device supporting the tcm_vhost Linux kernel module Asias He
2013-03-12 8:20 ` Stefan Hajnoczi
2013-03-13 2:49 ` Asias He
2013-03-14 4:25 ` [Qemu-devel] [PATCH V2 WIP 0/2] " Asias He
2013-03-14 9:25 ` Asias He
2013-03-14 9:46 ` Michael S. Tsirkin
2013-03-14 10:00 ` Paolo Bonzini
2013-03-14 10:21 ` Michael S. Tsirkin [this message]
2013-03-15 0:58 ` Asias He
2013-03-15 0:55 ` 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=20130314102119.GA16859@redhat.com \
--to=mst@redhat.com \
--cc=asias@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).