qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] SCSI Command support over VirtIO Block device
@ 2010-12-13  5:14 अनुज
  0 siblings, 0 replies; 3+ messages in thread
From: अनुज @ 2010-12-13  5:14 UTC (permalink / raw)
  To: qemu-devel, virtualization, kvm, rusty

Hi

I am trying to implement VirtIO support for a proprietary OS. And It
would be great if I am able to process SCSI commands over VirtIO Block
device.

I tried to execute INQUIRY command but the status returned is UNSUPPORTED.
If anyone provide example VirtIO SCSI Command request structure for
INQUIRY command as per VirtIO spec Appendix D would be a great help.

And also, the paragraph from VirtIO spec - 0.8.9 is confusing for me :

"Historically, devices assumed that the  fields type, ioprio and
sector reside in
a single, separate read-only buffer; the  fields errors, data_len, sense_len and
residual reside in a single, separate write-only buffer; the sense
 eld in a separate
write-only buffer of size 96 bytes, by itself; the fields errors,
data_len, sense_len
and residual in a single write-only buffer; and the status field is a
separate readonly
buffer of size 1 byte, by itself."

Here 'status field of buffer size 1 byte' is whether readonly or writeonly?

I want to know from which version of Qemu-kvm supports processing of
scsi commands over VirtIO block device as a backend.
Although I checked the Host Feature fields in which VIRTIO_BLK_F_SCSI
bit is set. I am using qemu-kvm version 0.12.3.

-- 
Anuj Aggarwal

 .''`.
: :Ⓐ :   # apt-get install hakuna-matata
`. `'`
   `-

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] SCSI Command support over VirtIO Block device
@ 2010-12-13  7:42 Stefan Hajnoczi
  2010-12-13 10:47 ` अनुज
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2010-12-13  7:42 UTC (permalink / raw)
  To: अनुज; +Cc: rusty, qemu-devel, kvm, virtualization

[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]

On Dec 13, 2010 5:14 AM, "अनुज" <anuj01@gmail.com> wrote:
>
> Hi
>
> I am trying to implement VirtIO support for a proprietary OS. And It
> would be great if I am able to process SCSI commands over VirtIO Block
> device.
>
> I tried to execute INQUIRY command but the status returned is UNSUPPORTED.
> If anyone provide example VirtIO SCSI Command request structure for
> INQUIRY command as per VirtIO spec Appendix D would be a great help.
>
> And also, the paragraph from VirtIO spec - 0.8.9 is confusing for me :
>
> "Historically, devices assumed that the  fields type, ioprio and
> sector reside in
> a single, separate read-only buffer; the  fields errors, data_len,
sense_len and
> residual reside in a single, separate write-only buffer; the sense
>  eld in a separate
> write-only buffer of size 96 bytes, by itself; the fields errors,
> data_len, sense_len
> and residual in a single write-only buffer; and the status field is a
> separate readonly
> buffer of size 1 byte, by itself."
>
> Here 'status field of buffer size 1 byte' is whether readonly or
writeonly?

Writeonly

>
> I want to know from which version of Qemu-kvm supports processing of
> scsi commands over VirtIO block device as a backend.
> Although I checked the Host Feature fields in which VIRTIO_BLK_F_SCSI
> bit is set. I am using qemu-kvm version 0.12.3.

Make sure you have a scsi-generic block device in qemu-kvm, not just a
regular file or physical block device. Open /dev/sg.

Look at hw/virtio-blk.c in qemu-kvm for host implementation details.

>
> --
> Anuj Aggarwal
>
>  .''`.
> : :Ⓐ :   # apt-get install hakuna-matata
> `. `'`
>    `-
>

[-- Attachment #2: Type: text/html, Size: 2089 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] SCSI Command support over VirtIO Block device
  2010-12-13  7:42 [Qemu-devel] SCSI Command support over VirtIO Block device Stefan Hajnoczi
@ 2010-12-13 10:47 ` अनुज
  0 siblings, 0 replies; 3+ messages in thread
From: अनुज @ 2010-12-13 10:47 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: rusty, qemu-devel, kvm, virtualization

Hi

2010/12/13 Stefan Hajnoczi <stefanha@gmail.com>:
>
> On Dec 13, 2010 5:14 AM, "अनुज" <anuj01@gmail.com> wrote:
>>
>> Hi
>>
>> I am trying to implement VirtIO support for a proprietary OS. And It
>> would be great if I am able to process SCSI commands over VirtIO Block
>> device.
>>
>> I tried to execute INQUIRY command but the status returned is UNSUPPORTED.
>> If anyone provide example VirtIO SCSI Command request structure for
>> INQUIRY command as per VirtIO spec Appendix D would be a great help.
>>
>> And also, the paragraph from VirtIO spec - 0.8.9 is confusing for me :
>>
>> "Historically, devices assumed that the  fields type, ioprio and
>> sector reside in
>> a single, separate read-only buffer; the  fields errors, data_len,
>> sense_len and
>> residual reside in a single, separate write-only buffer; the sense
>>  eld in a separate
>> write-only buffer of size 96 bytes, by itself; the fields errors,
>> data_len, sense_len
>> and residual in a single write-only buffer; and the status field is a
>> separate readonly
>> buffer of size 1 byte, by itself."
>>
>> Here 'status field of buffer size 1 byte' is whether readonly or
>> writeonly?
>
> Writeonly
>
>>
>> I want to know from which version of Qemu-kvm supports processing of
>> scsi commands over VirtIO block device as a backend.
>> Although I checked the Host Feature fields in which VIRTIO_BLK_F_SCSI
>> bit is set. I am using qemu-kvm version 0.12.3.
>
> Make sure you have a scsi-generic block device in qemu-kvm, not just a
> regular file or physical block device. Open /dev/sg.

Yes, I have given a file name instead of /dev/sg0. Now it's working as a charm.

That means I can use physical disk as a VirtIO disk in guest OS. right?
So it's kind of passthrough for a physical disk. But how can I
distinguish among different physical disks attached to the host.

is /dev/sg is different for each physical disk?

However I thought VirtIO scsi device operations are for virtual disk
(a regular file) also.

>
> Look at hw/virtio-blk.c in qemu-kvm for host implementation details.
>
>>
>> --
>
>> Anuj Aggarwal
>>
>>  .''`.
>> : :Ⓐ :   # apt-get install hakuna-matata
>> `. `'`
>>    `-
>>
>

Thanks for your help.


Regards
-- 
Anuj Aggarwal

 .''`.
: :Ⓐ :   # apt-get install hakuna-matata
`. `'`
   `-

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-13 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13  7:42 [Qemu-devel] SCSI Command support over VirtIO Block device Stefan Hajnoczi
2010-12-13 10:47 ` अनुज
  -- strict thread matches above, loose matches on Subject: below --
2010-12-13  5:14 अनुज

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).