From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Noo4S-0000VO-Vk for qemu-devel@nongnu.org; Mon, 08 Mar 2010 20:17:17 -0500 Received: from [199.232.76.173] (port=51288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Noo4S-0000VC-M5 for qemu-devel@nongnu.org; Mon, 08 Mar 2010 20:17:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Noo4Q-0005Ny-CQ for qemu-devel@nongnu.org; Mon, 08 Mar 2010 20:17:16 -0500 Received: from e6.ny.us.ibm.com ([32.97.182.146]:33040) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Noo4P-0005MQ-TJ for qemu-devel@nongnu.org; Mon, 08 Mar 2010 20:17:14 -0500 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e6.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o291E4To016309 for ; Mon, 8 Mar 2010 20:14:04 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o291H4E91740878 for ; Mon, 8 Mar 2010 20:17:04 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o291H4Sg017807 for ; Mon, 8 Mar 2010 22:17:04 -0300 Message-ID: <4B95A18F.1040703@linux.vnet.ibm.com> Date: Mon, 08 Mar 2010 17:17:03 -0800 From: jvrao MIME-Version: 1.0 Subject: Re: [Qemu-devel] virtio block device and sysfs References: <20100306224234.GA1145@torres.zugschlus.de> In-Reply-To: <20100306224234.GA1145@torres.zugschlus.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc Haber Cc: qemu-devel@nongnu.org Marc Haber wrote: > Hi, > > I am looking to get in touch with somebody who knows more about the > connection between host configuration, qemu, kvm, and the virtio block > device driver guest side than I know. > Please check out this patch and follow the "mount_tag" ...it may be helpful in explaining what you are looking for. http://www.mail-archive.com/qemu-devel@nongnu.org/msg26358.html Thanks, JV > My goal is to have a possibility to give a "speaking" name to any > block device handed into a guest instance by the host. That name > should be visible inside the guest, just as a LV is visible with its > name in the system running the LVM. > > For example I would like to say on the qemu or kvm command line > '-drive file=some-file,label=some-label,if=virtio', and have the > string "some-label" show up somewhere in /sys/block in the guest, much > as /sys/block/sda/device/model shows the hardware vendor and type for > a standard SATA disk. The guest could then handle the information > passed into it by the host with udev rules, allowing fstab constructs > like "mount /dev/virtio/block/by-label/some-label as /usr" > > Since I don't have pretty much clue about kernel programming, I guess > that one would need to have qemu/kvm support for the additional label > to be passed to the emulated/virtualized guest, and a modification to > the guest kernel virtio driver which needs to accept the information > passed by the host and to generate the appropriate entry in /sys. > > Am I correct in my assumption? Can you say who I need to talk to to > get advice about how to implement this (or to have it implemented, if > it's easy enough)? > > Any hints will be appreciated. > > Greetings > Marc >