From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWnwc-0005ER-KL for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:49:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWnwW-0007Cx-E2 for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:48:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWnwW-0007Ct-4r for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:48:48 -0400 Message-ID: <525FEAB9.9080808@redhat.com> Date: Thu, 17 Oct 2013 15:48:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <525E1E5C.4090002@ozlabs.ru> <525E33DA.8040106@redhat.com> <525E4759.10402@ozlabs.ru> <525FDA47.9050306@ozlabs.ru> <525FDE06.1000609@redhat.com> <525FE196.4060908@ozlabs.ru> In-Reply-To: <525FE196.4060908@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virtio-blk-pci: how to tell if it is CD or HDD? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: "qemu-devel@nongnu.org" , Nikunj A Dadhania , Alex Graf Il 17/10/2013 15:09, Alexey Kardashevskiy ha scritto: >> In general, try to make QEMU produce SLOF APIs by modifying the devices >> that instantiate the buses. > > "channel@0" -> ""? This is a generic scsi bus, cannot change this. > "disk@3,2" -> "disk@8302000000000000"? This is a generic scsi-cd, cannot > change this either Yes, I was referring more to the vio cases. >> On top of this, fix the remaining QEMU->OF differences using a callback >> in QEMUMachine. This callback would be called by >> qdev_get_fw_dev_path_helper and, if it returns something non-NULL, the >> result would be used instead of calling bus_get_fw_dev_path. > > A single machine callback which will recognize all possible bootable > devices and replace things like "disk@3,2" -> "disk@8302000000000000"? Hm. > > I mean I can do all of that but is it still kosher? :) Or I am missing the > point, again. No, a machine callback that will recognize SCSI disks and return disk@8302000000000000. This will replace the "channel@0/disk@3,2" path returned by default. >>> btw what format does qdev_get_fw_dev_path() use? This is not OF1275 so what >>> is it? >> >> It is based on open-firmware. For SCSI however openfirmware had >> "disk@TARGET,LUN" but that does not include the channel. > > I am confused now. What standard/format/spec defines this "channel@" thingy > or it is made up by QEMU and the x86 bios shipped with QEMU? "open > firmware" == IEEE1275, right? It's made up. Paolo