All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Eric Farman <farman@linux.vnet.ibm.com>,
	Fam Zheng <famz@redhat.com>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 0/5] Enable virtio-scsi boot from /dev/sgX
Date: Mon, 8 May 2017 09:00:41 +0200	[thread overview]
Message-ID: <5d72d4cc-da61-9bbf-3f4c-61fd1c799cd8@de.ibm.com> (raw)
In-Reply-To: <eecd3b1f-a554-b64e-30ba-a45b053f5260@redhat.com>

On 05/06/2017 10:24 AM, Paolo Bonzini wrote:
> 
> 
> On 05/05/2017 18:12, Eric Farman wrote:
>>
>>
>> On 05/05/2017 11:13 AM, Paolo Bonzini wrote:
>>>
>>>
>>> On 05/05/2017 17:03, Eric Farman wrote:
>>>> We get a value of x3fffff when sending that to a scsi-disk from bios
>>>> code.  That's fully emulated though, in scsi_disk_emulate_inquiry.  And
>>>> that's the scenario that already works.
>>>>
>>>> While there is indeed code in hw/scsi/scsi-generic.c to wire that in,
>>>> that only happens after the I/O goes to the device itself.  The Block
>>>> Limits page isn't supported [1] and thus it gets rejected with "invalid
>>>> field in cdb".  We never get to that fixup code you reference, since the
>>>> returned len is zero.
>>>>
>>>> Should I be refactoring this code to always patch in that block limit
>>>> regardless of a response from the host/device?  (That is, when page xb0
>>>> isn't supported by the hw.)
>>>
>>> What is thec value you get?
>>
>> x140000 bytes when using /dev/sg0 (xa00 sectors when using /dev/sda).
>>
>>>  Is there a sensible default value
>>> that you can use when page 0xb0 isn't supported by the hardware?
>>
>> I was setting max_sectors to x800 with good success, which was the
>> power-of-2 floor that BLKSECTGET gave us.  That kept us within the
>> limits of the host biovec code.  But it's a long way from the
>> virtio-scsi value of xFFFF when max_sectors isn't specified, so don't
>> know what side effects that may cause.
> 
> It's just slower, but 0x800 is already a megabyte worth of data so it's
> not going to be that much slower.
> 
> Paolo
> 

Eric, maybe that would be a safe variant. The bios boot code is not
performance optimized anyway. Lets just always use a maximum size that 
will always work.

  reply	other threads:[~2017-05-08  7:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 14:46 [Qemu-devel] [RFC PATCH v1 0/5] Enable virtio-scsi boot from /dev/sgX Eric Farman
2017-04-26 14:46 ` [Qemu-devel] [RFC PATCH v1 1/5] hw/scsi: Override the max_sectors value for virtio-scsi Eric Farman
2017-05-05  7:39   ` Paolo Bonzini
2017-05-05  7:50   ` Christian Borntraeger
2017-04-26 14:46 ` [Qemu-devel] [RFC PATCH v1 2/5] pc-bios/s390-ccw: Remove duplicate blk_factor adjustment Eric Farman
2017-05-05  7:10   ` Christian Borntraeger
2017-04-26 14:46 ` [Qemu-devel] [RFC PATCH v1 3/5] pc-bios/s390-ccw: Move SCSI block factor to outer read Eric Farman
2017-04-26 14:46 ` [Qemu-devel] [RFC PATCH v1 4/5] pc-bios/s390-ccw: Break up virtio-scsi read into multiples Eric Farman
2017-04-26 15:17   ` Eric Blake
2017-04-26 15:24     ` Eric Farman
2017-04-26 16:00       ` Eric Farman
2017-04-26 15:47     ` Cornelia Huck
2017-04-26 14:46 ` [Qemu-devel] [RFC PATCH v1 5/5] pc-bios/s390-ccw.img: rebuild image Eric Farman
2017-04-26 15:48 ` [Qemu-devel] [RFC PATCH v1 0/5] Enable virtio-scsi boot from /dev/sgX Christian Borntraeger
2017-04-26 16:13   ` Eric Farman
2017-05-05  7:41 ` Fam Zheng
2017-05-05 15:03   ` Eric Farman
2017-05-05 15:13     ` Paolo Bonzini
2017-05-05 16:12       ` Eric Farman
2017-05-06  8:24         ` Paolo Bonzini
2017-05-08  7:00           ` Christian Borntraeger [this message]
2017-05-08 15:00             ` Eric Farman

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=5d72d4cc-da61-9bbf-3f4c-61fd1c799cd8@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=cornelia.huck@de.ibm.com \
    --cc=famz@redhat.com \
    --cc=farman@linux.vnet.ibm.com \
    --cc=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.