[PATCH v2] ui: Make the DisplayType enum entries conditional
by Thomas Huth
Libvirt's "domcapabilities" command has a way to state whether certain
graphic frontends are available in QEMU or not. Originally, libvirt
looked at the "--help" output of the QEMU binary to determine whether
SDL was available or not (by looking for the "-sdl" parameter in the
help text), but since libvirt stopped doing this analysis of the help
text, the detection of SDL is currently broken, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1790902
QEMU should provide a way via the QMP interface instead. A simple way,
without introducing additional commands, is to make the DisplayType
enum entries conditional, so that the enum only contains the entries if
the corresponding CONFIG_xxx switches have been set. This of course
only gives an indication which possibilities have been enabled during
compile-time of QEMU (and does not take into account whether modules
are later available or not for example - for this we'd need a separate
command), but anyway, this should already be good enough for the above
bug ticket, and it's a good idea anyway to make the QMP interface
conditional here, so let's simply do it.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
v2: Make gtk, curses and egl also conditional
qapi/ui.json | 23 +++++++++++++++++------
softmmu/vl.c | 20 +++++++++++++++++---
ui/console.c | 8 +++++++-
3 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/qapi/ui.json b/qapi/ui.json
index 1052ca9c38..6a667a0abf 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1126,9 +1126,16 @@
#
##
{ 'enum' : 'DisplayType',
- 'data' : [ 'default', 'none', 'gtk', 'sdl',
- 'egl-headless', 'curses', 'cocoa',
- 'spice-app'] }
+ 'data' : [
+ { 'name': 'default' },
+ { 'name': 'none' },
+ { 'name': 'gtk', 'if': 'defined(CONFIG_GTK)' },
+ { 'name': 'sdl', 'if': 'defined(CONFIG_SDL)' },
+ { 'name': 'egl-headless',
+ 'if': 'defined(CONFIG_OPENGL) && defined(CONFIG_GBM)' },
+ { 'name': 'curses', 'if': 'defined(CONFIG_CURSES)' },
+ { 'name': 'cocoa', 'if': 'defined(CONFIG_COCOA)' },
+ { 'name': 'spice-app', 'if': 'defined(CONFIG_SPICE)'} ] }
##
# @DisplayOptions:
@@ -1152,9 +1159,13 @@
'*show-cursor' : 'bool',
'*gl' : 'DisplayGLMode' },
'discriminator' : 'type',
- 'data' : { 'gtk' : 'DisplayGTK',
- 'curses' : 'DisplayCurses',
- 'egl-headless' : 'DisplayEGLHeadless'} }
+ 'data' : {
+ 'gtk': { 'type': 'DisplayGTK', 'if': 'defined(CONFIG_GTK)' },
+ 'curses': { 'type': 'DisplayCurses', 'if': 'defined(CONFIG_CURSES)' },
+ 'egl-headless': { 'type': 'DisplayEGLHeadless',
+ 'if': 'defined(CONFIG_OPENGL) && defined(CONFIG_GBM)' }
+ }
+}
##
# @query-display-options:
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 326c1e9080..fc103c2cb2 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1068,6 +1068,7 @@ static void parse_display(const char *p)
* Not clear yet what happens to them long-term. Should
* replaced by something better or deprecated and dropped.
*/
+#if defined(CONFIG_SDL)
dpy.type = DISPLAY_TYPE_SDL;
while (*opts) {
const char *nextopt;
@@ -1131,6 +1132,10 @@ static void parse_display(const char *p)
}
opts = nextopt;
}
+#else
+ error_report("SDL display supported is not available in this binary");
+ exit(1);
+#endif
} else if (strstart(p, "vnc", &opts)) {
/*
* vnc isn't a (local) DisplayType but a protocol for remote
@@ -1867,13 +1872,22 @@ static void qemu_apply_machine_options(void)
static void qemu_create_early_backends(void)
{
MachineClass *machine_class = MACHINE_GET_CLASS(current_machine);
+#if defined(CONFIG_SDL)
+ const bool use_sdl = (dpy.type == DISPLAY_TYPE_SDL);
+#else
+ const bool use_sdl = false;
+#endif
+#if defined(CONFIG_GTK)
+ const bool use_gtk = (dpy.type == DISPLAY_TYPE_GTK);
+#else
+ const bool use_gtk = false;
+#endif
- if ((alt_grab || ctrl_grab) && dpy.type != DISPLAY_TYPE_SDL) {
+ if ((alt_grab || ctrl_grab) && !use_sdl) {
error_report("-alt-grab and -ctrl-grab are only valid "
"for SDL, ignoring option");
}
- if (dpy.has_window_close &&
- (dpy.type != DISPLAY_TYPE_GTK && dpy.type != DISPLAY_TYPE_SDL)) {
+ if (dpy.has_window_close && !use_gtk && !use_sdl) {
error_report("-no-quit is only valid for GTK and SDL, "
"ignoring option");
}
diff --git a/ui/console.c b/ui/console.c
index 2de5f4105b..1103b65314 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2370,13 +2370,19 @@ void qemu_display_register(QemuDisplay *ui)
bool qemu_display_find_default(DisplayOptions *opts)
{
static DisplayType prio[] = {
+#if defined(CONFIG_GTK)
DISPLAY_TYPE_GTK,
+#endif
+#if defined(CONFIG_SDL)
DISPLAY_TYPE_SDL,
+#endif
+#if defined(CONFIG_COCOA)
DISPLAY_TYPE_COCOA
+#endif
};
int i;
- for (i = 0; i < ARRAY_SIZE(prio); i++) {
+ for (i = 0; i < (int)ARRAY_SIZE(prio); i++) {
if (dpys[prio[i]] == NULL) {
ui_module_load_one(DisplayType_str(prio[i]));
}
--
2.27.0
3 years, 5 months
[PATCH] ci: Also perform `brew upgrade` on MacOS
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
@Andrea: if you have a good explanation you'd like to put in the commit message,
I'd me glad to add it (or you can do that as well). Thanks
.gitlab-ci.yml | 2 ++
ci/cirrus/build.yml | 1 +
2 files changed, 3 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b5930a0a46d5..6097047d9215 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -115,6 +115,7 @@ stages:
-e "s|[@]CIRRUS_VM_IMAGE_SELECTOR@|$CIRRUS_VM_IMAGE_SELECTOR|g"
-e "s|[@]CIRRUS_VM_IMAGE_NAME@|$CIRRUS_VM_IMAGE_NAME|g"
-e "s|[@]UPDATE_COMMAND@|$UPDATE_COMMAND|g"
+ -e "s|[@]UPGRADE_COMMAND@|$UPGRADE_COMMAND|g"
-e "s|[@]INSTALL_COMMAND@|$INSTALL_COMMAND|g"
-e "s|[@]PATH@|$PATH_EXTRA${PATH_EXTRA:+:}\$PATH|g"
-e "s|[@]PKG_CONFIG_PATH@|$PKG_CONFIG_PATH|g"
@@ -443,6 +444,7 @@ x64-macos-11-build:
CIRRUS_VM_IMAGE_SELECTOR: image
CIRRUS_VM_IMAGE_NAME: big-sur-base
UPDATE_COMMAND: brew update
+ UPGRADE_COMMAND: brew upgrade
INSTALL_COMMAND: brew install
PATH_EXTRA: /usr/local/opt/ccache/libexec:/usr/local/opt/gettext/bin:/usr/local/opt/libpcap/bin:/usr/local/opt/libxslt/bin:/usr/local/opt/rpcgen/bin
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/libpcap/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig
diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml
index 39c17dc08a43..867d5f297b7e 100644
--- a/ci/cirrus/build.yml
+++ b/ci/cirrus/build.yml
@@ -15,6 +15,7 @@ env:
build_task:
install_script:
- @UPDATE_COMMAND@
+ - @UPGRADE_COMMAND@
- @INSTALL_COMMAND@ @PKGS@
- if test -n "@PYPI_PKGS@" ; then @PIP3@ install @PYPI_PKGS@ ; fi
clone_script:
--
2.31.1
3 years, 5 months
[libvirt PATCH 00/16] Refactor virDomainFeaturesDefParse
by Tim Wiederhake
Some refactoring in preparation for adding support for qemu's
"hv-passthrough" and the yet-to-be-merged "hv-defaults".
Tim Wiederhake (16):
virDomainFeaturesDefParse: Factor out HyperV parsing into separate
function
virDomainFeaturesHyperVDefParse: Inline hyperv/stimer parsing
virDomainFeaturesHyperVDefParse: Remove ctxt
virDomainFeaturesHyperVDefParse: Remove tautological "if"
virDomainFeaturesDefParse: Factor out KVM parsing into separate
function
virDomainFeaturesKVMDefParse: Remove ctxt
virDomainFeaturesKVMDefParse: Remove tautological "switch"
virDomainFeaturesKVMDefParse: Remove tautological "if"
virDomainFeaturesDefParse: Factor out XEN parsing into separate
function
virDomainFeaturesXENDefParse: Remove ctxt
virDomainFeaturesXENDefParse: Remove tautological "if"
virDomainFeaturesDefParse: Inline SMM parsing
virDomainFeaturesDefParse: Inline MSRS parsing
virDomainFeaturesDefParse: Factor out capabilities parsing into
separate function
virDomainFeaturesCapabilitiesDefParse: Remove ctxt
virDomainFeaturesDefParse: Simplify APIC parsing
src/conf/domain_conf.c | 557 ++++++++++++++++++++++-------------------
1 file changed, 296 insertions(+), 261 deletions(-)
--
2.31.1
3 years, 5 months
[libvirt PATCH 0/3] wait longer for virtiofsd to exit (virtio-fs epopee)
by Ján Tomko
See patch 2/3.
Ján Tomko (3):
Introduce virPidFileForceCleanupPathDelay
qemu: wait more for virtiofsd to exit
util: fix typo
src/libvirt_private.syms | 1 +
src/qemu/qemu_virtiofs.c | 2 +-
src/util/virpidfile.c | 16 +++++++++++++++-
src/util/virpidfile.h | 2 ++
src/util/virprocess.c | 2 +-
5 files changed, 20 insertions(+), 3 deletions(-)
--
2.31.1
3 years, 5 months
[libvirt PATCH] docs: Fix some typos
by Tim Wiederhake
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
docs/kbase/live_full_disk_backup.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/kbase/live_full_disk_backup.rst b/docs/kbase/live_full_disk_backup.rst
index 1605ec05d2..562a9e87b0 100644
--- a/docs/kbase/live_full_disk_backup.rst
+++ b/docs/kbase/live_full_disk_backup.rst
@@ -97,7 +97,7 @@ virDomainBackupBegin() API: Assuming a guest with a single disk image,
create a temporary live QCOW2 overlay (commonly called as "external
snapshot") to track the live guest writes. Then backup the original
disk image while the guest (live QEMU) keeps writing to the temporary
-overlay. Finally, perform the "active block-commit" opertion to
+overlay. Finally, perform the "active block-commit" operation to
live-merge the temporary overlay disk contents into the original image —
i.e. the backing file — and "pivot" the live QEMU process to point to
it.
@@ -138,7 +138,7 @@ it.
you have to explicitly clean the libvirt metadata using ``virsh
snapshot-delete vm1 --metadata [name|--current]``.
-#. Now, take a backup the orignal image, ``base.raw``, to a different
+#. Now, take a backup the original image, ``base.raw``, to a different
location using ``cp`` or ``rsync``::
$ cp /var/lib/libvirt/images/base.raw
--
2.31.1
3 years, 5 months
[RFC PATCH 0/7] LIBVIRT: X86: TDX support
by Zhenzhong Duan
* What's TDX?
TDX stands for Trust Domain Extensions which isolates VMs from
the virtual-machine manager (VMM)/hypervisor and any other software on
the platform.
To support TDX, multiple software components, not only KVM but also QEMU,
guest Linux and virtual bios, need to be updated. For more details, please
check link[1], there are TDX spec links and public repository link at github
for each software component.
This patchset is another software component to extend libvirt to support TDX,
with which one can start a VM from high level rather than running qemu directly.
* The goal of this RFC patch
The purpose of this post is to get feedback early on high level design issue of
libvirt enhancement for TDX. Referenced much on AMD SEV implemention at link[2].
* Patch organization
- patch 1-2: Support query of TDX capabilities.
- patch 3-6: Add a new xml element 'TrustDomain' for TDX support.
- patch 7: Sure kvmSupportsSecureGuest cache updated.
Using these patches we have succesfully booted and tested a guest both with and
without TDX enabled.
[1] https://lkml.org/lkml/2020/11/16/1106
[2] https://github.com/codomania/libvirt/commits/v9
Zhenzhong Duan (7):
qemu: provide support to query the TDX capabilities
conf: expose TDX feature in domain capabilities
conf: introduce TrustDomain element in domain
qemu: add support to launch TDX guest
qemu: add support to TDVF firmware loader
qemu: force special features enabled for TDX guest
qemu: Check if INTEL Trust Domain Extention support is enabled
docs/formatdomaincaps.html.in | 16 ++++
docs/schemas/domaincaps.rng | 9 ++
docs/schemas/domaincommon.rng | 19 ++++
src/conf/domain_capabilities.c | 22 +++++
src/conf/domain_capabilities.h | 11 +++
src/conf/domain_conf.c | 90 ++++++++++++++++++
src/conf/domain_conf.h | 16 ++++
src/conf/virconftypes.h | 2 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 63 ++++++++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 39 ++++++++
src/qemu/qemu_monitor.c | 8 ++
src/qemu/qemu_monitor.h | 3 +
src/qemu/qemu_monitor_json.c | 53 +++++++++++
src/qemu/qemu_monitor_json.h | 3 +
src/qemu/qemu_validate.c | 14 +++
tests/domaincapsdata/bhyve_basic.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 1 +
tests/domaincapsdata/bhyve_uefi.x86_64.xml | 1 +
tests/domaincapsdata/empty.xml | 1 +
tests/domaincapsdata/libxl-xenfv.xml | 1 +
tests/domaincapsdata/libxl-xenpv.xml | 1 +
.../domaincapsdata/qemu_2.11.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.11.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 1 +
.../qemu_2.12.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.12.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.4.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.4.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.5.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.5.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.6.0-tcg.x86_64.xml | 1 +
.../qemu_2.6.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.6.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.7.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.7.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.8.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.8.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_2.9.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_2.9.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_3.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_3.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 1 +
.../qemu_4.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 +
.../qemu_4.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 +
.../qemu_5.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.sparc.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 1 +
.../qemu_5.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 1 +
.../genericxml2xmlindata/trust-domain-tdx.xml | 22 +++++
tests/genericxml2xmltest.c | 1 +
.../.trust-domain-tdx.xml.swo | Bin 0 -> 12288 bytes
tests/qemuxml2argvdata/trust-domain-tdx.args | 32 +++++++
tests/qemuxml2argvdata/trust-domain-tdx.xml | 37 +++++++
tests/qemuxml2argvtest.c | 3 +
115 files changed, 557 insertions(+)
create mode 100644 tests/genericxml2xmlindata/trust-domain-tdx.xml
create mode 100644 tests/qemuxml2argvdata/.trust-domain-tdx.xml.swo
create mode 100644 tests/qemuxml2argvdata/trust-domain-tdx.args
create mode 100644 tests/qemuxml2argvdata/trust-domain-tdx.xml
--
2.25.1
3 years, 5 months
[PATCH 0/2] Dirty Ring support (Libvirt)
by huangy81@chinatelecom.cn
From: Hyman Huang(黄勇) <huangy81(a)chinatelecom.cn>
since qemu has introduced a dirty ring feature in 6.1.0, may be it's
the right time to introduce dirty ring in libvirt meanwhile.
this patch add feature named 'dirty-ring', which enable dirty ring
feature when starting vm. to try this out, three things has done
in this patchset:
- introduce QEMU_CAPS_ACCEL so the the libvirt can use it to select
the right option when specifying the accelerator type.
- switch the option "-machine accel=xxx" to "-accel xxx" when specifying
accelerator type once libvirt build QEMU command line, so that
dirty-ring-size property can be passed to qemu when start vm.
- introduce dirty_ring_size to hold the ring size configured by user
and pass dirty_ring_size when building qemu commandline if dirty
ring feature enabled.
though dirty ring is per-cpu logically, the size of dirty ring is
registered by 'struct kvm' in QEMU. so we would like to place the
dirty_ring_size as a property of vm in Libvirt as the QEMU do.
the dirty ring feature is disabled by default, and if enabled, the
default value of ring size if 4096 if size not configured.
for more details about dirty ring and "-accel" option, please refer to:
https://lore.kernel.org/qemu-devel/20210108165050.406906-10-peterx@redhat...
https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@r...
please review, Thanks!
Best Regards !
Hyman Huang(黄勇) (2):
qemu_capabilities: Introduce QEMU_CAPS_ACCEL
qemu: support dirty ring feature
docs/formatdomain.rst | 16 ++--
docs/schemas/domaincommon.rng | 10 ++
src/conf/domain_conf.c | 43 +++++++++
src/conf/domain_conf.h | 4 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 103 ++++++++++++++++++---
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 +
...64-default-cpu-kvm-virt-4.2.aarch64-latest.args | 3 +-
...64-default-cpu-tcg-virt-4.2.aarch64-latest.args | 3 +-
.../aarch64-features-sve.aarch64-latest.args | 3 +-
.../aarch64-os-firmware-efi.aarch64-latest.args | 3 +-
.../aarch64-tpm.aarch64-latest.args | 3 +-
.../aarch64-virt-graphics.aarch64-latest.args | 3 +-
.../aarch64-virt-headless.aarch64-latest.args | 3 +-
.../audio-alsa-best.x86_64-latest.args | 3 +-
.../audio-alsa-full.x86_64-latest.args | 3 +-
.../audio-alsa-minimal.x86_64-latest.args | 3 +-
.../audio-coreaudio-best.x86_64-latest.args | 3 +-
.../audio-coreaudio-full.x86_64-latest.args | 3 +-
.../audio-coreaudio-minimal.x86_64-latest.args | 3 +-
.../audio-default-nographics.x86_64-latest.args | 3 +-
.../audio-default-sdl.x86_64-latest.args | 3 +-
.../audio-default-spice.x86_64-latest.args | 3 +-
.../audio-default-vnc.x86_64-latest.args | 3 +-
.../audio-file-best.x86_64-latest.args | 3 +-
.../audio-file-full.x86_64-latest.args | 3 +-
.../audio-file-minimal.x86_64-latest.args | 3 +-
.../audio-jack-full.x86_64-latest.args | 3 +-
.../audio-jack-minimal.x86_64-latest.args | 3 +-
.../audio-many-backends.x86_64-latest.args | 3 +-
.../audio-none-best.x86_64-latest.args | 3 +-
.../audio-none-full.x86_64-latest.args | 3 +-
.../audio-none-minimal.x86_64-latest.args | 3 +-
.../audio-oss-best.x86_64-latest.args | 3 +-
.../audio-oss-full.x86_64-latest.args | 3 +-
.../audio-oss-minimal.x86_64-latest.args | 3 +-
.../audio-pulseaudio-best.x86_64-latest.args | 3 +-
.../audio-pulseaudio-full.x86_64-latest.args | 3 +-
.../audio-pulseaudio-minimal.x86_64-latest.args | 3 +-
.../audio-sdl-best.x86_64-latest.args | 3 +-
.../audio-sdl-full.x86_64-latest.args | 3 +-
.../audio-sdl-minimal.x86_64-latest.args | 3 +-
.../audio-spice-best.x86_64-latest.args | 3 +-
.../audio-spice-full.x86_64-latest.args | 3 +-
.../audio-spice-minimal.x86_64-latest.args | 3 +-
.../blkdeviotune-group-num.x86_64-4.1.0.args | 3 +-
.../blkdeviotune-group-num.x86_64-latest.args | 3 +-
.../blkdeviotune-max-length.x86_64-4.1.0.args | 3 +-
.../blkdeviotune-max-length.x86_64-latest.args | 3 +-
.../blkdeviotune-max.x86_64-4.1.0.args | 3 +-
.../blkdeviotune-max.x86_64-latest.args | 3 +-
.../channel-unix-guestfwd.x86_64-latest.args | 3 +-
.../clock-timer-armvtimer.aarch64-latest.args | 3 +-
.../console-sclp.s390x-latest.args | 3 +-
.../console-virtio-unix.x86_64-latest.args | 3 +-
.../controller-virtio-scsi.x86_64-latest.args | 3 +-
.../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +-
.../cpu-Icelake-Server-pconfig.x86_64-latest.args | 3 +-
.../cpu-host-model-cmt.x86_64-4.0.0.args | 3 +-
.../cpu-translation.x86_64-4.0.0.args | 3 +-
.../cpu-translation.x86_64-latest.args | 3 +-
.../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +-
.../cpu-tsc-high-frequency.x86_64-latest.args | 3 +-
.../cputune-cpuset-big-id.x86_64-latest.args | 3 +-
.../default-video-type-aarch64.aarch64-latest.args | 3 +-
.../default-video-type-ppc64.ppc64-latest.args | 3 +-
.../default-video-type-riscv64.riscv64-latest.args | 3 +-
.../default-video-type-s390x.s390x-latest.args | 3 +-
.../devices-acpi-index.x86_64-latest.args | 3 +-
.../disk-aio-io_uring.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/disk-aio.x86_64-2.12.0.args | 3 +-
tests/qemuxml2argvdata/disk-aio.x86_64-latest.args | 3 +-
.../disk-arm-virtio-sd.aarch64-4.0.0.args | 3 +-
.../disk-arm-virtio-sd.aarch64-latest.args | 3 +-
.../disk-backing-chains-noindex.x86_64-2.12.0.args | 3 +-
.../disk-backing-chains-noindex.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/disk-cache.x86_64-2.12.0.args | 3 +-
.../qemuxml2argvdata/disk-cache.x86_64-latest.args | 3 +-
.../disk-cdrom-bus-other.x86_64-latest.args | 3 +-
...-cdrom-empty-network-invalid.x86_64-latest.args | 3 +-
.../disk-cdrom-network.x86_64-2.12.0.args | 3 +-
.../disk-cdrom-network.x86_64-latest.args | 3 +-
.../disk-cdrom-tray.x86_64-2.12.0.args | 3 +-
.../disk-cdrom-tray.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/disk-cdrom.x86_64-2.12.0.args | 3 +-
.../qemuxml2argvdata/disk-cdrom.x86_64-latest.args | 3 +-
.../disk-copy_on_read.x86_64-2.12.0.args | 3 +-
.../disk-copy_on_read.x86_64-latest.args | 3 +-
.../disk-detect-zeroes.x86_64-2.12.0.args | 3 +-
.../disk-detect-zeroes.x86_64-latest.args | 3 +-
.../disk-discard.x86_64-4.1.0.args | 3 +-
.../disk-discard.x86_64-latest.args | 3 +-
.../disk-error-policy-s390x.s390x-2.12.0.args | 3 +-
.../disk-error-policy-s390x.s390x-latest.args | 3 +-
.../disk-error-policy.x86_64-2.12.0.args | 3 +-
.../disk-error-policy.x86_64-latest.args | 3 +-
.../disk-floppy-q35-2_11.x86_64-2.12.0.args | 3 +-
.../disk-floppy-q35-2_11.x86_64-latest.args | 3 +-
.../disk-floppy-q35-2_9.x86_64-2.12.0.args | 3 +-
.../disk-floppy-q35-2_9.x86_64-latest.args | 3 +-
.../disk-floppy.x86_64-2.12.0.args | 3 +-
.../disk-floppy.x86_64-latest.args | 3 +-
.../disk-metadata-cache.x86_64-latest.args | 3 +-
.../disk-network-gluster.x86_64-2.12.0.args | 3 +-
.../disk-network-gluster.x86_64-latest.args | 3 +-
.../disk-network-http.x86_64-latest.args | 3 +-
.../disk-network-iscsi.x86_64-2.12.0.args | 3 +-
.../disk-network-iscsi.x86_64-latest.args | 3 +-
.../disk-network-nbd.x86_64-2.12.0.args | 3 +-
.../disk-network-nbd.x86_64-latest.args | 3 +-
.../disk-network-nfs.x86_64-latest.args | 3 +-
.../disk-network-rbd.x86_64-2.12.0.args | 3 +-
.../disk-network-rbd.x86_64-latest.args | 3 +-
.../disk-network-sheepdog.x86_64-2.12.0.args | 3 +-
.../disk-network-sheepdog.x86_64-6.0.0.args | 3 +-
.../disk-network-source-auth.x86_64-2.12.0.args | 3 +-
.../disk-network-source-auth.x86_64-latest.args | 3 +-
.../disk-network-tlsx509-nbd.x86_64-2.12.0.args | 3 +-
.../disk-network-tlsx509-nbd.x86_64-5.2.0.args | 3 +-
.../disk-network-tlsx509-nbd.x86_64-latest.args | 3 +-
.../disk-network-tlsx509-vxhs.x86_64-2.12.0.args | 3 +-
.../disk-network-tlsx509-vxhs.x86_64-5.0.0.args | 3 +-
.../qemuxml2argvdata/disk-nvme.x86_64-latest.args | 3 +-
.../disk-readonly-disk.x86_64-2.12.0.args | 3 +-
.../disk-readonly-disk.x86_64-latest.args | 3 +-
.../disk-rotation.x86_64-latest.args | 3 +-
.../disk-scsi-device-auto.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/disk-scsi.x86_64-latest.args | 3 +-
.../disk-shared.x86_64-2.12.0.args | 3 +-
.../disk-shared.x86_64-latest.args | 3 +-
.../disk-slices.x86_64-latest.args | 3 +-
.../disk-transient.x86_64-latest.args | 3 +-
.../disk-vhostuser.x86_64-latest.args | 3 +-
...isk-virtio-scsi-reservations.x86_64-2.12.0.args | 3 +-
...disk-virtio-scsi-reservations.x86_64-5.2.0.args | 3 +-
...isk-virtio-scsi-reservations.x86_64-latest.args | 3 +-
.../eoi-disabled.x86_64-4.0.0.args | 3 +-
.../eoi-disabled.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/eoi-enabled.x86_64-4.0.0.args | 3 +-
.../eoi-enabled.x86_64-latest.args | 3 +-
.../fips-enabled.x86_64-5.1.0.args | 3 +-
.../fips-enabled.x86_64-latest.args | 3 +-
.../floppy-drive-fat.x86_64-2.12.0.args | 3 +-
.../floppy-drive-fat.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args | 3 +-
tests/qemuxml2argvdata/fs9p.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/genid-auto.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/genid.x86_64-latest.args | 3 +-
...hics-egl-headless-rendernode.x86_64-latest.args | 3 +-
.../graphics-egl-headless.x86_64-latest.args | 3 +-
...ics-spice-gl-auto-rendernode.x86_64-latest.args | 3 +-
.../graphics-vnc-power.x86_64-latest.args | 3 +-
.../graphics-vnc-tls-secret.x86_64-5.2.0.args | 3 +-
.../graphics-vnc-tls-secret.x86_64-latest.args | 3 +-
.../graphics-vnc-tls.x86_64-latest.args | 3 +-
.../hostdev-mdev-display-ramfb.x86_64-latest.args | 3 +-
...v-display-spice-egl-headless.x86_64-latest.args | 3 +-
...ev-mdev-display-spice-opengl.x86_64-latest.args | 3 +-
...dev-display-vnc-egl-headless.x86_64-latest.args | 3 +-
.../hostdev-mdev-display-vnc.x86_64-latest.args | 3 +-
.../hostdev-scsi-lsi.x86_64-4.1.0.args | 3 +-
.../hostdev-scsi-lsi.x86_64-latest.args | 3 +-
.../hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 3 +-
.../hostdev-scsi-virtio-scsi.x86_64-latest.args | 3 +-
.../hostdev-subsys-mdev-vfio-ap.s390x-latest.args | 3 +-
...dev-subsys-mdev-vfio-ccw-boot.s390x-latest.args | 3 +-
.../hugepages-memaccess3.x86_64-latest.args | 3 +-
.../hugepages-nvdimm.x86_64-latest.args | 3 +-
.../qemuxml2argvdata/hyperv-off.x86_64-4.0.0.args | 3 +-
.../qemuxml2argvdata/hyperv-off.x86_64-latest.args | 3 +-
.../hyperv-panic.x86_64-4.0.0.args | 3 +-
.../hyperv-panic.x86_64-latest.args | 3 +-
.../hyperv-stimer-direct.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 3 +-
tests/qemuxml2argvdata/hyperv.x86_64-latest.args | 3 +-
.../input-linux.x86_64-latest.args | 3 +-
.../intel-iommu-aw-bits.x86_64-latest.args | 3 +-
.../intel-iommu-caching-mode.x86_64-latest.args | 3 +-
.../intel-iommu-device-iotlb.x86_64-latest.args | 3 +-
.../intel-iommu-eim.x86_64-latest.args | 3 +-
.../intel-iommu.x86_64-latest.args | 3 +-
.../iommu-smmuv3.aarch64-latest.args | 3 +-
.../iothreads-virtio-scsi-ccw.s390x-latest.args | 3 +-
.../iothreads-virtio-scsi-pci.x86_64-5.2.0.args | 3 +-
.../iothreads-virtio-scsi-pci.x86_64-latest.args | 3 +-
.../kvmclock+eoi-disabled.x86_64-4.0.0.args | 3 +-
.../kvmclock+eoi-disabled.x86_64-latest.args | 3 +-
...ty-sev-missing-platform-info.x86_64-2.12.0.args | 3 +-
.../launch-security-sev.x86_64-2.12.0.args | 3 +-
.../launch-security-sev.x86_64-6.0.0.args | 3 +-
.../luks-disks-source-qcow2.x86_64-5.2.0.args | 3 +-
.../luks-disks-source-qcow2.x86_64-latest.args | 3 +-
...emfd-memory-default-hugepage.x86_64-latest.args | 3 +-
.../memfd-memory-numa.x86_64-latest.args | 3 +-
...memory-hotplug-nvdimm-access.x86_64-latest.args | 3 +-
.../memory-hotplug-nvdimm-align.x86_64-5.2.0.args | 3 +-
.../memory-hotplug-nvdimm-align.x86_64-latest.args | 3 +-
.../memory-hotplug-nvdimm-label.x86_64-5.2.0.args | 3 +-
.../memory-hotplug-nvdimm-label.x86_64-latest.args | 3 +-
.../memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args | 3 +-
.../memory-hotplug-nvdimm-pmem.x86_64-latest.args | 3 +-
...emory-hotplug-nvdimm-readonly.x86_64-5.2.0.args | 3 +-
...mory-hotplug-nvdimm-readonly.x86_64-latest.args | 3 +-
.../memory-hotplug-nvdimm.x86_64-latest.args | 3 +-
.../memory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +-
.../memory-hotplug-virtio-pmem.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/mlock-off.x86_64-3.0.0.args | 3 +-
.../qemuxml2argvdata/mlock-off.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/mlock-on.x86_64-3.0.0.args | 3 +-
tests/qemuxml2argvdata/mlock-on.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/net-user.x86_64-4.0.0.args | 3 +-
tests/qemuxml2argvdata/net-vdpa.x86_64-latest.args | 3 +-
.../net-vhostuser.x86_64-latest.args | 3 +-
.../numatune-hmat.x86_64-latest.args | 3 +-
...une-memnode-restrictive-mode.x86_64-latest.args | 3 +-
.../numatune-memnode.x86_64-5.2.0.args | 3 +-
.../numatune-memnode.x86_64-latest.args | 3 +-
.../os-firmware-bios.x86_64-latest.args | 3 +-
...irmware-efi-no-enrolled-keys.x86_64-latest.args | 3 +-
.../os-firmware-efi-secboot.x86_64-latest.args | 3 +-
.../os-firmware-efi.x86_64-latest.args | 3 +-
.../parallel-unix-chardev.x86_64-latest.args | 3 +-
.../pcie-root-port-nohotplug.x86_64-latest.args | 3 +-
...4-default-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 +-
...4-default-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 +-
...4-default-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 +-
...4-default-cpu-tcg-pseries-2.7.ppc64-latest.args | 3 +-
...4-default-cpu-tcg-pseries-3.1.ppc64-latest.args | 3 +-
...4-default-cpu-tcg-pseries-4.2.ppc64-latest.args | 3 +-
.../ppc64-pseries-graphics.ppc64-latest.args | 3 +-
.../ppc64-pseries-headless.ppc64-latest.args | 3 +-
.../ppc64-tpmproxy-single.ppc64-latest.args | 3 +-
.../ppc64-tpmproxy-with-tpm.ppc64-latest.args | 3 +-
.../pv-spinlock-disabled.x86_64-4.0.0.args | 3 +-
.../pv-spinlock-disabled.x86_64-latest.args | 3 +-
.../pv-spinlock-enabled.x86_64-4.0.0.args | 3 +-
.../pv-spinlock-enabled.x86_64-latest.args | 3 +-
tests/qemuxml2argvdata/qemu-ns.x86_64-4.0.0.args | 3 +-
tests/qemuxml2argvdata/qemu-ns.x86_64-latest.args | 3 +-
.../riscv64-virt-graphics.riscv64-latest.args | 3 +-
.../riscv64-virt-headless.riscv64-latest.args | 3 +-
...90-allow-bogus-usb-controller.s390x-latest.args | 3 +-
.../s390-allow-bogus-usb-none.s390x-latest.args | 3 +-
...efault-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +-
...efault-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +-
...efault-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 3 +-
...efault-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 3 +-
.../s390x-ccw-graphics.s390x-latest.args | 3 +-
.../s390x-ccw-headless.s390x-latest.args | 3 +-
.../serial-unix-chardev.x86_64-latest.args | 3 +-
.../smartcard-passthrough-unix.x86_64-latest.args | 3 +-
.../tpm-emulator-spapr.ppc64-latest.args | 3 +-
.../tpm-emulator-tpm2-enc.x86_64-latest.args | 3 +-
.../tpm-emulator-tpm2-pstate.x86_64-latest.args | 3 +-
.../tpm-emulator-tpm2.x86_64-latest.args | 3 +-
.../tpm-emulator.x86_64-latest.args | 3 +-
.../tpm-passthrough-crb.x86_64-latest.args | 3 +-
.../tpm-passthrough.x86_64-latest.args | 3 +-
.../tseg-explicit-size.x86_64-latest.args | 3 +-
.../usb-redir-unix.x86_64-latest.args | 3 +-
.../vhost-user-fs-fd-memory.x86_64-latest.args | 3 +-
.../vhost-user-fs-hugepages.x86_64-latest.args | 3 +-
.../vhost-user-gpu-secondary.x86_64-latest.args | 3 +-
.../vhost-user-vga.x86_64-latest.args | 3 +-
.../vhost-vsock-auto.x86_64-latest.args | 3 +-
.../vhost-vsock-ccw-auto.s390x-latest.args | 3 +-
.../vhost-vsock-ccw-iommu.s390x-latest.args | 3 +-
.../vhost-vsock-ccw.s390x-latest.args | 3 +-
.../vhost-vsock.x86_64-latest.args | 3 +-
.../video-bochs-display-device.x86_64-latest.args | 3 +-
.../video-qxl-device-vram64.x86_64-latest.args | 3 +-
.../video-qxl-sec-device-vram64.x86_64-latest.args | 3 +-
.../video-ramfb-display-device.x86_64-latest.args | 3 +-
.../video-virtio-vga-gpu-gl.x86_64-latest.args | 3 +-
.../virtio-9p-createmode.x86_64-latest.args | 3 +-
.../virtio-9p-multidevs.x86_64-latest.args | 3 +-
.../virtio-non-transitional.x86_64-3.1.0.args | 3 +-
.../virtio-non-transitional.x86_64-latest.args | 3 +-
...irtio-options-controller-ats.x86_64-latest.args | 3 +-
...tio-options-controller-iommu.x86_64-latest.args | 3 +-
...io-options-controller-packed.x86_64-latest.args | 3 +-
.../virtio-options-disk-ats.x86_64-latest.args | 3 +-
.../virtio-options-disk-iommu.x86_64-latest.args | 3 +-
.../virtio-options-disk-packed.x86_64-latest.args | 3 +-
.../virtio-options-fs-ats.x86_64-latest.args | 3 +-
.../virtio-options-fs-iommu.x86_64-latest.args | 3 +-
.../virtio-options-fs-packed.x86_64-latest.args | 3 +-
.../virtio-options-input-ats.x86_64-latest.args | 3 +-
.../virtio-options-input-iommu.x86_64-latest.args | 3 +-
.../virtio-options-input-packed.x86_64-latest.args | 3 +-
...irtio-options-memballoon-ats.x86_64-latest.args | 3 +-
...emballoon-freepage-reporting.x86_64-latest.args | 3 +-
...tio-options-memballoon-iommu.x86_64-latest.args | 3 +-
...io-options-memballoon-packed.x86_64-latest.args | 3 +-
.../virtio-options-net-ats.x86_64-latest.args | 3 +-
.../virtio-options-net-iommu.x86_64-latest.args | 3 +-
.../virtio-options-net-packed.x86_64-latest.args | 3 +-
.../virtio-options-rng-ats.x86_64-latest.args | 3 +-
.../virtio-options-rng-iommu.x86_64-latest.args | 3 +-
.../virtio-options-rng-packed.x86_64-latest.args | 3 +-
.../virtio-options-video-ats.x86_64-latest.args | 3 +-
.../virtio-options-video-iommu.x86_64-latest.args | 3 +-
.../virtio-options-video-packed.x86_64-latest.args | 3 +-
.../virtio-options.x86_64-latest.args | 3 +-
.../virtio-rng-builtin.x86_64-5.2.0.args | 3 +-
.../virtio-rng-builtin.x86_64-latest.args | 3 +-
.../virtio-rng-egd-unix.x86_64-5.2.0.args | 3 +-
.../virtio-rng-egd-unix.x86_64-latest.args | 3 +-
.../virtio-transitional.x86_64-3.1.0.args | 3 +-
.../virtio-transitional.x86_64-latest.args | 3 +-
.../watchdog-diag288.s390x-latest.args | 3 +-
...86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 +-
...6_64-default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 +-
...86_64-default-cpu-tcg-pc-4.2.x86_64-latest.args | 3 +-
...6_64-default-cpu-tcg-q35-4.2.x86_64-latest.args | 3 +-
.../x86_64-pc-graphics.x86_64-latest.args | 3 +-
.../x86_64-pc-headless.x86_64-latest.args | 3 +-
.../x86_64-q35-graphics.x86_64-latest.args | 3 +-
.../x86_64-q35-headless.x86_64-latest.args | 3 +-
357 files changed, 820 insertions(+), 333 deletions(-)
--
1.8.3.1
3 years, 5 months
[PATCH] chValidateDomainDeviceDef: Remove per-device-type error messages
by Peter Krempa
Vast majority of device types is not supported by the Cloud-Hypervisor
driver. Simplify the error reporting by using
virDomainDeviceTypeToString.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/ch/ch_domain.c | 90 +++++++---------------------------------------
1 file changed, 12 insertions(+), 78 deletions(-)
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index 3495ee22ff..780a46ba00 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -203,117 +203,51 @@ chValidateDomainDeviceDef(const virDomainDeviceDef *dev,
void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED)
{
- int ret = -1;
-
switch ((virDomainDeviceType)dev->type) {
case VIR_DOMAIN_DEVICE_DISK:
- ret = 0;
+ case VIR_DOMAIN_DEVICE_NET:
+ case VIR_DOMAIN_DEVICE_MEMORY:
+ case VIR_DOMAIN_DEVICE_VSOCK:
break;
+
case VIR_DOMAIN_DEVICE_LEASE:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support lease"));
- break;
case VIR_DOMAIN_DEVICE_FS:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support fs"));
- break;
- case VIR_DOMAIN_DEVICE_NET:
- ret = 0;
- break;
case VIR_DOMAIN_DEVICE_INPUT:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support input"));
- break;
case VIR_DOMAIN_DEVICE_SOUND:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support sound"));
- break;
case VIR_DOMAIN_DEVICE_VIDEO:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support video"));
- break;
case VIR_DOMAIN_DEVICE_HOSTDEV:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support hostdev"));
- break;
case VIR_DOMAIN_DEVICE_WATCHDOG:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support watchdog"));
- break;
case VIR_DOMAIN_DEVICE_CONTROLLER:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support controller"));
- break;
case VIR_DOMAIN_DEVICE_GRAPHICS:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support graphics"));
- break;
case VIR_DOMAIN_DEVICE_HUB:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support hub"));
- break;
case VIR_DOMAIN_DEVICE_REDIRDEV:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support redirdev"));
- break;
case VIR_DOMAIN_DEVICE_SMARTCARD:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support smartcard"));
- break;
case VIR_DOMAIN_DEVICE_CHR:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support chr"));
- break;
case VIR_DOMAIN_DEVICE_MEMBALLOON:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support memballoon"));
- break;
case VIR_DOMAIN_DEVICE_NVRAM:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support nvram"));
- break;
case VIR_DOMAIN_DEVICE_RNG:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support rng"));
- break;
case VIR_DOMAIN_DEVICE_SHMEM:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support shmem"));
- break;
case VIR_DOMAIN_DEVICE_TPM:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support tpm"));
- break;
case VIR_DOMAIN_DEVICE_PANIC:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support panic"));
- break;
- case VIR_DOMAIN_DEVICE_MEMORY:
- ret = 0;
- break;
case VIR_DOMAIN_DEVICE_IOMMU:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support iommu"));
- break;
- case VIR_DOMAIN_DEVICE_VSOCK:
- ret = 0;
- break;
case VIR_DOMAIN_DEVICE_AUDIO:
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support audio"));
- break;
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Cloud-Hypervisor doesn't support '%s' device"),
+ virDomainDeviceTypeToString(dev->type));
+ return -1;
+
case VIR_DOMAIN_DEVICE_NONE:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("unexpected VIR_DOMAIN_DEVICE_NONE"));
- break;
+ return -1;
case VIR_DOMAIN_DEVICE_LAST:
default:
virReportEnumRangeError(virDomainDeviceType, dev->type);
- break;
+ return -1;
}
- return ret;
+ return 0;
}
virDomainDefParserConfig virCHDriverDomainDefParserConfig = {
--
2.31.1
3 years, 5 months
[libvirt PATCH] virresctrl: fix starting VMs with cputune.memorytune specified
by Pavel Hrdina
When removing check for return value of VIR_EXPAND_N this place was
incorrectly modified causing failure to start a VM with cputune
memorytune configured with useless error message:
error: Failed to start domain 'vm1'
error: An error occurred, but the cause is unknown
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1973094
Fixes: 7d2fd6ef0163a939adb7ce0f0fad3b7654c340de
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/virresctrl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index a03113d4d6..35e92022db 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -1437,7 +1437,6 @@ virResctrlAllocParseProcessMemoryBandwidth(virResctrlInfo *resctrl,
if (alloc->mem_bw->nbandwidths <= id) {
VIR_EXPAND_N(alloc->mem_bw->bandwidths, alloc->mem_bw->nbandwidths,
id - alloc->mem_bw->nbandwidths + 1);
- return -1;
}
if (!alloc->mem_bw->bandwidths[id])
alloc->mem_bw->bandwidths[id] = g_new0(unsigned int, 1);
--
2.31.1
3 years, 5 months
[PATCHv2] ch_domain: Add handler for virDomainDeviceDefValidateCallback
by William Douglas
Instead of trying to match devices passed in based on the monitor
detecting the number of devices that were used in the domain
definition, use the deviceValidateCallback to evaluate if
unsupported devices are used.
This allows the compiler to detect when new device types are added
that need to be checked.
Signed-off-by: William Douglas <william.douglas(a)intel.com>
---
The only change from the previous version was to switch to use the XML
validation callback based on the great explanations from Michal and Peter.
---
src/ch/ch_domain.c | 120 +++++++++++++++++++++++++++++++++++++++++++
src/ch/ch_monitor.c | 122 --------------------------------------------
2 files changed, 120 insertions(+), 122 deletions(-)
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index f9a6f3f31d..3495ee22ff 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -197,7 +197,127 @@ virCHDomainDefPostParse(virDomainDef *def,
return 0;
}
+static int
+chValidateDomainDeviceDef(const virDomainDeviceDef *dev,
+ const virDomainDef *def G_GNUC_UNUSED,
+ void *opaque G_GNUC_UNUSED,
+ void *parseOpaque G_GNUC_UNUSED)
+{
+ int ret = -1;
+
+ switch ((virDomainDeviceType)dev->type) {
+ case VIR_DOMAIN_DEVICE_DISK:
+ ret = 0;
+ break;
+ case VIR_DOMAIN_DEVICE_LEASE:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support lease"));
+ break;
+ case VIR_DOMAIN_DEVICE_FS:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support fs"));
+ break;
+ case VIR_DOMAIN_DEVICE_NET:
+ ret = 0;
+ break;
+ case VIR_DOMAIN_DEVICE_INPUT:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support input"));
+ break;
+ case VIR_DOMAIN_DEVICE_SOUND:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support sound"));
+ break;
+ case VIR_DOMAIN_DEVICE_VIDEO:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support video"));
+ break;
+ case VIR_DOMAIN_DEVICE_HOSTDEV:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support hostdev"));
+ break;
+ case VIR_DOMAIN_DEVICE_WATCHDOG:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support watchdog"));
+ break;
+ case VIR_DOMAIN_DEVICE_CONTROLLER:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support controller"));
+ break;
+ case VIR_DOMAIN_DEVICE_GRAPHICS:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support graphics"));
+ break;
+ case VIR_DOMAIN_DEVICE_HUB:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support hub"));
+ break;
+ case VIR_DOMAIN_DEVICE_REDIRDEV:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support redirdev"));
+ break;
+ case VIR_DOMAIN_DEVICE_SMARTCARD:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support smartcard"));
+ break;
+ case VIR_DOMAIN_DEVICE_CHR:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support chr"));
+ break;
+ case VIR_DOMAIN_DEVICE_MEMBALLOON:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support memballoon"));
+ break;
+ case VIR_DOMAIN_DEVICE_NVRAM:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support nvram"));
+ break;
+ case VIR_DOMAIN_DEVICE_RNG:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support rng"));
+ break;
+ case VIR_DOMAIN_DEVICE_SHMEM:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support shmem"));
+ break;
+ case VIR_DOMAIN_DEVICE_TPM:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support tpm"));
+ break;
+ case VIR_DOMAIN_DEVICE_PANIC:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support panic"));
+ break;
+ case VIR_DOMAIN_DEVICE_MEMORY:
+ ret = 0;
+ break;
+ case VIR_DOMAIN_DEVICE_IOMMU:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support iommu"));
+ break;
+ case VIR_DOMAIN_DEVICE_VSOCK:
+ ret = 0;
+ break;
+ case VIR_DOMAIN_DEVICE_AUDIO:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Cloud-Hypervisor doesn't support audio"));
+ break;
+ case VIR_DOMAIN_DEVICE_NONE:
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("unexpected VIR_DOMAIN_DEVICE_NONE"));
+ break;
+
+ case VIR_DOMAIN_DEVICE_LAST:
+ default:
+ virReportEnumRangeError(virDomainDeviceType, dev->type);
+ break;
+ }
+
+ return ret;
+}
+
virDomainDefParserConfig virCHDriverDomainDefParserConfig = {
.domainPostParseBasicCallback = virCHDomainDefPostParseBasic,
.domainPostParseCallback = virCHDomainDefPostParse,
+ .deviceValidateCallback = chValidateDomainDeviceDef,
};
diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c
index 87520a2639..1648d05017 100644
--- a/src/ch/ch_monitor.c
+++ b/src/ch/ch_monitor.c
@@ -359,125 +359,6 @@ virCHMonitorBuildNetsJson(virJSONValue *content, virDomainDef *vmdef)
return -1;
}
-static int
-virCHMonitorDetectUnsupportedDevices(virDomainDef *vmdef)
-{
- int ret = 0;
-
- if (vmdef->ngraphics > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support graphics"));
- ret = 1;
- }
- if (vmdef->ncontrollers > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support controllers"));
- ret = 1;
- }
- if (vmdef->nfss > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support fss"));
- ret = 1;
- }
- if (vmdef->ninputs > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support inputs"));
- ret = 1;
- }
- if (vmdef->nsounds > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support sounds"));
- ret = 1;
- }
- if (vmdef->naudios > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support audios"));
- ret = 1;
- }
- if (vmdef->nvideos > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support videos"));
- ret = 1;
- }
- if (vmdef->nhostdevs > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support hostdevs"));
- ret = 1;
- }
- if (vmdef->nredirdevs > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support redirdevs"));
- ret = 1;
- }
- if (vmdef->nsmartcards > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support smartcards"));
- ret = 1;
- }
- if (vmdef->nserials > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support serials"));
- ret = 1;
- }
- if (vmdef->nparallels > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support parallels"));
- ret = 1;
- }
- if (vmdef->nchannels > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support channels"));
- ret = 1;
- }
- if (vmdef->nconsoles > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support consoles"));
- ret = 1;
- }
- if (vmdef->nleases > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support leases"));
- ret = 1;
- }
- if (vmdef->nhubs > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support hubs"));
- ret = 1;
- }
- if (vmdef->nseclabels > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support seclabels"));
- ret = 1;
- }
- if (vmdef->nrngs > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support rngs"));
- ret = 1;
- }
- if (vmdef->nshmems > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support shmems"));
- ret = 1;
- }
- if (vmdef->nmems > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support mems"));
- ret = 1;
- }
- if (vmdef->npanics > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support panics"));
- ret = 1;
- }
- if (vmdef->nsysinfo > 0) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("Cloud-Hypervisor doesn't support sysinfo"));
- ret = 1;
- }
-
- return ret;
-}
-
static int
virCHMonitorBuildVMJson(virDomainDef *vmdef, char **jsonstr)
{
@@ -490,9 +371,6 @@ virCHMonitorBuildVMJson(virDomainDef *vmdef, char **jsonstr)
goto cleanup;
}
- if (virCHMonitorDetectUnsupportedDevices(vmdef))
- goto cleanup;
-
if (virCHMonitorBuildCPUJson(content, vmdef) < 0)
goto cleanup;
--
2.31.1
3 years, 5 months