[libvirt] [PATCH v2 0/8] Fix some issues with rng grammar for output XML's,
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-May/msg01455.html
Update patches to add data into schema for examples that I could generate.
For the vpxmigr and vzmigr, I wasn't sure what the capabilityschemadata
should look like, so I left those out. Those are only validate in the
"right" environment when virCapabilitiesAddHostMigrateTransport is called.
John Ferlan (8):
schema: Add physical sizing grammer for storagevol grammar
schema: Remove xenmigr from host migrate transport capability
schema,tests: Use vpxmigr for host migrate transport capability
schema: Add rdma for host migrate transport capability
schema: Add vzmigr for host migrate transport capability
schema: Add microcode to capability grammar
schema: Fix capability grammar for pagesElem
schema: Add missing block data for nodedev
docs/schemas/capability.rng | 42 +++++++++++++++-------
docs/schemas/nodedev.rng | 13 +++++++
docs/schemas/storagevol.rng | 5 +++
tests/capabilityschemadata/caps-qemu-kvm.xml | 1 +
tests/capabilityschemadata/caps-test2.xml | 4 +++
tests/capabilityschemadata/caps-test3.xml | 7 ++++
tests/nodedevschemadata/DVD_with_media.xml | 2 ++
...ge_serial_3600c0ff000d7a2a5d463ff4902000000.xml | 2 ++
..._serial_SATA_HTS721010G9SA00_MPCZ12Y0GNGWSE.xml | 2 ++
tests/nodedevxml2xmltest.c | 22 ++++++++++++
tests/storagevolschemadata/qcow2-no-source.xml | 1 +
tests/vmx2xmltest.c | 2 +-
12 files changed, 89 insertions(+), 14 deletions(-)
--
2.14.3
6 years, 6 months
[libvirt] [REPOSTv2 PATCH v3 0/6] Add support for VM Generation ID (vmgenid)
by John Ferlan
Second reposting of:
https://www.redhat.com/archives/libvir-list/2018-May/msg00813.html
To update patches with more conflicts for patch 2 (capabilities) and
patch 6 (news)
Cover from the v3 posting:
v2: https://www.redhat.com/archives/libvir-list/2018-April/msg02234.html
Changes since v2:
* Essentially handle comments from code review of original series from
comments received for patch 6:
https://www.redhat.com/archives/libvir-list/2018-April/msg02240.html
It's a somewhat simplified approach removing the ABI checks and the
adjustment to the genid value as part of domain def copy.
* (NEW) Patch 5 - add a 'genid' domain capability (similar to how Cole
added support for vmcoreinfo). Since the apps need a way to determine
whether this is enabled, this seems to be the best way.
John Ferlan (6):
conf: Add VM Generation ID parse/format support
qemu: Add VM Generation ID device capability
qemu: Alter VM Generation ID for specific startup/launch transitions
qemu: Add VM Generation ID to qemu command line
domcaps: Add 'genid' to domain capabilities
docs: Add news article for VM Generation ID
docs/formatdomain.html.in | 27 +++++++++++
docs/formatdomaincaps.html.in | 7 ++-
docs/news.xml | 13 ++++++
docs/schemas/domaincaps.rng | 7 +++
docs/schemas/domaincommon.rng | 8 ++++
src/conf/domain_capabilities.c | 3 ++
src/conf/domain_capabilities.h | 1 +
src/conf/domain_conf.c | 54 ++++++++++++++++++++++
src/conf/domain_conf.h | 5 ++
src/qemu/qemu_capabilities.c | 4 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 24 ++++++++++
src/qemu/qemu_driver.c | 17 +++++--
src/qemu/qemu_process.c | 46 +++++++++++++++++-
src/qemu/qemu_process.h | 1 +
tests/domaincapsschemadata/basic.xml | 1 +
tests/domaincapsschemadata/bhyve_basic.x86_64.xml | 1 +
tests/domaincapsschemadata/bhyve_fbuf.x86_64.xml | 1 +
tests/domaincapsschemadata/bhyve_uefi.x86_64.xml | 1 +
tests/domaincapsschemadata/full.xml | 1 +
tests/domaincapsschemadata/libxl-xenfv-usb.xml | 1 +
tests/domaincapsschemadata/libxl-xenfv.xml | 1 +
tests/domaincapsschemadata/libxl-xenpv-usb.xml | 1 +
tests/domaincapsschemadata/libxl-xenpv.xml | 1 +
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 +
.../qemu_2.12.0-virt.aarch64.xml | 1 +
tests/domaincapsschemadata/qemu_2.12.0.ppc64.xml | 1 +
tests/domaincapsschemadata/qemu_2.12.0.s390x.xml | 1 +
tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml | 1 +
.../qemu_2.6.0-virt.aarch64.xml | 1 +
tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml | 1 +
tests/domaincapsschemadata/qemu_2.6.0.ppc64.xml | 1 +
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml | 1 +
tests/domaincapsschemadata/qemu_2.7.0.s390x.xml | 1 +
.../domaincapsschemadata/qemu_2.8.0-tcg.x86_64.xml | 1 +
tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 1 +
tests/domaincapsschemadata/qemu_2.8.0.x86_64.xml | 1 +
.../domaincapsschemadata/qemu_2.9.0-q35.x86_64.xml | 1 +
.../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 1 +
tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argvdata/genid-auto.x86_64-latest.args | 30 ++++++++++++
tests/qemuxml2argvdata/genid-auto.xml | 32 +++++++++++++
tests/qemuxml2argvdata/genid.x86_64-latest.args | 30 ++++++++++++
tests/qemuxml2argvdata/genid.xml | 32 +++++++++++++
tests/qemuxml2argvtest.c | 4 ++
tests/qemuxml2xmloutdata/genid-active.xml | 32 +++++++++++++
tests/qemuxml2xmloutdata/genid-auto-active.xml | 32 +++++++++++++
tests/qemuxml2xmloutdata/genid-auto-inactive.xml | 32 +++++++++++++
tests/qemuxml2xmloutdata/genid-inactive.xml | 32 +++++++++++++
tests/qemuxml2xmltest.c | 5 +-
53 files changed, 500 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxml2argvdata/genid-auto.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/genid-auto.xml
create mode 100644 tests/qemuxml2argvdata/genid.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/genid.xml
create mode 100644 tests/qemuxml2xmloutdata/genid-active.xml
create mode 100644 tests/qemuxml2xmloutdata/genid-auto-active.xml
create mode 100644 tests/qemuxml2xmloutdata/genid-auto-inactive.xml
create mode 100644 tests/qemuxml2xmloutdata/genid-inactive.xml
--
2.14.3
6 years, 6 months
[libvirt] [jenkins-ci PATCH] guests: Don't backup files when changing them
by Andrea Bolognani
Since our entire guest state is fully reproducible, keeping
backups around is not very useful; moreover, on CentOS 6 it
results in us hitting
https://github.com/ansible/ansible/issues/31982
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/tasks/bootloader.yml | 2 --
guests/tasks/jenkins.yml | 1 -
guests/tasks/users.yml | 2 --
3 files changed, 5 deletions(-)
diff --git a/guests/tasks/bootloader.yml b/guests/tasks/bootloader.yml
index face3dd..3de8c0d 100644
--- a/guests/tasks/bootloader.yml
+++ b/guests/tasks/bootloader.yml
@@ -19,7 +19,6 @@
path: /etc/default/grub
regexp: '^{{ item.key }}=.*$'
line: '{{ item.key }}="{{ item.value }}"'
- backup: yes
with_items:
- { key: 'GRUB_TIMEOUT', value: '1' }
- { key: 'GRUB_CMDLINE_LINUX_DEFAULT', value: 'console=ttyS0' }
@@ -45,7 +44,6 @@
regexp: '^{{ item.key }}=.*$'
line: '{{ item.key }}="{{ item.value }}"'
create: yes
- backup: yes
with_items:
- { key: 'console', value: 'comconsole' }
- { key: 'autoboot_delay', value: '1' }
diff --git a/guests/tasks/jenkins.yml b/guests/tasks/jenkins.yml
index 10aeec7..9076c34 100644
--- a/guests/tasks/jenkins.yml
+++ b/guests/tasks/jenkins.yml
@@ -23,7 +23,6 @@
lineinfile:
path: /etc/rc.local
create: yes
- backup: yes
regexp: '^nohup.*jenkins.*java.*slave\.jar.*&$'
line: "nohup {{ su }} - jenkins -c '{{ java }} -jar /home/jenkins/slave.jar -jnlpUrl \"{{ jenkins_url }}\" -secret \"{{ jenkins_secret }}\"' >/var/log/jenkins.log 2>&1 &"
insertbefore: '^exit .*$'
diff --git a/guests/tasks/users.yml b/guests/tasks/users.yml
index 033ca2a..0aa6230 100644
--- a/guests/tasks/users.yml
+++ b/guests/tasks/users.yml
@@ -17,7 +17,6 @@
regexp: '^#*\s*PermitRootLogin\s*.*$'
line: 'PermitRootLogin without-password'
state: present
- backup: yes
- name: '{{ flavor }}: Create user account'
user:
@@ -46,7 +45,6 @@
path: '{{ sudoers }}'
line: '{{ flavor }} ALL=(ALL) NOPASSWD: ALL'
state: present
- backup: yes
validate: 'visudo -cf %s'
when:
- flavor == 'test'
--
2.17.0
6 years, 6 months
[libvirt] [PATCH] spec: Enable libssh on future RHEL
by Jiri Denemark
Future RHEL will certainly be modern enough to support libssh.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 0e4a84c98c..5e1e1df3f0 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -191,7 +191,7 @@
%endif
# Enable libssh transport for new enough distros
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} > 7
%define with_libssh 0%{!?_without_libssh:1}
%endif
--
2.17.0
6 years, 6 months
[libvirt] [PATCH] disk: Allow settling to occur after reading partitions
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1400475
In order to avoid a possible error as a result of kernel interactions
with the partition helper, let's use virWaitForDevices to force things
to settle down before attempting to open and read the partition. This
is related to https://bugzilla.redhat.com/show_bug.cgi?id=1264719.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
NB: This also resolves issues seen while testing the patch with using
pool-refresh "frequently" on the disk pool. Perhaps the timing of
things has changed enough that it'd be see more often now. At least
with the f26 test system I used.
BTW: The other option proposed long ago, but rejected was adding
a timeout loop. I've also run the python script from the other
bz with 100% success.
src/storage/storage_backend_disk.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 7b4549c34d..2e3d1e04a4 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -183,7 +183,16 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool,
* after an extended partition is created an open on the extended
* partition will fail, so pass the NOERROR flag and only error if a
* -1 was returned indicating some other error than an open error.
+ *
+ * NB: A small window exists in some cases where the just created
+ * partition disappears, but then reappears. Since we were given
+ * vol->target.path from parthelper, let's just be sure that any
+ * kernel magic that occurs as a result of parthelper doesn't cause
+ * us to fail with some sort of ENOENT failure since that would be
+ * quite "unexpected". So rather than just fail, let's use the
+ * virWaitForDevices to ensure everything has settled properly.
*/
+ virWaitForDevices();
if (vol->source.partType == VIR_STORAGE_VOL_DISK_TYPE_EXTENDED) {
if (virStorageBackendUpdateVolInfo(vol, false,
VIR_STORAGE_VOL_OPEN_DEFAULT |
--
2.14.3
6 years, 6 months
[libvirt] [PATCH] news: Add the event name completion
by Lin Ma
Signed-off-by: Lin Ma <lma(a)suse.com>
---
docs/news.xml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 76d1613d35..693d4a373b 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -84,6 +84,15 @@
and ich9 sound devices.
</description>
</change>
+ <change>
+ <summary>
+ virsh: Enhance event name completion
+ </summary>
+ <description>
+ Implement event name completion for some commands (e.g. event,
+ secret-event, pool-event and nodedev-event)
+ </description>
+ </change>
</section>
<section title="Bug fixes">
</section>
--
2.16.2
6 years, 6 months
[libvirt] [qemu PATCH v2] docs/interop: add "firmware.json"
by 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 one possible use case / feature set,
- configuration bits that are required to run the firmware binary.
In addition, define rules for management apps for picking the highest
priority firmware JSON file when multiple such files match the search
criteria.
Cc: "Daniel P. Berrange" <berrange(a)redhat.com>
Cc: David Gibson <dgibson(a)redhat.com>
Cc: Eric Blake <eblake(a)redhat.com>
Cc: Gerd Hoffmann <kraxel(a)redhat.com>
Cc: Kashyap Chamarthy <kchamart(a)redhat.com>
Cc: Markus Armbruster <armbru(a)redhat.com>
Cc: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: Thomas Huth <thuth(a)redhat.com>
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Notes:
PATCHv2:
- previous version (PATCHv1) was posted at:
<http://mid.mail-archive.com/20180509150431.4979-1-lersek@redhat.com>
<https://www.redhat.com/archives/libvir-list/2018-May/msg00612.html>
- drop @x-check-firmware for good
PATCH:
- previous version (RFCv3) was posted at:
<http://mid.mail-archive.com/20180420231246.23130-4-lersek@redhat.com>
- move "firmware.json" under docs/interop/; drop earlier development
artifacts
- no changes to the schema (received no comments on RFCv3)
RFCv3:
- Previous version (RFCv2) was posted at:
<http://mid.mail-archive.com/20180417224054.26363-1-lersek@redhat.com>
- Trim the CC list a little.
- Wrap to a 72-char margin, for an easier reading. [Markus]
- Run spell-checker. [Markus]
- Rename @FirmwareType to @FirmwareOSInterface, to better express the
concept. Update the enum constants accordingly (incl. documentation);
in particular replace @slof with @openfirmware. Rename the @type field
in @Firmware to @interface-type. [David, Gerd, Paolo, Thomas]
- Better yet, rename @interface-type to @interface-types (plural), and
turn it into a list of @FirmwareOSInterface entries, to express an
ordered compat list with multiple firmware<->OS interface types. [Dan,
Eric, Gerd, Paolo]
- Drop @FirmwareArchitecture, and switch the type of
@FirmwareTarget.@architecture to @SysEmuTarget (now defined in
"common.json"). [Dan, Gerd, Markus]
- Switch elements of @FirmwareTarget.@machines from aliases ("pc",
"q35", "virt") to concrete machine types, with glob patterns
understood. [Dan, Gerd]
- Rename @secure-boot-enrolled-keys to @enrolled-keys, and drop the
dependency on @secure-boot in its documentation. [Gerd]
- Describe the firmware JSON directories and the search rules to
management apps, under the @Firmware element. Relatedly, remove the
language on any concrete certificates under @enrolled-keys, as these
can be customized through the overrides. Also refresh the commit
message. [Dan, Gerd]
- Rename @pathname fields to @filename. [Markus]
- Don't replace "@executable.@filename" with "@executable.filename"
(that is, keep the second @ sign), because removing the 2nd @ sign
messes up the documentation ("filename" stops being type-set in
monospace in the HTML, for example). [Markus]
- Rename @nvram_template to @nvram-template. [Thomas]
- Keep @x-check-firmware for a while longer. [Dan, Gerd, Markus, Paolo]
RFCv2:
- previous version (RFCv1) was posted at
<http://mid.mail-archive.com/20180407000117.25640-1-lersek@redhat.com>
- v2 is basically a rewrite from scratch, starting out with Dan's
definitions from
<http://mid.mail-archive.com/20180410102033.GL5155@redhat.com> and
<http://mid.mail-archive.com/20180410110357.GP5155@redhat.com>,
hopefully addressing others' feedback as well
RFCv1:
- Folks on the CC list, please try to see if the suggested schema is
flexible enough to describe the virtual firmware(s) that you are
familiar with. Thanks!
docs/interop/firmware.json | 540 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 540 insertions(+)
create mode 100644 docs/interop/firmware.json
diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
new file mode 100644
index 000000000000..5e91aab8df1c
--- /dev/null
+++ b/docs/interop/firmware.json
@@ -0,0 +1,540 @@
+# -*- Mode: Python -*-
+#
+# Copyright (C) 2018 Red Hat, Inc.
+#
+# Authors:
+# Daniel P. Berrange <berrange(a)redhat.com>
+# Laszlo Ersek <lersek(a)redhat.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later. See the COPYING file in the top-level directory.
+
+##
+# = Firmware
+##
+
+{ 'include' : 'common.json' }
+{ 'include' : 'block-core.json' }
+
+##
+# @FirmwareOSInterface:
+#
+# Lists the firmware-OS interface types provided by various firmware
+# that is commonly used with QEMU virtual machines.
+#
+# @bios: Traditional x86 BIOS interface. For example, firmware built
+# from the SeaBIOS project usually provides this interface.
+#
+# @openfirmware: The interface is defined by the (historical) IEEE
+# 1275-1994 standard. Examples for firmware projects that
+# provide this interface are: OpenBIOS, OpenHackWare,
+# SLOF.
+#
+# @uboot: Firmware interface defined by the U-Boot project.
+#
+# @uefi: Firmware interface defined by the UEFI specification. For
+# example, firmware built from the edk2 (EFI Development Kit II)
+# project usually provides this interface.
+#
+# Since: 2.13
+##
+{ 'enum' : 'FirmwareOSInterface',
+ 'data' : [ 'bios', 'openfirmware', 'uboot', 'uefi' ] }
+
+##
+# @FirmwareDevice:
+#
+# Defines the device types that firmware can be mapped into.
+#
+# @flash: The firmware executable and its accompanying NVRAM file are to
+# be mapped into a pflash chip each.
+#
+# @kernel: The firmware is to be loaded like a Linux kernel. This is
+# similar to @memory but may imply additional processing that
+# is specific to the target architecture and machine type.
+#
+# @memory: The firmware is to be mapped into memory.
+#
+# Since: 2.13
+##
+{ 'enum' : 'FirmwareDevice',
+ 'data' : [ 'flash', 'kernel', 'memory' ] }
+
+##
+# @FirmwareTarget:
+#
+# Defines the machine types that firmware may execute on.
+#
+# @architecture: Determines the emulation target (the QEMU system
+# emulator) that can execute the firmware.
+#
+# @machines: Lists the machine types (known by the emulator that is
+# specified through @architecture) that can execute the
+# firmware. Elements of @machines are supposed to be concrete
+# machine types, not aliases. Glob patterns are understood,
+# which is especially useful for versioned machine types.
+# (For example, the glob pattern "pc-i440fx-*" matches
+# "pc-i440fx-2.12".) On the QEMU command line, "-machine
+# type=..." specifies the requested machine type (but that
+# option does not accept glob patterns).
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareTarget',
+ 'data' : { 'architecture' : 'SysEmuTarget',
+ 'machines' : [ 'str' ] } }
+
+##
+# @FirmwareFeature:
+#
+# Defines the features that firmware may support, and the platform
+# requirements that firmware may present.
+#
+# @acpi-s3: The firmware supports S3 sleep (suspend to RAM), as defined
+# in the ACPI specification. On the "pc-i440fx-*" machine
+# types of the @i386 and @x86_64 emulation targets, S3 can be
+# enabled with "-global PIIX4_PM.disable_s3=0" and disabled
+# with "-global PIIX4_PM.disable_s3=1". On the "pc-q35-*"
+# machine types of the @i386 and @x86_64 emulation targets, S3
+# can be enabled with "-global ICH9-LPC.disable_s3=0" and
+# disabled with "-global ICH9-LPC.disable_s3=1".
+#
+# @acpi-s4: The firmware supports S4 hibernation (suspend to disk), as
+# defined in the ACPI specification. On the "pc-i440fx-*"
+# machine types of the @i386 and @x86_64 emulation targets, S4
+# can be enabled with "-global PIIX4_PM.disable_s4=0" and
+# disabled with "-global PIIX4_PM.disable_s4=1". On the
+# "pc-q35-*" machine types of the @i386 and @x86_64 emulation
+# targets, S4 can be enabled with "-global
+# ICH9-LPC.disable_s4=0" and disabled with "-global
+# ICH9-LPC.disable_s4=1".
+#
+# @amd-sev: The firmware supports running under AMD Secure Encrypted
+# Virtualization, as specified in the AMD64 Architecture
+# Programmer's Manual. QEMU command line options related to
+# this feature are documented in
+# "docs/amd-memory-encryption.txt".
+#
+# @enrolled-keys: The variable store (NVRAM) template associated with
+# the firmware binary has the UEFI Secure Boot
+# operational mode turned on, with certificates
+# enrolled.
+#
+# @requires-smm: The firmware requires the platform to emulate SMM
+# (System Management Mode), as defined in the AMD64
+# Architecture Programmer's Manual, and in the Intel(R)64
+# and IA-32 Architectures Software Developer's Manual. On
+# the "pc-q35-*" machine types of the @i386 and @x86_64
+# emulation targets, SMM emulation can be enabled with
+# "-machine smm=on". (On the "pc-q35-*" machine types of
+# the @i386 emulation target, @requires-smm presents
+# further CPU requirements; one combination known to work
+# is "-cpu coreduo,-nx".) If the firmware is marked as
+# both @secure-boot and @requires-smm, then write
+# accesses to the pflash chip (NVRAM) that holds the UEFI
+# variable store must be restricted to code that executes
+# in SMM, using the additional option "-global
+# driver=cfi.pflash01,property=secure,value=on".
+# Furthermore, a large guest-physical address space
+# (comprising guest RAM, memory hotplug range, and 64-bit
+# PCI MMIO aperture), and/or a high VCPU count, may
+# present high SMRAM requirements from the firmware. On
+# the "pc-q35-*" machine types of the @i386 and @x86_64
+# emulation targets, the SMRAM size may be increased
+# above the default 16MB with the "-global
+# mch.extended-tseg-mbytes=uint16" option. As a rule of
+# thumb, the default 16MB size suffices for 1TB of
+# guest-phys address space and a few tens of VCPUs; for
+# every further TB of guest-phys address space, add 8MB
+# of SMRAM. 48MB should suffice for 4TB of guest-phys
+# address space and 2-3 hundred VCPUs.
+#
+# @secure-boot: The firmware implements the software interfaces for UEFI
+# Secure Boot, as defined in the UEFI specification. Note
+# that without @requires-smm, guest code running with
+# kernel privileges can undermine the security of Secure
+# Boot.
+#
+# @verbose-dynamic: When firmware log capture is enabled, the firmware
+# logs a large amount of debug messages, which may
+# impact boot performance. With log capture disabled,
+# there is no boot performance impact. On the
+# "pc-i440fx-*" and "pc-q35-*" machine types of the
+# @i386 and @x86_64 emulation targets, firmware log
+# capture can be enabled with the QEMU command line
+# options "-chardev file,id=fwdebug,path=LOGFILEPATH
+# -device isa-debugcon,iobase=0x402,chardev=fwdebug".
+# @verbose-dynamic is mutually exclusive with
+# @verbose-static.
+#
+# @verbose-static: The firmware unconditionally produces a large amount
+# of debug messages, which may impact boot performance.
+# This feature may typically be carried by certain UEFI
+# firmware for the "virt-*" machine types of the @arm
+# and @aarch64 emulation targets, where the debug
+# messages are written to the first (always present)
+# PL011 UART. @verbose-static is mutually exclusive
+# with @verbose-dynamic.
+#
+# Since: 2.13
+##
+{ 'enum' : 'FirmwareFeature',
+ 'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'enrolled-keys',
+ 'requires-smm', 'secure-boot', 'verbose-dynamic',
+ 'verbose-static' ] }
+
+##
+# @FirmwareFlashFile:
+#
+# Defines common properties that are necessary for loading a firmware
+# file into a pflash chip. The corresponding QEMU command line option is
+# "-drive file=@filename,format=@format". Note however that the
+# option-argument shown here is incomplete; it is completed under
+# @FirmwareMappingFlash.
+#
+# @filename: Specifies the filename on the host filesystem where the
+# firmware file can be found.
+#
+# @format: Specifies the block format of the file pointed-to by
+# @filename, such as @raw or @qcow2.
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareFlashFile',
+ 'data' : { 'filename' : 'str',
+ 'format' : 'BlockdevDriver' } }
+
+##
+# @FirmwareMappingFlash:
+#
+# Describes loading and mapping properties for the firmware executable
+# and its accompanying NVRAM file, when @FirmwareDevice is @flash.
+#
+# @executable: Identifies the firmware executable. The firmware
+# executable may be shared by multiple virtual machine
+# definitions. The corresponding QEMU command line option
+# is "-drive
+# if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.(a)format".
+#
+# @nvram-template: Identifies the NVRAM template compatible with
+# @executable. Management software instantiates an
+# individual copy -- a specific NVRAM file -- from
+# @nvram-template.@filename for each new virtual
+# machine definition created. @nvram-template.@filename
+# itself is never mapped into virtual machines, only
+# individual copies of it are. An NVRAM file is
+# typically used for persistently storing the
+# non-volatile UEFI variables of a virtual machine
+# definition. The corresponding QEMU command line
+# option is "-drive
+# if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.(a)format".
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareMappingFlash',
+ 'data' : { 'executable' : 'FirmwareFlashFile',
+ 'nvram-template' : 'FirmwareFlashFile' } }
+
+##
+# @FirmwareMappingKernel:
+#
+# Describes loading and mapping properties for the firmware executable,
+# when @FirmwareDevice is @kernel.
+#
+# @filename: Identifies the firmware executable. The firmware executable
+# may be shared by multiple virtual machine definitions. The
+# corresponding QEMU command line option is "-kernel
+# @filename".
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareMappingKernel',
+ 'data' : { 'filename' : 'str' } }
+
+##
+# @FirmwareMappingMemory:
+#
+# Describes loading and mapping properties for the firmware executable,
+# when @FirmwareDevice is @memory.
+#
+# @filename: Identifies the firmware executable. The firmware executable
+# may be shared by multiple virtual machine definitions. The
+# corresponding QEMU command line option is "-bios
+# @filename".
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareMappingMemory',
+ 'data' : { 'filename' : 'str' } }
+
+##
+# @FirmwareMapping:
+#
+# Provides a discriminated structure for firmware to describe its
+# loading / mapping properties.
+#
+# @device: Selects the device type that the firmware must be mapped
+# into.
+#
+# Since: 2.13
+##
+{ 'union' : 'FirmwareMapping',
+ 'base' : { 'device' : 'FirmwareDevice' },
+ 'discriminator' : 'device',
+ 'data' : { 'flash' : 'FirmwareMappingFlash',
+ 'kernel' : 'FirmwareMappingKernel',
+ 'memory' : 'FirmwareMappingMemory' } }
+
+##
+# @Firmware:
+#
+# Describes a firmware (or a firmware use case) to management software.
+#
+# It is possible for multiple @Firmware elements to match the search
+# criteria of management software. Applications thus need rules to pick
+# one of the many matches, and users need the ability to override distro
+# defaults.
+#
+# It is recommended to create firmware JSON files (each containing a
+# single @Firmware root element) with a double-digit prefix, for example
+# "50-ovmf.json", "50-seabios-256k.json", etc, so they can be sorted in
+# predictable order. The firmware JSON files should be searched for in
+# three directories:
+#
+# - /usr/share/qemu/firmware -- populated by distro-provided firmware
+# packages (XDG_DATA_DIRS covers
+# /usr/share by default),
+#
+# - /etc/qemu/firmware -- exclusively for sysadmins' local additions,
+#
+# - $XDG_CONFIG_HOME/qemu/firmware -- exclusively for per-user local
+# additions (XDG_CONFIG_HOME
+# defaults to $HOME/.config).
+#
+# Top-down, the list of directories goes from general to specific.
+#
+# Management software should build a list of files from all three
+# locations, then sort the list by filename (i.e., last pathname
+# component). Management software should choose the first JSON file on
+# the sorted list that matches the search criteria. If a more specific
+# directory has a file with same name as a less specific directory, then
+# the file in the more specific directory takes effect. If the more
+# specific file is zero length, it hides the less specific one.
+#
+# For example, if a distro ships
+#
+# - /usr/share/qemu/firmware/50-ovmf.json
+#
+# - /usr/share/qemu/firmware/50-seabios-256k.json
+#
+# then the sysadmin can prevent the default OVMF being used at all with
+#
+# $ touch /etc/qemu/firmware/50-ovmf.json
+#
+# The sysadmin can replace/alter the distro default OVMF with
+#
+# $ vim /etc/qemu/firmware/50-ovmf.json
+#
+# or they can provide a parallel OVMF with higher priority
+#
+# $ vim /etc/qemu/firmware/10-ovmf.json
+#
+# or they can provide a parallel OVMF with lower priority
+#
+# $ vim /etc/qemu/firmware/99-ovmf.json
+#
+# @description: Provides a human-readable description of the firmware.
+# Management software may or may not display @description.
+#
+# @interface-types: Lists the types of interfaces that the firmware can
+# expose to the guest OS. This is a non-empty, ordered
+# list; entries near the beginning of @interface-types
+# are considered more native to the firmware, and/or
+# to have a higher quality implementation in the
+# firmware, than entries near the end of
+# @interface-types.
+#
+# @mapping: Describes the loading / mapping properties of the firmware.
+#
+# @targets: Collects the target architectures (QEMU system emulators)
+# and their machine types that may execute the firmware.
+#
+# @features: Lists the features that the firmware supports, and the
+# platform requirements it presents.
+#
+# @tags: A list of auxiliary strings associated with the firmware for
+# which @description is not appropriate, due to the latter's
+# possible exposure to the end-user. @tags serves development and
+# debugging purposes only, and management software shall
+# explicitly ignore it.
+#
+# Since: 2.13
+#
+# Examples:
+#
+# {
+# "description": "SeaBIOS",
+# "interface-types": [
+# "bios"
+# ],
+# "mapping": {
+# "device": "memory",
+# "filename": "/usr/share/seabios/bios-256k.bin"
+# },
+# "targets": [
+# {
+# "architecture": "i386",
+# "machines": [
+# "pc-i440fx-*",
+# "pc-q35-*"
+# ]
+# },
+# {
+# "architecture": "x86_64",
+# "machines": [
+# "pc-i440fx-*",
+# "pc-q35-*"
+# ]
+# }
+# ],
+# "features": [
+# "acpi-s3",
+# "acpi-s4"
+# ],
+# "tags": [
+# "CONFIG_BOOTSPLASH=n",
+# "CONFIG_ROM_SIZE=256",
+# "CONFIG_USE_SMM=n"
+# ]
+# }
+#
+# {
+# "description": "OVMF with SB+SMM, empty varstore",
+# "interface-types": [
+# "uefi"
+# ],
+# "mapping": {
+# "device": "flash",
+# "executable": {
+# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
+# "format": "raw"
+# },
+# "nvram-template": {
+# "filename": "/usr/share/OVMF/OVMF_VARS.fd",
+# "format": "raw"
+# }
+# },
+# "targets": [
+# {
+# "architecture": "x86_64",
+# "machines": [
+# "pc-q35-*"
+# ]
+# }
+# ],
+# "features": [
+# "acpi-s3",
+# "amd-sev",
+# "requires-smm",
+# "secure-boot",
+# "verbose-dynamic"
+# ],
+# "tags": [
+# "-a IA32",
+# "-a X64",
+# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
+# "-t GCC48",
+# "-b DEBUG",
+# "-D SMM_REQUIRE",
+# "-D SECURE_BOOT_ENABLE",
+# "-D FD_SIZE_4MB"
+# ]
+# }
+#
+# {
+# "description": "OVMF with SB+SMM, SB enabled, MS certs enrolled",
+# "interface-types": [
+# "uefi"
+# ],
+# "mapping": {
+# "device": "flash",
+# "executable": {
+# "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
+# "format": "raw"
+# },
+# "nvram-template": {
+# "filename": "/usr/share/OVMF/OVMF_VARS.secboot.fd",
+# "format": "raw"
+# }
+# },
+# "targets": [
+# {
+# "architecture": "x86_64",
+# "machines": [
+# "pc-q35-*"
+# ]
+# }
+# ],
+# "features": [
+# "acpi-s3",
+# "amd-sev",
+# "enrolled-keys",
+# "requires-smm",
+# "secure-boot",
+# "verbose-dynamic"
+# ],
+# "tags": [
+# "-a IA32",
+# "-a X64",
+# "-p OvmfPkg/OvmfPkgIa32X64.dsc",
+# "-t GCC48",
+# "-b DEBUG",
+# "-D SMM_REQUIRE",
+# "-D SECURE_BOOT_ENABLE",
+# "-D FD_SIZE_4MB"
+# ]
+# }
+#
+# {
+# "description": "UEFI firmware for ARM64 virtual machines",
+# "interface-types": [
+# "uefi"
+# ],
+# "mapping": {
+# "device": "flash",
+# "executable": {
+# "filename": "/usr/share/AAVMF/AAVMF_CODE.fd",
+# "format": "raw"
+# },
+# "nvram-template": {
+# "filename": "/usr/share/AAVMF/AAVMF_VARS.fd",
+# "format": "raw"
+# }
+# },
+# "targets": [
+# {
+# "architecture": "aarch64",
+# "machines": [
+# "virt-*"
+# ]
+# }
+# ],
+# "features": [
+#
+# ],
+# "tags": [
+# "-a AARCH64",
+# "-p ArmVirtPkg/ArmVirtQemu.dsc",
+# "-t GCC48",
+# "-b DEBUG",
+# "-D DEBUG_PRINT_ERROR_LEVEL=0x80000000"
+# ]
+# }
+##
+{ 'struct' : 'Firmware',
+ 'data' : { 'description' : 'str',
+ 'interface-types' : [ 'FirmwareOSInterface' ],
+ 'mapping' : 'FirmwareMapping',
+ 'targets' : [ 'FirmwareTarget' ],
+ 'features' : [ 'FirmwareFeature' ],
+ 'tags' : [ 'str' ] } }
--
2.14.1.3.gb7cf6e02401b
6 years, 6 months
[libvirt] [PATCH 0/5] qemu: refactor device post parse callback
by Peter Krempa
Main idea was to split the disk code since I'll be changing it later but
as I was at it I refactored everything.
Peter Krempa (5):
qemu: domain: Extract disk post parse code into a function
qemu: domain: Extract network device def post parse code
qemu: domain: Extract video device def post parse code
qemu: domain: Extract panic device def post parse code
qemu: domain: Use typecasted enum in qemuDomainDeviceDefPostParse
src/qemu/qemu_domain.c | 219 ++++++++++++++++++++++++++++++++-----------------
1 file changed, 144 insertions(+), 75 deletions(-)
--
2.16.2
6 years, 6 months
Re: [libvirt] [PATCH v2 0/3] adding virGetLastErrorCode/Domain to paritally replace virGetLastError
by Ramy Elkest
Patch looks good, many thanks Eric.
Ramy
On Wed, May 9, 2018 at 12:58 PM, Erik Skultety <eskultet(a)redhat.com> wrote:
> On Sat, May 05, 2018 at 01:04:18PM +0100, ramyelkest wrote:
>> Changes from v1[1]:
>>
>> * removed virHasLastError() and s/virHasLastError/virGetLastErrorCode/g
>> * replaced in missed files: virmodule.c and virnetlibsshsession.c
>> * better split of patches
>>
>> [1] https://www.redhat.com/archives/libvir-list/2018-May/msg00259.html
>>
>> ramyelkest (3):
>> util: cleanup: using virGetLastErrorMessage instead of err->message
>> util: added virGetLastErrorCode/Domain
>> all: replacing virGetLastError with virGetLastErrorCode where we can
>
> I suggested some minor adjustments to your patches without the need for a v3,
> so let me know if you agree and I'll merge the series.
>
> Erik
6 years, 6 months
[libvirt] [PATCH v2] Fix indentation of virshAllocpagesPagesizeCompleter arguments.
by Roland Schulz
Signed-off-by: Roland Schulz <schullzroll(a)gmail.com>
---
tools/virsh-completer.c | 4 ++--
tools/virsh-completer.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index cbd5326d0..1df4d55af 100644
--- a/tools/virsh-completer.c
+++ b/tools/virsh-completer.c
@@ -568,8 +568,8 @@ virshSnapshotNameCompleter(vshControl *ctl,
char **
virshAllocpagesPagesizeCompleter(vshControl *ctl,
- const vshCmd *cmd ATTRIBUTE_UNUSED,
- unsigned int flags)
+ const vshCmd *cmd ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
unsigned long long byteval = 0;
xmlXPathContextPtr ctxt = NULL;
diff --git a/tools/virsh-completer.h b/tools/virsh-completer.h
index c7b181879..8e4d46394 100644
--- a/tools/virsh-completer.h
+++ b/tools/virsh-completer.h
@@ -75,7 +75,7 @@ char ** virshSnapshotNameCompleter(vshControl *ctl,
unsigned int flags);
char ** virshAllocpagesPagesizeCompleter(vshControl *ctl,
- const vshCmd *cmd,
- unsigned int flags);
+ const vshCmd *cmd,
+ unsigned int flags);
#endif
--
2.17.0
6 years, 6 months