Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-05 Thread Alexander Graf
On 05.10.2012, at 11:12, Benjamin Herrenschmidt wrote: > On Fri, 2012-10-05 at 02:43 +0200, Alexander Graf wrote: >>> We should also be able to get the raw bootindex values for a qdev, >>> yes? I was thinking we could instead copy those values into the >>> device tree when we populate it. The

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-05 Thread Benjamin Herrenschmidt
On Fri, 2012-10-05 at 02:43 +0200, Alexander Graf wrote: > > We should also be able to get the raw bootindex values for a qdev, > > yes? I was thinking we could instead copy those values into the > > device tree when we populate it. The trouble is that we don't > > actually generate (in qemu) nod

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
I looked at the bootindex stuff and found that when the bootindex is specified for the disk and cdrom it generates a string like: "/spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,1 /spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,0" Ok, so I've just started looking at the bootindex stuff. What fu

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Nikunj A Dadhania
On Fri, 5 Oct 2012 10:34:16 +1000, David Gibson wrote: > On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: > > On 09/27/2012 03:21 PM, Gleb Natapov wrote: > > >On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > >> > > >>On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Nikunj A Dadhania
On Thu, 4 Oct 2012 14:37:22 +0200, Alexander Graf wrote: > > Imagine you have 2 controllers: > > * vio > * virtio > > and you specify -boot c. Which device are you going to boot from? > >>> > >>> Currently, by default SLOF boots from the first disk it discover

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread David Gibson
On Fri, Oct 05, 2012 at 02:43:31AM +0200, Alexander Graf wrote: > > On 05.10.2012, at 02:34, David Gibson wrote: > > > On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: > >> On 09/27/2012 03:21 PM, Gleb Natapov wrote: > >>> On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: >

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Alexander Graf
On 05.10.2012, at 02:34, David Gibson wrote: > On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: >> On 09/27/2012 03:21 PM, Gleb Natapov wrote: >>> On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: >

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread David Gibson
On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: > On 09/27/2012 03:21 PM, Gleb Natapov wrote: > >On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > >> > >>On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > >> > >>>On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: > >

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
On 09/27/2012 03:21 PM, Gleb Natapov wrote: On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: Hi, We would like to get a method to boot from devices provided in -boot argu

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
I looked at the bootindex stuff and found that when the bootindex is specified for the disk and cdrom it generates a string like: "/spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,1 /spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,0" Now converting/translating this to OF device path is going to be m

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
So you want to hack around the problem. If -boot is specified what device are you going to boot from? It is going to boot from the device specified in -boot as default_boot_order is set to 0 in that case. Imagine you have 2 controllers: * vio * virtio and you specify -boot c. Which de

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
I looked at the bootindex stuff and found that when the bootindex is specified for the disk and cdrom it generates a string like: "/spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,1 /spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,0" Now converting/translating this to OF device path is going to be m

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Avik Sil
On 10/04/2012 04:52 PM, Gleb Natapov wrote: On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: On 09/27/2012 03:21 PM, Gleb Natapov wrote: On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: On Thu, 2012-09-27 at 14:5

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Gleb Natapov
On Thu, Oct 04, 2012 at 02:37:22PM +0200, Alexander Graf wrote: > > On 04.10.2012, at 14:35, Avik Sil wrote: > > >> So you want to hack around the problem. If -boot is specified what > >> device are you going to boot from? > > > > It is going to boot from the device specified in

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 14:35, Avik Sil wrote: >> So you want to hack around the problem. If -boot is specified what >> device are you going to boot from? > > It is going to boot from the device specified in -boot as > default_boot_order is set to 0 in that case. Imagin

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 14:18, Avik Sil wrote: > I looked at the bootindex stuff and found that when the bootindex is > specified for the disk and cdrom it generates a string like: > > "/spapr-vio-bridge/spapr-vscsi/channel@0/disk@0,1 > /spapr-vio-bridge/spapr-vscsi/channel@0/disk@

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Gleb Natapov
On Thu, Oct 04, 2012 at 04:59:27PM +0530, Avik Sil wrote: > On 10/04/2012 04:52 PM, Gleb Natapov wrote: > >On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: > >>On 09/27/2012 03:21 PM, Gleb Natapov wrote: > >>>On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > On 2

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Alexander Graf
On 04.10.2012, at 13:29, Avik Sil wrote: > On 10/04/2012 04:52 PM, Gleb Natapov wrote: >> On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: >>> On 09/27/2012 03:21 PM, Gleb Natapov wrote: On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > On 27.09.2012, at 1

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-10-04 Thread Gleb Natapov
On Thu, Oct 04, 2012 at 04:25:28PM +0530, Avik Sil wrote: > On 09/27/2012 03:21 PM, Gleb Natapov wrote: > >On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > >> > >>On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > >> > >>>On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: > >

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Jordan Justen
On Thu, Sep 27, 2012 at 2:51 AM, Gleb Natapov wrote: > The problem is that it works reasonably well with legacy BIOS > since it is enough to specify device to boot from, but with EFI (OF is > the same I guess) it is not enough to point to a device to boot from, > but you also need to specify a fil

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Nikunj A Dadhania
On Thu, 27 Sep 2012 11:51:36 +0200, Gleb Natapov wrote: > On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > > > On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > > > > > On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: > > >> Hi, > > >> > > >> We would like to get a m

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Nikunj A Dadhania
On Thu, 27 Sep 2012 12:13:05 +0200, Gleb Natapov wrote: > On Thu, Sep 27, 2012 at 03:35:53PM +0530, Nikunj A Dadhania wrote: > > > > If the user does not set bootindex, qemu would decide the bootindex? > > > No. Firmware decides. QEMU just tells to firmware that it does not have > bootindex.

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Gleb Natapov
On Thu, Sep 27, 2012 at 04:04:54PM +0530, Nikunj A Dadhania wrote: > On Thu, 27 Sep 2012 12:13:05 +0200, Gleb Natapov wrote: > > On Thu, Sep 27, 2012 at 03:35:53PM +0530, Nikunj A Dadhania wrote: > > > > > > If the user does not set bootindex, qemu would decide the bootindex? > > > > > No. Fir

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Gleb Natapov
On Thu, Sep 27, 2012 at 08:21:43PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2012-09-27 at 11:51 +0200, Gleb Natapov wrote: > > > Yes, forget about -boot. It is deprecated :) You should use bootindex > > (device property) to set boot priority. It constructs OF device path > > and passes it to

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Benjamin Herrenschmidt
On Thu, 2012-09-27 at 11:51 +0200, Gleb Natapov wrote: > Yes, forget about -boot. It is deprecated :) You should use bootindex > (device property) to set boot priority. It constructs OF device path > and passes it to firmware. There is nothing "blurry" about OF device > path. Of course it is ;-)

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Gleb Natapov
On Thu, Sep 27, 2012 at 03:35:53PM +0530, Nikunj A Dadhania wrote: > On Thu, 27 Sep 2012 11:51:36 +0200, Gleb Natapov wrote: > > On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > > > > > On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > > > > > > > On Thu, 2012-09-27 at

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Gleb Natapov
On Thu, Sep 27, 2012 at 11:33:31AM +0200, Alexander Graf wrote: > > On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > > > On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: > >> Hi, > >> > >> We would like to get a method to boot from devices provided in -boot > >> arguments in qemu when

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Alexander Graf
On 27.09.2012, at 11:35, Benjamin Herrenschmidt wrote: > On Thu, 2012-09-27 at 11:33 +0200, Alexander Graf wrote: >> >> I think the command line should override anything user specified. So >> basically: >> >> * user defined -boot option (or bootindex magic from Gleb) >> * nvram >> * fallback

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Benjamin Herrenschmidt
On Thu, 2012-09-27 at 11:33 +0200, Alexander Graf wrote: > > I think the command line should override anything user specified. So > basically: > > * user defined -boot option (or bootindex magic from Gleb) > * nvram > * fallback to default > > > Eventually we should try to implement some s

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Alexander Graf
On 27.09.2012, at 11:29, Benjamin Herrenschmidt wrote: > On Thu, 2012-09-27 at 14:51 +0530, Avik Sil wrote: >> Hi, >> >> We would like to get a method to boot from devices provided in -boot >> arguments in qemu when the 'boot-device' is set in nvram for pseries >> machine. I mean the boot devi