From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUosw-0001we-CR for qemu-devel@nongnu.org; Tue, 12 Jan 2010 17:06:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUosr-0001vG-MV for qemu-devel@nongnu.org; Tue, 12 Jan 2010 17:06:45 -0500 Received: from [199.232.76.173] (port=36562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUosr-0001v9-IW for qemu-devel@nongnu.org; Tue, 12 Jan 2010 17:06:41 -0500 Received: from verein.lst.de ([213.95.11.210]:36299) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1NUosq-0005mh-Q3 for qemu-devel@nongnu.org; Tue, 12 Jan 2010 17:06:41 -0500 Date: Tue, 12 Jan 2010 23:06:33 +0100 From: Christoph Hellwig Subject: Re: [Qemu-devel] [PATCHv7 3/3] virtio: add features as qdev properties Message-ID: <20100112220633.GA10029@lst.de> References: <20100110115253.GD27013@redhat.com> <20100112180927.GA1510@lst.de> <20100112195055.GC3170@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100112195055.GC3170@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Rusty Russell , kraxel@redhat.com, Christoph Hellwig , qemu-devel@nongnu.org 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.