All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Cc: famz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI
Date: Thu, 5 Apr 2018 17:56:25 +0200	[thread overview]
Message-ID: <9bb77420-4a76-6a1b-3542-4205fcc8334b@redhat.com> (raw)
In-Reply-To: <20180327211451.14647-1-danielhb@linux.vnet.ibm.com>

On 27/03/2018 23:14, Daniel Henrique Barboza wrote:
>          /* We get here only for BYTCHK == 0x01 and only for scsi-block.
>           * As far as DMA is concerned, we can treat it the same as a write;
>           * scsi_block_do_sgio will send VERIFY commands.
> +         *
> +         * For scsi versions 2 and older, the BYTCHK isn't related
> +         * to VRPROTECT (in fact, there is no VRPROTECT). Skip
> +         * this check in these versions.
>           */
> -        if (r->req.cmd.buf[1] & 0xe0) {
> +        if ((r->req.cmd.buf[1] & 0xe0) && (s->qdev.scsi_version > 2)) {
>              goto illegal_request;
>          }

This also has to check for "s->qdev.scsi_version != -1" so that the
behavior of emulated SCSI isn't changed (they claim SPC-3).  I made this
change and queued the patch.

Paolo

  parent reply	other threads:[~2018-04-05 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 21:14 [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI Daniel Henrique Barboza
2018-03-28  1:38 ` Fam Zheng
2018-04-05 15:56 ` Paolo Bonzini [this message]
2018-04-05 16:09   ` Daniel Henrique Barboza
2018-04-05 17: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=9bb77420-4a76-6a1b-3542-4205fcc8334b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=danielhb@linux.vnet.ibm.com \
    --cc=famz@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.