From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV0jw-0006VR-P9 for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:46:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV0jr-0006Rl-8v for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:46:15 -0500 Received: from [199.232.76.173] (port=46143 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV0jr-0006Ri-1D for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:46:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40262) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV0jq-0001xs-FW for qemu-devel@nongnu.org; Wed, 13 Jan 2010 05:46:10 -0500 Date: Wed, 13 Jan 2010 12:43:05 +0200 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCHv7 3/3] virtio: add features as qdev properties Message-ID: <20100113104305.GA5077@redhat.com> References: <20100110115253.GD27013@redhat.com> <20100112180927.GA1510@lst.de> <20100112195055.GC3170@redhat.com> <20100112220633.GA10029@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100112220633.GA10029@lst.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Rusty Russell , qemu-devel@nongnu.org, kraxel@redhat.com On Tue, Jan 12, 2010 at 11:06:33PM +0100, Christoph Hellwig wrote: > On Tue, Jan 12, 2010 at 09:50:55PM +0200, Michael S. Tsirkin wrote: > > So the issue is that wrong block size (0xffffffff) was passed > > to guest. Would it make sense to add some sanity checking in virtio-blk > > to make it not crash but fail in probe? Which block size values > > are sane? > > Yes, I'll cook up a patch. Basically powers of two up from 512 bytes > are theoretically sane. In practice I doubt we'll ever see anything > other than 512 or 4095 bytes. I also noticed that 0x8000 causes a crash. You can play with other sizes and see what happens. -- MST