Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-20 Thread Laszlo Ersek
On 04/20/18 10:47, Paolo Bonzini wrote: > On 20/04/2018 03:03, David Gibson wrote: >>> This also implies I shouldn't add "openbios" separately, which was >>> suggested earlier by Gerd -- according to >>> , OpenBIOS is another >>> implementation of OFW. >> >>

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-20 Thread Paolo Bonzini
On 20/04/2018 03:03, David Gibson wrote: >> This also implies I shouldn't add "openbios" separately, which was >> suggested earlier by Gerd -- according to >> , OpenBIOS is another >> implementation of OFW. > > Right. Although I think OpenBIOS and SLOF

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread David Gibson
On Thu, 19 Apr 2018 10:09:30 +0200 Laszlo Ersek wrote: > On 04/19/18 02:09, David Gibson wrote: > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > > Thank you -- I will replace SLOF with "openfirmware". > > This also implies

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Thomas Huth
On 18.04.2018 00:40, Laszlo Ersek wrote: > Add a schema that describes the different uses and properties of virtual > machine firmware. > > Each firmware executable installed on a host system should come with at > least one JSON file that conforms to this schema. Each file informs the >

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Thomas Huth
On 18.04.2018 08:02, Gerd Hoffmann wrote: > On Wed, Apr 18, 2018 at 12:40:54AM +0200, Laszlo Ersek wrote: >> Add a schema that describes the different uses and properties of virtual >> machine firmware. > > Looks good to me overall. > >> +{ 'enum' : 'FirmwareType', >> + 'data' : [ 'bios',

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread Laszlo Ersek
On 04/19/18 02:09, David Gibson wrote: > On Wed, 18 Apr 2018 10:32:06 +0200 > Laszlo Ersek wrote: > >> On 04/18/18 08:02, Gerd Hoffmann wrote: >> [...] >> [...] >>> >>> Looks good to me overall. >>> +{ 'enum' : 'FirmwareType', + 'data' : [ 'bios', 'slof',

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread David Gibson
On Wed, 18 Apr 2018 10:32:06 +0200 Laszlo Ersek wrote: > On 04/18/18 08:02, Gerd Hoffmann wrote: > [...] > [...] > > > > Looks good to me overall. > > > >> +{ 'enum' : 'FirmwareType', > >> + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } > > > > openbios missing. >

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 17:27, Laszlo Ersek wrote: > On 04/18/18 17:17, Eric Blake wrote: >> On 04/18/2018 07:40 AM, Laszlo Ersek wrote: >> >>> Is it guaranteed that lists in JSON keep the order of the elements? >>> Because, dictionaries definitely don't promise any ordering between the >>> keys. >> >> Yes,

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 05:27:32PM +0200, Laszlo Ersek wrote: > On 04/18/18 17:17, Eric Blake wrote: > > On 04/18/2018 07:40 AM, Laszlo Ersek wrote: > > > >> Is it guaranteed that lists in JSON keep the order of the elements? > >> Because, dictionaries definitely don't promise any ordering

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 17:17, Eric Blake wrote: > On 04/18/2018 07:40 AM, Laszlo Ersek wrote: > >> Is it guaranteed that lists in JSON keep the order of the elements? >> Because, dictionaries definitely don't promise any ordering between the >> keys. > > Yes, JSON lists preserve order (and we have to

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Eric Blake
On 04/18/2018 07:40 AM, Laszlo Ersek wrote: > Is it guaranteed that lists in JSON keep the order of the elements? > Because, dictionaries definitely don't promise any ordering between the > keys. Yes, JSON lists preserve order (and we have to explicitly document cases where order within a list

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 16:06, Daniel P. Berrangé wrote: > On Wed, Apr 18, 2018 at 04:03:03PM +0200, Laszlo Ersek wrote: >> - Would you like me to capture the directory paths in the firmware.json >> file, or in the commit message for the patch? > > Should be in whatever file ends up in the docs/specs

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 04:03:03PM +0200, Laszlo Ersek wrote: > On 04/18/18 15:53, Daniel P. Berrangé wrote: > > On Wed, Apr 18, 2018 at 03:30:36PM +0200, Laszlo Ersek wrote: > >> On 04/18/18 15:06, Gerd Hoffmann wrote: > > Other question: Do we want allow to specify which certs/keys are >

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 15:53, Daniel P. Berrangé wrote: > On Wed, Apr 18, 2018 at 03:30:36PM +0200, Laszlo Ersek wrote: >> On 04/18/18 15:06, Gerd Hoffmann wrote: > Other question: Do we want allow to specify which certs/keys are > enrolled? Which would probably mean to drop "enrolled-keys" from

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 03:30:36PM +0200, Laszlo Ersek wrote: > On 04/18/18 15:06, Gerd Hoffmann wrote: > >>> Other question: Do we want allow to specify which certs/keys are > >>> enrolled? Which would probably mean to drop "enrolled-keys" from > >>> features and make it an optional string

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 15:06, Gerd Hoffmann wrote: >>> Other question: Do we want allow to specify which certs/keys are >>> enrolled? Which would probably mean to drop "enrolled-keys" from >>> features and make it an optional string instead, >> >> Not an enum? "Microsoft" below should be an enum constant,

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
> > Other question: Do we want allow to specify which certs/keys are > > enrolled? Which would probably mean to drop "enrolled-keys" from > > features and make it an optional string instead, > > Not an enum? "Microsoft" below should be an enum constant, shouldn't it? I don't think so. If we

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 14:32, Daniel P. Berrangé wrote: > On Wed, Apr 18, 2018 at 02:30:02PM +0200, Gerd Hoffmann wrote: >> Hi, >> >>> So now the question is should this string be declared to be >>> glob format, or regex format. Regex is more flexible, but >>> regex syntax is ill-defined because every

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 14:23, Gerd Hoffmann wrote: > Hi, > >> Hmmm, I'm not sure I agree. One use case is that you want a domain >> config in which well-known OS-es, signed by the MS UEFI certs, just boot >> with SB enabled. (Some of our internal folks really want this.) >> >> Another use case is that you

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 14:03, Daniel P. Berrangé wrote: > On Wed, Apr 18, 2018 at 01:52:19PM +0200, Laszlo Ersek wrote: >> On 04/18/18 11:43, Paolo Bonzini wrote: >>> On 18/04/2018 00:40, Laszlo Ersek wrote: +# +# Lists firmware types commonly used with QEMU virtual machines. +# +# @bios:

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
Hi, >"features": [ > "bios" > "uefi", >], > > means a traditional BIOS firmware with compat for UEFI (thinking uboot > being able to include uefi support in this case) Well, uboot is it's own world, I would write that as [ "uboot", "uefi" ]. I like the idea

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 02:30:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > So now the question is should this string be declared to be > > glob format, or regex format. Regex is more flexible, but > > regex syntax is ill-defined because every regex engine is > > slightly different. > > I'd go

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
Hi, > So now the question is should this string be declared to be > glob format, or regex format. Regex is more flexible, but > regex syntax is ill-defined because every regex engine is > slightly different. I'd go for glob. It's good enough for the version number and most likely we don't

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
Hi, > Hmmm, I'm not sure I agree. One use case is that you want a domain > config in which well-known OS-es, signed by the MS UEFI certs, just boot > with SB enabled. (Some of our internal folks really want this.) > > Another use case is that you want a domain in which SB *can* be enabled, >

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 01:52:19PM +0200, Laszlo Ersek wrote: > On 04/18/18 11:43, Paolo Bonzini wrote: > > On 18/04/2018 00:40, Laszlo Ersek wrote: > >> +# > >> +# Lists firmware types commonly used with QEMU virtual machines. > >> +# > >> +# @bios: The firmware was built from the SeaBIOS

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Daniel P . Berrangé
On Wed, Apr 18, 2018 at 01:48:10PM +0200, Laszlo Ersek wrote: > On 04/18/18 11:04, Gerd Hoffmann wrote: > >> This surfaced in the RFCv1 discussion, but Daniel suggested ignoring > >> version numbers: > >> > >>

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 11:43, Paolo Bonzini wrote: > On 18/04/2018 00:40, Laszlo Ersek wrote: >> +# >> +# Lists firmware types commonly used with QEMU virtual machines. >> +# >> +# @bios: The firmware was built from the SeaBIOS project. >> +# >> +# @slof: The firmware was built from the Slimline Open

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 11:04, Gerd Hoffmann wrote: >> This surfaced in the RFCv1 discussion, but Daniel suggested ignoring >> version numbers: >> >> 20180410093412.GI5155@redhat.com">http://mid.mail-archive.com/20180410093412.GI5155@redhat.com >> >> On 04/10/18 11:34, Daniel P. Berrangé wrote: >>> IMHO it

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Paolo Bonzini
On 18/04/2018 00:40, Laszlo Ersek wrote: > +# > +# Lists firmware types commonly used with QEMU virtual machines. > +# > +# @bios: The firmware was built from the SeaBIOS project. > +# > +# @slof: The firmware was built from the Slimline Open Firmware project. > +# > +# @uboot: The firmware was

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
> This surfaced in the RFCv1 discussion, but Daniel suggested ignoring > version numbers: > > 20180410093412.GI5155@redhat.com">http://mid.mail-archive.com/20180410093412.GI5155@redhat.com > > On 04/10/18 11:34, Daniel P. Berrangé wrote: > > IMHO it would be valid to just keep life simple and

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Laszlo Ersek
On 04/18/18 08:02, Gerd Hoffmann wrote: > On Wed, Apr 18, 2018 at 12:40:54AM +0200, Laszlo Ersek wrote: >> Add a schema that describes the different uses and properties of >> virtual machine firmware. > > Looks good to me overall. > >> +{ 'enum' : 'FirmwareType', >> + 'data' : [ 'bios', 'slof',

Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-18 Thread Gerd Hoffmann
On Wed, Apr 18, 2018 at 12:40:54AM +0200, Laszlo Ersek wrote: > Add a schema that describes the different uses and properties of virtual > machine firmware. Looks good to me overall. > +{ 'enum' : 'FirmwareType', > + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } openbios missing. > +{ 'enum'

[libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-17 Thread Laszlo Ersek
Add a schema that describes the different uses and properties of virtual machine firmware. Each firmware executable installed on a host system should come with at least one JSON file that conforms to this schema. Each file informs the management applications about the firmware's properties and