Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
Gleb Natapov writes: > If bootindex is specified on command line a string that describes device > in firmware readable way is added into sorted list. Later this list will > be passed into firmware to control boot order. > > Signed-off-by: Gleb Natapov Out of curiosity: what about qdev "scsi-generic"? Can't we boot from that? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
On Fri, Jan 28, 2011 at 02:29:50PM +0100, Markus Armbruster wrote: > Gleb Natapov writes: > > > If bootindex is specified on command line a string that describes device > > in firmware readable way is added into sorted list. Later this list will > > be passed into firmware to control boot order. > > > > Signed-off-by: Gleb Natapov > > Out of curiosity: what about qdev "scsi-generic"? Can't we boot from > that? What device exactly scsi-generic supports? scsi-disk has call to add_boot_device_path() though we cannot boot from it without extboot now. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
Gleb Natapov writes: > On Fri, Jan 28, 2011 at 02:29:50PM +0100, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > If bootindex is specified on command line a string that describes device >> > in firmware readable way is added into sorted list. Later this list will >> > be passed into firmware to control boot order. >> > >> > Signed-off-by: Gleb Natapov >> >> Out of curiosity: what about qdev "scsi-generic"? Can't we boot from >> that? > What device exactly scsi-generic supports? scsi-disk has call to > add_boot_device_path() though we cannot boot from it without extboot > now. It's host SCSI generic device (/dev/sg*) pass through. So it's whatever real device is passed through. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
Gleb Natapov writes: > If bootindex is specified on command line a string that describes device > in firmware readable way is added into sorted list. Later this list will > be passed into firmware to control boot order. > > Signed-off-by: Gleb Natapov Just noticed something that slipped through review: [...] > diff --git a/vl.c b/vl.c > index 2cd263e..dadc161 100644 > --- a/vl.c > +++ b/vl.c [...] > @@ -693,6 +704,35 @@ static void restore_boot_devices(void *opaque) > qemu_free(standard_boot_devices); > } > > +void add_boot_device_path(int32_t bootindex, DeviceState *dev, > + const char *suffix) > +{ > +FWBootEntry *node, *i; > + > +if (bootindex < 0) { > +return; > +} > + > +assert(dev != NULL || suffix != NULL); > + > +node = qemu_mallocz(sizeof(FWBootEntry)); > +node->bootindex = bootindex; > +node->suffix = strdup(suffix); qemu_strdup()? > +node->dev = dev; > + > +QTAILQ_FOREACH(i, &fw_boot_order, link) { > +if (i->bootindex == bootindex) { > +fprintf(stderr, "Two devices with same boot index %d\n", > bootindex); > +exit(1); > +} else if (i->bootindex < bootindex) { > +continue; > +} > +QTAILQ_INSERT_BEFORE(i, node, link); > +return; > +} > +QTAILQ_INSERT_TAIL(&fw_boot_order, node, link); > +} > + > static void numa_add(const char *optarg) > { > char option[128]; -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
On Wed, Feb 02, 2011 at 04:08:07PM +0100, Markus Armbruster wrote: > Gleb Natapov writes: > > > If bootindex is specified on command line a string that describes device > > in firmware readable way is added into sorted list. Later this list will > > be passed into firmware to control boot order. > > > > Signed-off-by: Gleb Natapov > > Just noticed something that slipped through review: > > [...] > > diff --git a/vl.c b/vl.c > > index 2cd263e..dadc161 100644 > > --- a/vl.c > > +++ b/vl.c > [...] > > @@ -693,6 +704,35 @@ static void restore_boot_devices(void *opaque) > > qemu_free(standard_boot_devices); > > } > > > > +void add_boot_device_path(int32_t bootindex, DeviceState *dev, > > + const char *suffix) > > +{ > > +FWBootEntry *node, *i; > > + > > +if (bootindex < 0) { > > +return; > > +} > > + > > +assert(dev != NULL || suffix != NULL); > > + > > +node = qemu_mallocz(sizeof(FWBootEntry)); > > +node->bootindex = bootindex; > > +node->suffix = strdup(suffix); > > qemu_strdup()? > Yap. Will fix. > > +node->dev = dev; > > + > > +QTAILQ_FOREACH(i, &fw_boot_order, link) { > > +if (i->bootindex == bootindex) { > > +fprintf(stderr, "Two devices with same boot index %d\n", > > bootindex); > > +exit(1); > > +} else if (i->bootindex < bootindex) { > > +continue; > > +} > > +QTAILQ_INSERT_BEFORE(i, node, link); > > +return; > > +} > > +QTAILQ_INSERT_TAIL(&fw_boot_order, node, link); > > +} > > + > > static void numa_add(const char *optarg) > > { > > char option[128]; -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device
On Wed, Feb 02, 2011 at 05:10:04PM +0200, Gleb Natapov wrote: > On Wed, Feb 02, 2011 at 04:08:07PM +0100, Markus Armbruster wrote: > > Gleb Natapov writes: > > > > > If bootindex is specified on command line a string that describes device > > > in firmware readable way is added into sorted list. Later this list will > > > be passed into firmware to control boot order. > > > > > > Signed-off-by: Gleb Natapov > > > > Just noticed something that slipped through review: > > > > [...] > > > diff --git a/vl.c b/vl.c > > > index 2cd263e..dadc161 100644 > > > --- a/vl.c > > > +++ b/vl.c > > [...] > > > @@ -693,6 +704,35 @@ static void restore_boot_devices(void *opaque) > > > qemu_free(standard_boot_devices); > > > } > > > > > > +void add_boot_device_path(int32_t bootindex, DeviceState *dev, > > > + const char *suffix) > > > +{ > > > +FWBootEntry *node, *i; > > > + > > > +if (bootindex < 0) { > > > +return; > > > +} > > > + > > > +assert(dev != NULL || suffix != NULL); > > > + > > > +node = qemu_mallocz(sizeof(FWBootEntry)); > > > +node->bootindex = bootindex; > > > +node->suffix = strdup(suffix); > > > > qemu_strdup()? > > > Yap. Will fix. > BTW we have 40 uses of strdup and 75 uses of qemu_strdup. > > > +node->dev = dev; > > > + > > > +QTAILQ_FOREACH(i, &fw_boot_order, link) { > > > +if (i->bootindex == bootindex) { > > > +fprintf(stderr, "Two devices with same boot index %d\n", > > > bootindex); > > > +exit(1); > > > +} else if (i->bootindex < bootindex) { > > > +continue; > > > +} > > > +QTAILQ_INSERT_BEFORE(i, node, link); > > > +return; > > > +} > > > +QTAILQ_INSERT_TAIL(&fw_boot_order, node, link); > > > +} > > > + > > > static void numa_add(const char *optarg) > > > { > > > char option[128]; > > -- > Gleb. > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html