From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWM0y-00081b-NM for qemu-devel@nongnu.org; Wed, 16 Oct 2013 03:59:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWM0r-0006Ji-9p for qemu-devel@nongnu.org; Wed, 16 Oct 2013 03:59:32 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:59128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWM0r-0006Jc-3f for qemu-devel@nongnu.org; Wed, 16 Oct 2013 03:59:25 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so477492pbc.7 for ; Wed, 16 Oct 2013 00:59:24 -0700 (PDT) Message-ID: <525E4759.10402@ozlabs.ru> Date: Wed, 16 Oct 2013 18:59:21 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <525E1E5C.4090002@ozlabs.ru> <525E33DA.8040106@redhat.com> In-Reply-To: <525E33DA.8040106@redhat.com> 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: Paolo Bonzini Cc: "Michael S. Tsirkin" , "qemu-devel@nongnu.org" , Nikunj A Dadhania , Alex Graf On 10/16/2013 05:36 PM, Paolo Bonzini wrote: > Il 16/10/2013 07:04, Alexey Kardashevskiy ha scritto: >> Hi! >> >> Normally on sPAPR platform the IBMVSCSI host bus adapter is used which is >> SCSI. So when we want some image to appear as a DVD to the guest >> (particularly SLOF - our firmware), we use "-device scsi-cd". Or QEMU >> extracts this automatically from the "media=cdrom" property of "-drive" >> (correct?). And then the SCSI bus tells the guest what is what. SLOF >> firmware uses this to create "disk" and "cdrom" aliases to correcly apply >> the boot order. So far so good. >> >> Now we are trying (via libvirt) to add both HDD and DVD as "virtio-blk-pci" >> devices: >> >> -drive file=virtimg/rhel6-root.img,if=none,format=raw,\ >> id=drive-virtio-disk1,cache=none \ >> -device virtio-blk-pci,bus=pci,addr=0x4,\ >> drive=drive-virtio-disk1,id=virtio-disk1,bootindex=2 \ >> \ >> -drive file=virtimg/SLES-11-SP3-DVD-ppc64-GM-DVD1.iso,\ >> if=none,media=cdrom,id=drive-virtio-disk2,readonly=on,\ >> format=raw\ >> -device virtio-blk-pci,bus=pci,addr=0x5,\ >> drive=drive-virtio-disk2,id=virtio-disk2,bootindex=1 >> >> No SCSI bus is created in this case. Both devices appear to SLOF as HDDs so >> it creates just one "disk" alias and no "cdrom" alias and if we are not >> lucky and DVD got bigger PCI slot#, we will never be able to boot from DVD. >> >> Is there any way to distinguish HDD from DVD via virtio protocol from the >> guest (i.e. SLOF)? Thanks! > > No, virtio-blk is always a HDD. Thanks, good to know. > Does bootindex work with pSeries? Nope. Seems the time to support this has come :) > > Paolo > -- Alexey