From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBxjg-000232-Dj for qemu-devel@nongnu.org; Wed, 03 Jun 2009 17:11:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBxjb-00020g-MU for qemu-devel@nongnu.org; Wed, 03 Jun 2009 17:10:59 -0400 Received: from [199.232.76.173] (port=47433 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBxjb-00020W-D5 for qemu-devel@nongnu.org; Wed, 03 Jun 2009 17:10:55 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42654) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MBxja-0001Qq-Ut for qemu-devel@nongnu.org; Wed, 03 Jun 2009 17:10:55 -0400 Message-ID: <4A26E5E9.4030906@redhat.com> Date: Wed, 03 Jun 2009 17:06:49 -0400 From: john cooper MIME-Version: 1.0 References: <4A1F6130.9070705@redhat.com> In-Reply-To: <4A1F6130.9070705@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/2] Add serial number support for virtio_blk, V4a List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: KVM list , qemu-devel@nongnu.org Cc: john.cooper@redhat.com, Rusty Russell , Christoph Hellwig [Cosmetic changes to prior version, documentation added to individual patches.] This patch allows passing of a virtio_blk drive serial number from qemu into a guest's virtio_blk driver, and provides a means to access the serial number from a guest's userspace. Equivalent functionality currently exists for IDE and SCSI, however it is not yet implemented for virtio. Scenarios exist where guest code relies on a unique drive serial number to correctly identify the machine environment in which it exists. The following patches, relative to qemu-kvm.git and 2.6.29.3 respectively, provide an equivalent mechanism for virtio_blk. Usage: With a patched qemu and guest virtio_blk driver, launch the guest with a virtio_blk drive specifying a serial number, eg: -drive ... ,if=virtio,serial=ThisSpace4Rent, ... In the guest retrieve via HDIO_GET_IDENTITY ioctl to the virtio_blk driver, (eg): # hdparm -i /dev/vda hdparm -i /dev/vda /dev/vda: Model=QEMU VIRT_BLK, FwRev=0.10.50, SerialNo=ThisSpace4Rent -john -- john.cooper@redhat.com