[PATCH 0/6] Expose QEMU's -fw_cfg

Michal Privoznik posted 6 patches 3 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1591203520.git.mprivozn@redhat.com
There is a newer version of this series
docs/formatdomain.html.in                     |  30 +++++
docs/schemas/domaincommon.rng                 |  24 ++++
src/conf/domain_conf.c                        | 114 +++++++++++++++++-
src/conf/domain_conf.h                        |  11 ++
src/conf/virconftypes.h                       |   3 +
src/qemu/qemu_capabilities.c                  |   4 +
src/qemu/qemu_capabilities.h                  |   3 +
src/qemu/qemu_command.c                       |  38 ++++++
src/qemu/qemu_validate.c                      |  38 ++++++
src/security/security_dac.c                   |  14 +++
src/security/security_selinux.c               |  13 ++
src/security/virt-aa-helper.c                 |   6 +
.../caps_2.10.0.aarch64.xml                   |   1 +
.../caps_2.10.0.ppc64.xml                     |   1 +
.../caps_2.10.0.s390x.xml                     |   1 +
.../caps_2.10.0.x86_64.xml                    |   1 +
.../caps_2.11.0.s390x.xml                     |   1 +
.../caps_2.11.0.x86_64.xml                    |   1 +
.../caps_2.12.0.aarch64.xml                   |   1 +
.../caps_2.12.0.ppc64.xml                     |   1 +
.../caps_2.12.0.s390x.xml                     |   1 +
.../caps_2.12.0.x86_64.xml                    |   1 +
.../caps_2.4.0.x86_64.xml                     |   1 +
.../caps_2.5.0.x86_64.xml                     |   1 +
.../caps_2.6.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml |   1 +
.../caps_2.6.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml |   1 +
.../caps_2.7.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml |   1 +
.../caps_2.8.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml |   1 +
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml |   1 +
.../caps_2.9.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml |   1 +
.../caps_3.0.0.riscv32.xml                    |   1 +
.../caps_3.0.0.riscv64.xml                    |   1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml |   1 +
.../caps_3.0.0.x86_64.xml                     |   1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml |   1 +
.../caps_3.1.0.x86_64.xml                     |   1 +
.../caps_4.0.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml |   1 +
.../caps_4.0.0.riscv32.xml                    |   1 +
.../caps_4.0.0.riscv64.xml                    |   1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml |   1 +
.../caps_4.0.0.x86_64.xml                     |   1 +
.../caps_4.1.0.x86_64.xml                     |   1 +
.../caps_4.2.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml |   1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml |   1 +
.../caps_4.2.0.x86_64.xml                     |   1 +
.../caps_5.0.0.aarch64.xml                    |   1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml |   1 +
.../caps_5.0.0.riscv64.xml                    |   1 +
.../caps_5.0.0.x86_64.xml                     |   1 +
.../caps_5.1.0.x86_64.xml                     |   1 +
tests/qemuxml2argvdata/fw_cfg.args            |  32 +++++
tests/qemuxml2argvdata/fw_cfg.xml             |  40 ++++++
tests/qemuxml2argvtest.c                      |   1 +
tests/qemuxml2xmloutdata/fw_cfg.xml           |   1 +
tests/qemuxml2xmltest.c                       |   1 +
62 files changed, 413 insertions(+), 5 deletions(-)
create mode 100644 tests/qemuxml2argvdata/fw_cfg.args
create mode 100644 tests/qemuxml2argvdata/fw_cfg.xml
create mode 120000 tests/qemuxml2xmloutdata/fw_cfg.xml
[PATCH 0/6] Expose QEMU's -fw_cfg
Posted by Michal Privoznik 3 years, 10 months ago
There was a discussion whether to do this or not:

https://www.redhat.com/archives/libvir-list/2020-May/msg00954.html

Before you start reviewing, naming is hard and I was unable to come up
with a good element names and place, so suggestions are more than
welcome!

Michal Prívozník (6):
  domain_conf: Format NS always last
  conf: Add firmware blob configuration
  qemu: Validate firmware blob configuration
  qemu: Introduce fw_cfg capability
  secdrivers: Relabel firmware config files
  qemu: Generate command line for -fw_cfg

 docs/formatdomain.html.in                     |  30 +++++
 docs/schemas/domaincommon.rng                 |  24 ++++
 src/conf/domain_conf.c                        | 114 +++++++++++++++++-
 src/conf/domain_conf.h                        |  11 ++
 src/conf/virconftypes.h                       |   3 +
 src/qemu/qemu_capabilities.c                  |   4 +
 src/qemu/qemu_capabilities.h                  |   3 +
 src/qemu/qemu_command.c                       |  38 ++++++
 src/qemu/qemu_validate.c                      |  38 ++++++
 src/security/security_dac.c                   |  14 +++
 src/security/security_selinux.c               |  13 ++
 src/security/virt-aa-helper.c                 |   6 +
 .../caps_2.10.0.aarch64.xml                   |   1 +
 .../caps_2.10.0.ppc64.xml                     |   1 +
 .../caps_2.10.0.s390x.xml                     |   1 +
 .../caps_2.10.0.x86_64.xml                    |   1 +
 .../caps_2.11.0.s390x.xml                     |   1 +
 .../caps_2.11.0.x86_64.xml                    |   1 +
 .../caps_2.12.0.aarch64.xml                   |   1 +
 .../caps_2.12.0.ppc64.xml                     |   1 +
 .../caps_2.12.0.s390x.xml                     |   1 +
 .../caps_2.12.0.x86_64.xml                    |   1 +
 .../caps_2.4.0.x86_64.xml                     |   1 +
 .../caps_2.5.0.x86_64.xml                     |   1 +
 .../caps_2.6.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_2.6.0.ppc64.xml |   1 +
 .../caps_2.6.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_2.7.0.s390x.xml |   1 +
 .../caps_2.7.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_2.8.0.s390x.xml |   1 +
 .../caps_2.8.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_2.9.0.ppc64.xml |   1 +
 .../qemucapabilitiesdata/caps_2.9.0.s390x.xml |   1 +
 .../caps_2.9.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml |   1 +
 .../caps_3.0.0.riscv32.xml                    |   1 +
 .../caps_3.0.0.riscv64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_3.0.0.s390x.xml |   1 +
 .../caps_3.0.0.x86_64.xml                     |   1 +
 .../qemucapabilitiesdata/caps_3.1.0.ppc64.xml |   1 +
 .../caps_3.1.0.x86_64.xml                     |   1 +
 .../caps_4.0.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_4.0.0.ppc64.xml |   1 +
 .../caps_4.0.0.riscv32.xml                    |   1 +
 .../caps_4.0.0.riscv64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_4.0.0.s390x.xml |   1 +
 .../caps_4.0.0.x86_64.xml                     |   1 +
 .../caps_4.1.0.x86_64.xml                     |   1 +
 .../caps_4.2.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml |   1 +
 .../qemucapabilitiesdata/caps_4.2.0.s390x.xml |   1 +
 .../caps_4.2.0.x86_64.xml                     |   1 +
 .../caps_5.0.0.aarch64.xml                    |   1 +
 .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml |   1 +
 .../caps_5.0.0.riscv64.xml                    |   1 +
 .../caps_5.0.0.x86_64.xml                     |   1 +
 .../caps_5.1.0.x86_64.xml                     |   1 +
 tests/qemuxml2argvdata/fw_cfg.args            |  32 +++++
 tests/qemuxml2argvdata/fw_cfg.xml             |  40 ++++++
 tests/qemuxml2argvtest.c                      |   1 +
 tests/qemuxml2xmloutdata/fw_cfg.xml           |   1 +
 tests/qemuxml2xmltest.c                       |   1 +
 62 files changed, 413 insertions(+), 5 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/fw_cfg.args
 create mode 100644 tests/qemuxml2argvdata/fw_cfg.xml
 create mode 120000 tests/qemuxml2xmloutdata/fw_cfg.xml

-- 
2.26.2

Re: [PATCH 0/6] Expose QEMU's -fw_cfg
Posted by Daniel P. Berrangé 3 years, 10 months ago
On Wed, Jun 03, 2020 at 07:01:32PM +0200, Michal Privoznik wrote:
> There was a discussion whether to do this or not:
> 
> https://www.redhat.com/archives/libvir-list/2020-May/msg00954.html
> 
> Before you start reviewing, naming is hard and I was unable to come up
> with a good element names and place, so suggestions are more than
> welcome!

Conceptually there's big overlap between SMBIOS and fwcfg, as they are
both data tables exposed by firmware at well defined location/format.

Currently we have use SMBIOS via 

  <sysinfo type='smbios'>
    ...SMBIOS info...
  </sysinfo>

It feels sensible to use that "type" attribute

  <sysinfo type='fwcfg'>
     ...fwcfg info...
  </sysinfo>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|