qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support
Date: Fri, 20 Apr 2012 09:46:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Il 20/04/2012 09:00, Nicholas A. Bellinger ha scritto:
> On Thu, 2012-04-19 at 19:20 -0500, Anthony Liguori wrote:
>> TCM runs in the absolute most privileged context possible.  When you're 
>> dealing 
>> with extremely hostile input, it's pretty obvious that you want to run it in 
>> the 
>> lowest privileged context as humanly possible.
> 
> The argument that a SCSI target for virtual machines is so complex that
> it can't possibly be implemented properly in the kernel is a bunch of
> non-sense.

I agree.  A VM is not any more hostile than another iSCSI initiator.
lio _always_ must assume to operates in a hostile environment.

> Being able to identify which virtio-scsi guests can actually connect via
> vhost-scsi into individual tcm_vhost endpoints is step one here.

Yes, the ACL system in lio is quite good for this.

> Well, using a raw device from userspace there is still going to be a
> SG-IO memcpy going on here between user <-> kernel in current code,
> yes..?
> 
> Being able to deliver interrupts and SGL memory directly into tcm_vhost
> cmwq kernel context for backend device execution w/o QEMU userspace
> involvement or extra SGL memcpy is the perceived performance benefit
> here.
> 
> How much benefit will this actually provide across single port and multi
> port tcm_vhost LUNs into a single guest..?  That still remains to be
> demonstrated with performance+throughput benchmarks..

Yes, this is the key.

The problems I have with vhost-scsi are, from easiest to hardest:

- completely different configuration mechanism with respect to the
in-QEMU target (fix: need to integrate configfs into scsi-{disk,generic}).

- no support for migration (there can be pending SCSI requests at
migration time, that need to be restarted on the destination)

- no support for non-raw images (fix: use NBD on a Unix socket? perhaps
add an NBD backend to lio)

- cannot migrate from lio-target to QEMU-target and vice versa.

The first three are definitely fixable.

> In order for QEMU userspace to support this, Linux would need to expose
> a method to userspace for issuing DIF protected CDBs.  This userspace
> API currently does not exist AFAIK, so a kernel-level approach is the
> currently the only option when it comes to supporting end-to-end block
> protection information originating from within Linux guests.

I think it would be worthwhile to have this in userspace too.

> (Note this is going to involve a virtio-scsi spec rev as well)

Yes.  By the way, another possible modification could be to tell the
guest what is its (initiator) WWPN.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]