From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRdTQ-0003yK-Rk for qemu-devel@nongnu.org; Wed, 01 Jun 2011 00:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRdTP-0005wR-Q7 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 00:56:04 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:38532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRdTP-0005wN-MR for qemu-devel@nongnu.org; Wed, 01 Jun 2011 00:56:03 -0400 Received: by gwb19 with SMTP id 19so2475667gwb.4 for ; Tue, 31 May 2011 21:56:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 1 Jun 2011 05:56:02 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] Question on virtio disk maximum index and maximum partition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Liu Cc: qemu-devel@nongnu.org On Wed, Jun 1, 2011 at 2:06 AM, Wei Liu wrote: > I'm programming for virtio disk support in Xen tool stack. I would > like to know the limitation of virtio disk. I'm interested what you are implementing - a virtio-blk backend for Xen (which would basically mean vhost-blk)? > That is, what's the maximum number of disks supported through virtio > bus, and what's the maximum number of partitions supported per disk. virtio-blk as used by KVM is exposed as a virtio PCI adapter. There is a 1:1 mapping between virtio-blk, PCI adapters, and block devices being presented by QEMU: 1 virtio-blk device in guest == 1 virtio-pci adapter in guest == 1 block device in QEMU The maximum number is really limited by the PCI bus, not virtio. In terms of coding, you should try not to impose a hard limit at all. Partitions are not at the virtio-blk level. The guest operating system will see the virtio-blk disk and scan its partition table to determine which partitions are available. The limit then depends on the partitioning scheme that you use (legacy boot record, GPT, etc). > If I'm posting to the wrong list, please point me the right direction. You might also be interested in for general virtio discussion. Stefan