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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 12:20, Daniel P. Berrangé wrote: > On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: >> +{ 'struct' : 'SystemFirmware', >> + 'data' : { 'executable' : 'FirmwareFile', >> + 'type' : 'SystemFirmwareType', >> +

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:55, Daniel P. Berrangé wrote: > On Tue, Apr 10, 2018 at 11:51:31AM +0200, Gerd Hoffmann wrote: Hmm, I'm wondering whenever it is useful to model things this way. It's not like you can actually configure things for -bios seabios.rom or -kernel uboot.elf. Only pflash

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:34, Daniel P. Berrangé wrote: > On Tue, Apr 10, 2018 at 11:16:01AM +0200, Laszlo Ersek wrote: >> On 04/10/18 08:27, Gerd Hoffmann wrote: >>> Hi, >>> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, present and future, for SMM-requiring OVMF

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:32, Thomas Huth wrote: > On 10.04.2018 11:22, Laszlo Ersek wrote: >> On 04/10/18 09:33, Thomas Huth wrote: > [...] >>> Alternatively, what about providing some kind of "alias" or "nickname" >>> setting here, too? So the EDK2 builds would get >>> SystemFirmwareType="edk2" and

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:26, Thomas Huth wrote: > On 10.04.2018 11:16, Laszlo Ersek wrote: >> On 04/10/18 08:27, Gerd Hoffmann wrote: >>> Hi, >>> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, present and future, for SMM-requiring OVMF builds), but then you get into

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 12:48:28PM +0100, Peter Maydell wrote: > On 10 April 2018 at 12:34, Daniel P. Berrangé wrote: > > On Tue, Apr 10, 2018 at 01:27:18PM +0200, Laszlo Ersek wrote: > > > >> Please go through the rest of the emails in this thread, and advise: > >> - if the

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 01:44:13PM +0200, Laszlo Ersek wrote: > On 04/10/18 13:34, Daniel P. Berrangé wrote: > > On Tue, Apr 10, 2018 at 01:27:18PM +0200, Laszlo Ersek wrote: > > > >> Please go through the rest of the emails in this thread, and advise: > >> - if the firmware descriptor schema may

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

2018-04-10 Thread Peter Maydell
On 10 April 2018 at 12:34, Daniel P. Berrangé wrote: > On Tue, Apr 10, 2018 at 01:27:18PM +0200, Laszlo Ersek wrote: > >> Please go through the rest of the emails in this thread, and advise: >> - if the firmware descriptor schema may perhaps live in the libvirt tree, >> -

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 13:34, Daniel P. Berrangé wrote: > On Tue, Apr 10, 2018 at 01:27:18PM +0200, Laszlo Ersek wrote: > >> Please go through the rest of the emails in this thread, and advise: >> - if the firmware descriptor schema may perhaps live in the libvirt tree, >> - accordingly, if the schema could

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:05, Daniel P. Berrangé wrote: > On Mon, Apr 09, 2018 at 06:34:41PM +0200, Laszlo Ersek wrote: >> On 04/09/18 09:26, Thomas Huth wrote: >>> Hi Laszlo, >>> >>> On 07.04.2018 02:01, Laszlo Ersek wrote: Add a schema that describes the properties of virtual machine firmware.

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 01:27:18PM +0200, Laszlo Ersek wrote: > Please go through the rest of the emails in this thread, and advise: > - if the firmware descriptor schema may perhaps live in the libvirt tree, > - accordingly, if the schema could be expressed as an XSD (and firmware > packages

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 11:18, Daniel P. Berrangé wrote: > On Mon, Apr 09, 2018 at 07:57:54PM +0200, Laszlo Ersek wrote: >> On 04/09/18 10:49, Daniel P. Berrangé wrote: >>> On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: Add a schema that describes the properties of virtual machine

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

2018-04-10 Thread Daniel P . Berrangé
On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: > Add a schema that describes the properties of virtual machine firmware. > > Each firmware executable installed on a host system should come with a > JSON file that conforms to this schema, and informs the management > applications

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 11:51:31AM +0200, Gerd Hoffmann wrote: > > > Hmm, I'm wondering whenever it is useful to model things this way. It's > > > not like you can actually configure things for -bios seabios.rom or > > > -kernel uboot.elf. Only pflash allows to actually configure things, and > >

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

2018-04-10 Thread Gerd Hoffmann
> > Hmm, I'm wondering whenever it is useful to model things this way. It's > > not like you can actually configure things for -bios seabios.rom or > > -kernel uboot.elf. Only pflash allows to actually configure things, and > > there are not that many useful combinations. The code needs > >

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 11:16:01AM +0200, Laszlo Ersek wrote: > On 04/10/18 08:27, Gerd Hoffmann wrote: > > Hi, > > > >> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, > >> present and future, for SMM-requiring OVMF builds), but then you get > >> into version sorting

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

2018-04-10 Thread Thomas Huth
On 10.04.2018 11:22, Laszlo Ersek wrote: > On 04/10/18 09:33, Thomas Huth wrote: [...] >> Alternatively, what about providing some kind of "alias" or "nickname" >> setting here, too? So the EDK2 builds would get >> SystemFirmwareType="edk2" and "SystemFirmwareAlias="uefi" for example. > > I hope

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

2018-04-10 Thread Thomas Huth
On 10.04.2018 11:16, Laszlo Ersek wrote: > On 04/10/18 08:27, Gerd Hoffmann wrote: >> Hi, >> >>> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, >>> present and future, for SMM-requiring OVMF builds), but then you get >>> into version sorting and similar mess. I

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

2018-04-10 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 11:16:01AM +0200, Laszlo Ersek wrote: > On 04/10/18 08:27, Gerd Hoffmann wrote: > > Hi, > > > >> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, > >> present and future, for SMM-requiring OVMF builds), but then you get > >> into version sorting

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 09:33, Thomas Huth wrote: > On 09.04.2018 18:50, Laszlo Ersek wrote: >> On 04/09/18 10:19, Gerd Hoffmann wrote: > +{ 'enum' : 'SystemFirmwareType', > + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } The naming here is quite a bad mixture between firmware interface

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

2018-04-10 Thread Thomas Huth
On 10.04.2018 11:05, Daniel P. Berrangé wrote: > On Mon, Apr 09, 2018 at 06:34:41PM +0200, Laszlo Ersek wrote: >> On 04/09/18 09:26, Thomas Huth wrote: >>> Hi Laszlo, >>> >>> On 07.04.2018 02:01, Laszlo Ersek wrote: Add a schema that describes the properties of virtual machine firmware.

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

2018-04-10 Thread Daniel P . Berrangé
On Mon, Apr 09, 2018 at 07:57:54PM +0200, Laszlo Ersek wrote: > On 04/09/18 10:49, Daniel P. Berrangé wrote: > > On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: > >> Add a schema that describes the properties of virtual machine firmware. > >> > >> Each firmware executable installed

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 08:27, Gerd Hoffmann wrote: > Hi, > >> - I considered adding wildcards (say, blacklist "all" i440fx machtypes, >> present and future, for SMM-requiring OVMF builds), but then you get >> into version sorting and similar mess. I considered fnmatch() -- >> basically simple ? and *

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 08:18, Gerd Hoffmann wrote: > Hi, > >>> uboot for example implements uefi unterfaces too (dunno how complete, >>> but reportly recent versions can run uefi shell and grub just fine). >> >> Indeed: when I was struggling with this enum type and tried to look for >> more firmware types

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

2018-04-10 Thread Daniel P . Berrangé
On Mon, Apr 09, 2018 at 06:50:12PM +0200, Laszlo Ersek wrote: > On 04/09/18 10:19, Gerd Hoffmann wrote: > >>> +{ 'enum' : 'SystemFirmwareType', > >>> + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } > >> > >> The naming here is quite a bad mixture between firmware interface > >> ('bios', 'uefi')

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 07:59, Gerd Hoffmann wrote: > Hi, > >> I threw in "-kernel" because, although it also (usually?) means >> "memory", I expected people would want it separate. >> >> Regarding memory vs. pflash, I thought that these two, combined with the >> access permissions, could cover all of RAM,

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

2018-04-10 Thread Daniel P . Berrangé
On Mon, Apr 09, 2018 at 06:34:41PM +0200, Laszlo Ersek wrote: > On 04/09/18 09:26, Thomas Huth wrote: > > Hi Laszlo, > > > > On 07.04.2018 02:01, Laszlo Ersek wrote: > >> Add a schema that describes the properties of virtual machine firmware. > >> > >> Each firmware executable installed on a

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

2018-04-10 Thread Laszlo Ersek
On 04/10/18 09:44, Thomas Huth wrote: > On 09.04.2018 18:34, Laszlo Ersek wrote: >> On 04/09/18 09:26, Thomas Huth wrote: >>> Hi Laszlo, >>> >>> On 07.04.2018 02:01, Laszlo Ersek wrote: Add a schema that describes the properties of virtual machine firmware. Each firmware executable

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

2018-04-10 Thread Thomas Huth
On 09.04.2018 18:34, Laszlo Ersek wrote: > On 04/09/18 09:26, Thomas Huth wrote: >> Hi Laszlo, >> >> On 07.04.2018 02:01, Laszlo Ersek wrote: >>> Add a schema that describes the properties of virtual machine firmware. >>> >>> Each firmware executable installed on a host system should come with a

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

2018-04-10 Thread Thomas Huth
On 09.04.2018 18:50, Laszlo Ersek wrote: > On 04/09/18 10:19, Gerd Hoffmann wrote: +{ 'enum' : 'SystemFirmwareType', + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } >>> >>> The naming here is quite a bad mixture between firmware interface >>> ('bios', 'uefi') and firmware

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

2018-04-10 Thread Gerd Hoffmann
Hi, > - I considered adding wildcards (say, blacklist "all" i440fx machtypes, > present and future, for SMM-requiring OVMF builds), but then you get > into version sorting and similar mess. I considered fnmatch() -- > basically simple ? and * wildcards -- but that's not expressive enough. I'd

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

2018-04-10 Thread Gerd Hoffmann
Hi, > > uboot for example implements uefi unterfaces too (dunno how complete, > > but reportly recent versions can run uefi shell and grub just fine). > > Indeed: when I was struggling with this enum type and tried to look for > more firmware types to add, my googling turned up the "UEFI on

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

2018-04-09 Thread Gerd Hoffmann
Hi, > I threw in "-kernel" because, although it also (usually?) means > "memory", I expected people would want it separate. > > Regarding memory vs. pflash, I thought that these two, combined with the > access permissions, could cover all of RAM, ROM, and read-only and > read-write pflash too.

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

2018-04-09 Thread Laszlo Ersek
On 04/09/18 10:49, Daniel P. Berrangé wrote: > On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: >> Add a schema that describes the properties of virtual machine firmware. >> >> Each firmware executable installed on a host system should come with a >> JSON file that conforms to this

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

2018-04-09 Thread Laszlo Ersek
On 04/09/18 10:26, Gerd Hoffmann wrote: >> +# { >> +# "executable": { >> +# "pathname": "/usr/share/OVMF/OVMF_CODE.secboot.fd", >> +# "description": "OVMF with Secure Boot and SMM-protected varstore", >> +# "tags": [ >> +# "FD_SIZE_4MB", >> +#

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

2018-04-09 Thread Laszlo Ersek
On 04/09/18 10:19, Gerd Hoffmann wrote: >>> +{ 'enum' : 'SystemFirmwareType', >>> + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } >> >> The naming here is quite a bad mixture between firmware interface >> ('bios', 'uefi') and firmware implementations ('slof', 'uboot'). There >> could be other

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

2018-04-09 Thread Laszlo Ersek
On 04/09/18 10:08, Thomas Huth wrote: > On 07.04.2018 02:01, Laszlo Ersek wrote: >> Add a schema that describes the properties of virtual machine firmware. > [...] >> +## >> +# @SystemFirmware: >> +# >> +# Describes a system firmware binary and any NVRAM slots that it requires. >> +# >> +#

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

2018-04-09 Thread Laszlo Ersek
On 04/09/18 09:26, Thomas Huth wrote: > Hi Laszlo, > > On 07.04.2018 02:01, Laszlo Ersek wrote: >> Add a schema that describes the properties of virtual machine firmware. >> >> Each firmware executable installed on a host system should come with a >> JSON file that conforms to this schema, and

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

2018-04-09 Thread Daniel P . Berrangé
On Sat, Apr 07, 2018 at 02:01:17AM +0200, Laszlo Ersek wrote: > Add a schema that describes the properties of virtual machine firmware. > > Each firmware executable installed on a host system should come with a > JSON file that conforms to this schema, and informs the management > applications

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

2018-04-09 Thread Gerd Hoffmann
> +# { > +# "executable": { > +# "pathname": "/usr/share/OVMF/OVMF_CODE.secboot.fd", > +# "description": "OVMF with Secure Boot and SMM-protected varstore", > +# "tags": [ > +# "FD_SIZE_4MB", > +# "IA32X64", > +# "SECURE_BOOT_ENABLE",

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

2018-04-09 Thread Gerd Hoffmann
> > +{ 'enum' : 'SystemFirmwareType', > > + 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] } > > The naming here is quite a bad mixture between firmware interface > ('bios', 'uefi') and firmware implementations ('slof', 'uboot'). There > could be other implementations of BIOS or UEFI than SeaBIOS

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

2018-04-09 Thread Thomas Huth
On 07.04.2018 02:01, Laszlo Ersek wrote: > Add a schema that describes the properties of virtual machine firmware. [...] > +## > +# @SystemFirmware: > +# > +# Describes a system firmware binary and any NVRAM slots that it requires. > +# > +# @executable: Identifies the platform firmware

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

2018-04-09 Thread Thomas Huth
Hi Laszlo, On 07.04.2018 02:01, Laszlo Ersek wrote: > Add a schema that describes the properties of virtual machine firmware. > > Each firmware executable installed on a host system should come with a > JSON file that conforms to this schema, and informs the management > applications about the

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

2018-04-06 Thread Laszlo Ersek
Add a schema that describes the properties of virtual machine firmware. Each firmware executable installed on a host system should come with a JSON file that conforms to this schema, and informs the management applications about the firmware's properties. In addition, a configuration directory