[PATCH] cmdQemuMonitorCommandQMPWrap: Reset ignored errors from JSON parsing
by Peter Krempa
'cmdQemuMonitorCommandQMPWrap' is checking whether the user provided
string is not valid JSON to avoid wrapping it. In cases where it's not
JSON we ignore the error and add the wrapper.
If the caller then reports a different non-libvirt error the error from
the JSON parsing would be printed as well. Reset errors we ignore:
# virsh qemu-monitor-command cd --pass-fds a asdf
error: Unable to parse FD number 'a'
error: internal error: cannot parse json asdf: lexical error: invalid char in json text.
asdf
(right here) ------^
In the above case 'asdf' is not valid JSON, but the code did wrap it
into '{"execute":"asdf"}', the only problem is the argument for
--pass-fds.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tools/virsh-domain.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 9b1b14cdc2..743660e794 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9769,6 +9769,8 @@ cmdQemuMonitorCommandQMPWrap(vshControl *ctl,
if (virJSONValueIsObject(fullcmdjson))
return g_steal_pointer(&fullcmd);
+ vshResetLibvirtError();
+
/* we try to wrap the command and possible arguments into a JSON object, if
* we as fall back we pass through what we've got from the user */
@@ -9787,6 +9789,8 @@ cmdQemuMonitorCommandQMPWrap(vshControl *ctl,
* JSON object wrapper and try using that */
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
+ vshResetLibvirtError();
+
virBufferAddLit(&buf, "{");
/* opt points to the _ARGV option bit containing the command so we'll
* iterate through the arguments now */
--
2.35.1
2 years, 4 months
[PATCH v3 0/5] Introduce network backed NVRAM
by Rohit Kumar
Libvirt domain XML currently allows only local filepaths
that can be used to specify a NVRAM disk. It should be
possible to support NVRAM disks on network storage as
it would give flexibility to start the VM on any host
without having to worry about where to get the latest
nvram image.
This series extends the NVRAM element to support hosting over
network-backed disks.
It achieves this by embedding virStorageSource pointer for
nvram into _virDomainLoaderDef.
It introduces a 'type' attribute for NVRAM element to
specify 'file' vs 'network' backed NVRAM.
XML with new annotation:
<nvram type='network'>
<source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/0'>
<host name='example.com' port='6000'/>
<auth username='myname'>
<secret type='iscsi' usage='mycluster_myname'/>
</auth>
</host>
</source>
</nvram>
or
<nvram type='network'>
<source protocol='nbd' name='bar'>
<host name='example.org' port='6000'/>
</source>
</nvram>
or
<nvram type='file'>
<source file='/var/lib/libvirt/nvram/guest_VARS.fd'/>
</nvram>
Changes v1->v2:
- Split the patch into smaller patches
- Added unit test
- Updated the doc
- Addressed Peter's comment on v1 (https://listman.redhat.com/archives/libvir-list/2022-March/229684.html)
Changes v2->v3:
- Added authentication with 'iscsi' protocol unit test
- Updated the validation logic
- Addressed Peter's other comments on v2 patch(https://listman.redhat.com/archives/libvir-list/2022-April/229971.h...
Rohit Kumar (5):
Make NVRAM a virStorageSource type.
Add support to parse/format/validate virStorageSource type NVRAM
Update schema, docs, and validation logic to support network backed
NVRAM
Add unit tests for network backed NVRAM
Add unit test to support new 'file' type NVRAM
NEWS.rst | 5 +
docs/formatdomain.rst | 34 +++++-
src/conf/domain_conf.c | 115 +++++++++++++++---
src/conf/domain_conf.h | 3 +-
src/conf/schemas/domaincommon.rng | 21 +++-
src/qemu/qemu_cgroup.c | 3 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain.c | 23 +++-
src/qemu/qemu_driver.c | 5 +-
src/qemu/qemu_firmware.c | 23 +++-
src/qemu/qemu_namespace.c | 5 +-
src/qemu/qemu_process.c | 5 +-
src/qemu/qemu_validate.c | 71 +++++++++++
src/security/security_dac.c | 6 +-
src/security/security_selinux.c | 6 +-
src/security/virt-aa-helper.c | 5 +-
src/vbox/vbox_common.c | 3 +-
.../bios-nvram-file.x86_64-latest.args | 37 ++++++
tests/qemuxml2argvdata/bios-nvram-file.xml | 23 ++++
.../bios-nvram-network-iscsi.x86_64-4.1.0.err | 1 +
...ios-nvram-network-iscsi.x86_64-latest.args | 38 ++++++
.../bios-nvram-network-iscsi.xml | 31 +++++
.../bios-nvram-network-nbd.x86_64-latest.args | 37 ++++++
.../bios-nvram-network-nbd.xml | 28 +++++
tests/qemuxml2argvtest.c | 4 +
.../bios-nvram-file.x86_64-latest.xml | 39 ++++++
...bios-nvram-network-iscsi.x86_64-latest.xml | 44 +++++++
.../bios-nvram-network-nbd.x86_64-latest.xml | 41 +++++++
tests/qemuxml2xmltest.c | 3 +
29 files changed, 618 insertions(+), 43 deletions(-)
create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.xml
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network-iscsi.x86_64-4.1.0.err
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network-iscsi.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network-iscsi.xml
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network-nbd.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network-nbd.xml
create mode 100644 tests/qemuxml2xmloutdata/bios-nvram-file.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/bios-nvram-network-iscsi.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/bios-nvram-network-nbd.x86_64-latest.xml
--
2.25.1
2 years, 5 months
[libvirt PATCH v2 0/7] ci: Drop Fedora 34, add Fedora 36
by Andrea Bolognani
Test pipeline:
https://gitlab.com/abologna/libvirt/-/pipelines/548848259
Only patches 1-5 should be pushed until the issues outlined in
https://listman.redhat.com/archives/libvir-list/2022-May/231851.html
have been addressed.
Changes from [v1]
* handle integration tests separately;
* don't stop publishing RPMs from the Fedora 35 job
[v1] https://listman.redhat.com/archives/libvir-list/2022-May/231838.html
Andrea Bolognani (7):
ci: Drop Fedora 34
ci: Refresh generated files
ci: Add Fedora 36
ci: Move MinGW jobs to Fedora 36
ci: Don't mark any Fedora 36 job as optional
ci: Add Fedora 36 to integration tests
ci: Move upstream QEMU integration test to Fedora 36
...ile => fedora-36-cross-mingw32.Dockerfile} | 2 +-
...ile => fedora-36-cross-mingw64.Dockerfile} | 2 +-
...ora-34.Dockerfile => fedora-36.Dockerfile} | 3 +-
ci/gitlab.yml | 767 +-----------------
ci/gitlab/build-templates.yml | 45 +
ci/gitlab/builds.yml | 406 +++++++++
ci/gitlab/container-templates.yml | 52 ++
ci/gitlab/containers.yml | 325 ++++++++
ci/gitlab/sanity-checks.yml | 18 +
ci/integration.yml | 24 +-
ci/manifest.yml | 5 +-
11 files changed, 869 insertions(+), 780 deletions(-)
rename ci/containers/{fedora-35-cross-mingw32.Dockerfile => fedora-36-cross-mingw32.Dockerfile} (98%)
rename ci/containers/{fedora-35-cross-mingw64.Dockerfile => fedora-36-cross-mingw64.Dockerfile} (98%)
rename ci/containers/{fedora-34.Dockerfile => fedora-36.Dockerfile} (97%)
create mode 100644 ci/gitlab/build-templates.yml
create mode 100644 ci/gitlab/builds.yml
create mode 100644 ci/gitlab/container-templates.yml
create mode 100644 ci/gitlab/containers.yml
create mode 100644 ci/gitlab/sanity-checks.yml
--
2.35.3
2 years, 5 months
[PATCH v2 00/30] Remove some unused includes
by Peng Liang
This series are the v2 of: https://listman.redhat.com/archives/libvir-list/2022-May/231132.html.
And this version passes the pipeline in GitLab :)
(https://gitlab.com/tcx4c70/libvirt/-/pipelines/539027618).
v1 -> v2:
1. Fix build failure on many plantforms;
2. Fix my name in 'From';
3. Remove a few more unused includes;
Peng Liang (30):
access: Remove unused includes
admin: Remove unused includes
ch: Remove unused includes
conf: Remove unused includes
cpu: Remove unused includes
esx: Remove unused includes
hyperv: Remove unused includes
hypvervisor: Remove unused includes
interface: Remove unused includes
libxl: Remove unused includes
locking: Remove unused includes
logging: Remove unused includes
network: Remove unused includes
node_device: Remove unused includes
nwfilter: Remove unused includes
openvz: Remove unused includes
qemu: Remove unused includes
remote: Remove unused includes
rpc: Remove unused includes
secret: Remove unused includes
security: Remove unused includes
storage: Remove unused includes
storage_file: Remove unused includes
util: Remove unused includes
vbox: Remove unused includes
vmware: Remove unused includes
vmx: Remove unused includes
test_driver: Remove unused includes
tools: Remove unused includes
tests: Remove unused includes
src/access/viraccessdriver.h | 1 -
src/access/viraccessdriverpolkit.c | 4 ----
src/access/viraccessdriverstack.c | 1 -
src/access/viraccessmanager.h | 1 -
src/access/viraccessperm.h | 1 -
src/admin/admin_server.c | 4 ----
src/admin/admin_server.h | 1 -
src/admin/admin_server_dispatch.c | 3 ---
src/admin/libvirt-admin.c | 2 --
src/ch/ch_conf.c | 1 -
src/ch/ch_domain.c | 1 -
src/ch/ch_driver.c | 7 -------
src/ch/ch_monitor.c | 2 --
src/ch/ch_process.c | 2 --
src/ch/ch_process.h | 1 -
src/conf/backup_conf.c | 3 ---
src/conf/capabilities.c | 1 -
src/conf/capabilities.h | 3 ---
src/conf/checkpoint_conf.c | 4 ----
src/conf/checkpoint_conf.h | 1 -
src/conf/cpu_conf.c | 2 --
src/conf/cpu_conf.h | 1 -
src/conf/device_conf.c | 2 --
src/conf/device_conf.h | 1 -
src/conf/domain_addr.c | 1 -
src/conf/domain_audit.c | 1 -
src/conf/domain_capabilities.c | 2 --
src/conf/domain_capabilities.h | 1 -
src/conf/domain_conf.c | 4 ----
src/conf/domain_conf.h | 1 -
src/conf/domain_event.c | 2 --
src/conf/domain_nwfilter.c | 2 --
src/conf/domain_validate.c | 1 -
src/conf/interface_conf.c | 4 ----
src/conf/interface_conf.h | 2 --
src/conf/moment_conf.c | 3 ---
src/conf/moment_conf.h | 1 -
src/conf/netdev_bandwidth_conf.c | 1 -
src/conf/netdev_vlan_conf.h | 1 -
src/conf/netdev_vport_profile_conf.c | 1 -
src/conf/netdev_vport_profile_conf.h | 1 -
src/conf/network_conf.c | 2 --
src/conf/network_conf.h | 3 ---
src/conf/network_event.h | 1 -
src/conf/networkcommon_conf.c | 3 ---
src/conf/networkcommon_conf.h | 2 --
src/conf/node_device_conf.c | 1 -
src/conf/node_device_conf.h | 2 --
src/conf/node_device_event.h | 1 -
src/conf/node_device_util.c | 1 -
src/conf/nwfilter_conf.c | 2 --
src/conf/nwfilter_conf.h | 3 ---
src/conf/nwfilter_ipaddrmap.c | 3 ---
src/conf/nwfilter_params.c | 2 --
src/conf/nwfilter_params.h | 1 -
src/conf/object_event.c | 4 ----
src/conf/object_event.h | 2 --
src/conf/secret_conf.c | 3 ---
src/conf/secret_event.h | 1 -
src/conf/snapshot_conf.c | 8 --------
src/conf/snapshot_conf.h | 1 -
src/conf/storage_adapter_conf.c | 1 -
src/conf/storage_capabilities.c | 1 -
src/conf/storage_capabilities.h | 2 --
src/conf/storage_conf.c | 4 ----
src/conf/storage_conf.h | 4 ----
src/conf/storage_encryption_conf.c | 3 ---
src/conf/storage_event.h | 1 -
src/conf/virchrdev.c | 1 -
src/conf/virchrdev.h | 1 -
src/conf/virdomaincheckpointobjlist.c | 1 -
src/conf/virdomaincheckpointobjlist.h | 2 --
src/conf/virdomainmomentobjlist.c | 5 -----
src/conf/virdomainobjlist.c | 2 --
src/conf/virdomainsnapshotobjlist.c | 3 ---
src/conf/virdomainsnapshotobjlist.h | 2 --
src/conf/virinterfaceobj.c | 1 -
src/conf/virinterfaceobj.h | 2 --
src/conf/virnetworkobj.h | 2 --
src/conf/virnetworkportdef.c | 2 --
src/conf/virnetworkportdef.h | 2 --
src/conf/virnodedeviceobj.c | 1 -
src/conf/virnwfilterbindingdef.c | 1 -
src/conf/virnwfilterbindingdef.h | 1 -
src/conf/virnwfilterbindingobj.c | 4 ----
src/conf/virnwfilterbindingobj.h | 1 -
src/conf/virnwfilterobj.h | 2 --
src/conf/virsavecookie.h | 1 -
src/conf/virsecretobj.h | 3 ---
src/conf/virstorageobj.c | 1 -
src/conf/virstorageobj.h | 4 ----
src/cpu/cpu.c | 3 ---
src/cpu/cpu.h | 1 -
src/cpu/cpu_arm.c | 1 -
src/cpu/cpu_map.c | 2 --
src/cpu/cpu_ppc64.c | 1 -
src/cpu/cpu_s390.c | 2 --
src/cpu/cpu_x86.c | 1 -
src/esx/esx_driver.c | 1 -
src/esx/esx_interface_driver.c | 6 ------
src/esx/esx_network_driver.c | 2 --
src/esx/esx_private.h | 3 ---
src/esx/esx_storage_backend_iscsi.c | 2 --
src/esx/esx_storage_backend_vmfs.c | 2 --
src/esx/esx_storage_driver.c | 2 --
src/esx/esx_stream.c | 1 -
src/esx/esx_stream.h | 1 -
src/esx/esx_util.c | 3 ---
src/esx/esx_vi.h | 2 --
src/esx/esx_vi_methods.c | 2 --
src/esx/esx_vi_types.c | 1 -
src/hyperv/hyperv_private.h | 3 ---
src/hyperv/hyperv_util.c | 3 ---
src/hyperv/hyperv_util.h | 1 -
src/hypervisor/domain_driver.h | 1 -
src/hypervisor/domain_job.h | 1 -
src/hypervisor/virhostdev.c | 2 --
src/interface/interface_backend_netcf.c | 2 --
src/interface/interface_backend_udev.c | 1 -
src/libxl/libxl_capabilities.c | 1 -
src/libxl/libxl_capabilities.h | 2 --
src/libxl/libxl_conf.c | 3 ---
src/libxl/libxl_conf.h | 3 ---
src/libxl/libxl_domain.c | 1 -
src/libxl/libxl_domain.h | 2 --
src/libxl/libxl_driver.c | 3 ---
src/libxl/libxl_logger.c | 2 --
src/libxl/libxl_migration.c | 3 ---
src/libxl/xen_common.h | 1 -
src/libxl/xen_xl.c | 1 -
src/libxl/xen_xl.h | 1 -
src/libxl/xen_xm.c | 1 -
src/libxl/xen_xm.h | 1 -
src/locking/domain_lock.c | 3 ---
src/locking/domain_lock.h | 2 --
src/locking/lock_daemon.c | 2 --
src/locking/lock_daemon_config.c | 4 ----
src/locking/lock_daemon_dispatch.c | 1 -
src/locking/lock_driver.h | 1 -
src/locking/lock_driver_lockd.c | 1 -
src/locking/lock_driver_nop.c | 2 --
src/locking/lock_manager.c | 1 -
src/locking/lock_manager.h | 1 -
src/locking/sanlock_helper.c | 2 --
src/logging/log_daemon.c | 5 -----
src/logging/log_daemon_config.c | 4 ----
src/logging/log_daemon_dispatch.c | 1 -
src/logging/log_handler.c | 1 -
src/logging/log_handler.h | 1 -
src/logging/log_manager.c | 1 -
src/network/bridge_driver.c | 5 -----
src/network/bridge_driver.h | 3 ---
src/network/bridge_driver_linux.c | 1 -
src/network/bridge_driver_platform.h | 1 -
src/network/leaseshelper.c | 3 ---
src/node_device/node_device_driver.c | 3 ---
src/node_device/node_device_driver.h | 1 -
src/node_device/node_device_udev.c | 3 ---
src/nwfilter/nwfilter_dhcpsnoop.c | 2 --
src/nwfilter/nwfilter_driver.c | 5 -----
src/nwfilter/nwfilter_driver.h | 3 ---
src/nwfilter/nwfilter_ebiptables_driver.c | 4 ----
src/nwfilter/nwfilter_gentech_driver.c | 4 ----
src/nwfilter/nwfilter_gentech_driver.h | 1 -
src/nwfilter/nwfilter_learnipaddr.c | 5 -----
src/nwfilter/nwfilter_learnipaddr.h | 1 -
src/openvz/openvz_conf.c | 1 -
src/openvz/openvz_conf.h | 1 -
src/openvz/openvz_driver.h | 2 --
src/openvz/openvz_util.c | 1 -
src/qemu/qemu_agent.c | 2 --
src/qemu/qemu_agent.h | 1 -
src/qemu/qemu_alias.c | 1 -
src/qemu/qemu_alias.h | 2 --
src/qemu/qemu_backup.c | 5 -----
src/qemu/qemu_block.c | 1 -
src/qemu/qemu_block.h | 1 -
src/qemu/qemu_blockjob.c | 2 --
src/qemu/qemu_capabilities.c | 6 ------
src/qemu/qemu_capabilities.h | 2 --
src/qemu/qemu_cgroup.c | 7 -------
src/qemu/qemu_cgroup.h | 2 --
src/qemu/qemu_checkpoint.c | 3 ---
src/qemu/qemu_checkpoint.h | 1 -
src/qemu/qemu_command.c | 7 -------
src/qemu/qemu_command.h | 4 ----
src/qemu/qemu_conf.c | 5 -----
src/qemu/qemu_conf.h | 8 --------
src/qemu/qemu_dbus.c | 3 ---
src/qemu/qemu_domain.c | 6 ------
src/qemu/qemu_domain.h | 3 ---
src/qemu/qemu_domain_address.h | 2 --
src/qemu/qemu_driver.c | 10 ----------
src/qemu/qemu_extdevice.c | 5 -----
src/qemu/qemu_firmware.c | 1 -
src/qemu/qemu_hostdev.c | 5 -----
src/qemu/qemu_hostdev.h | 1 -
src/qemu/qemu_hotplug.c | 4 ----
src/qemu/qemu_hotplug.h | 1 -
src/qemu/qemu_interface.c | 1 -
src/qemu/qemu_interface.h | 1 -
src/qemu/qemu_interop_config.c | 3 ---
src/qemu/qemu_migration.c | 5 -----
src/qemu/qemu_migration_cookie.c | 1 -
src/qemu/qemu_migration_cookie.h | 1 -
src/qemu/qemu_migration_params.c | 2 --
src/qemu/qemu_migration_params.h | 4 ----
src/qemu/qemu_monitor.c | 2 --
src/qemu/qemu_monitor.h | 2 --
src/qemu/qemu_monitor_json.c | 4 ----
src/qemu/qemu_monitor_json.h | 1 -
src/qemu/qemu_monitor_text.c | 2 --
src/qemu/qemu_monitor_text.h | 2 --
src/qemu/qemu_namespace.c | 1 -
src/qemu/qemu_namespace.h | 1 -
src/qemu/qemu_process.c | 2 --
src/qemu/qemu_process.h | 1 -
src/qemu/qemu_qapi.c | 2 --
src/qemu/qemu_saveimage.c | 2 --
src/qemu/qemu_saveimage.h | 2 --
src/qemu/qemu_security.h | 2 --
src/qemu/qemu_shim.c | 1 -
src/qemu/qemu_slirp.c | 3 ---
src/qemu/qemu_snapshot.c | 4 ----
src/qemu/qemu_snapshot.h | 1 -
src/qemu/qemu_tpm.c | 5 -----
src/qemu/qemu_validate.h | 1 -
src/qemu/qemu_vhost_user.c | 1 -
src/qemu/qemu_vhost_user.h | 2 --
src/qemu/qemu_vhost_user_gpu.c | 3 ---
src/qemu/qemu_vhost_user_gpu.h | 1 -
src/remote/remote_daemon.c | 3 ---
src/remote/remote_daemon.h | 1 -
src/remote/remote_daemon_config.c | 1 -
src/remote/remote_daemon_dispatch.c | 5 -----
src/remote/remote_daemon_dispatch.h | 1 -
src/remote/remote_daemon_stream.c | 1 -
src/remote/remote_driver.c | 2 --
src/remote/remote_driver.h | 1 -
src/rpc/virkeepalive.c | 3 ---
src/rpc/virnetclient.c | 1 -
src/rpc/virnetclient.h | 1 -
src/rpc/virnetclientprogram.h | 1 -
src/rpc/virnetclientstream.c | 1 -
src/rpc/virnetclientstream.h | 1 -
src/rpc/virnetdaemon.c | 2 --
src/rpc/virnetdaemon.h | 3 ---
src/rpc/virnetlibsshsession.h | 1 -
src/rpc/virnetmessage.c | 1 -
src/rpc/virnetsaslcontext.c | 3 ---
src/rpc/virnetsaslcontext.h | 1 -
src/rpc/virnetserver.c | 1 -
src/rpc/virnetserver.h | 1 -
src/rpc/virnetserverclient.c | 1 -
src/rpc/virnetserverprogram.h | 1 -
src/rpc/virnetserverservice.h | 1 -
src/rpc/virnetsocket.c | 1 -
src/rpc/virnetsshsession.c | 1 -
src/rpc/virnetsshsession.h | 1 -
src/rpc/virnettlscontext.h | 1 -
src/secret/secret_driver.c | 2 --
src/security/security_dac.c | 1 -
src/security/security_manager.h | 1 -
src/security/security_nop.c | 2 --
src/security/security_selinux.c | 2 --
src/security/security_stack.c | 1 -
src/security/security_util.c | 1 -
src/storage/parthelper.c | 1 -
src/storage/storage_backend.c | 3 ---
src/storage/storage_backend.h | 1 -
src/storage/storage_backend_fs.c | 1 -
src/storage/storage_backend_gluster.c | 1 -
src/storage/storage_backend_iscsi.c | 4 ----
src/storage/storage_backend_iscsi_direct.c | 2 --
src/storage/storage_backend_mpath.c | 1 -
src/storage/storage_backend_rbd.c | 1 -
src/storage/storage_backend_scsi.c | 3 ---
src/storage/storage_backend_vstorage.c | 2 --
src/storage/storage_driver.c | 2 --
src/storage/storage_util.c | 3 ---
src/storage/storage_util.h | 1 -
src/storage_file/storage_file_backend.c | 2 --
src/storage_file/storage_file_backend_fs.c | 4 ----
src/storage_file/storage_file_backend_gluster.c | 2 --
src/storage_file/storage_source.c | 2 --
src/test/test_driver.c | 2 --
src/test/test_driver.h | 2 --
src/util/iohelper.c | 3 ---
src/util/virarch.h | 2 --
src/util/virarptable.c | 2 --
src/util/virarptable.h | 2 --
src/util/viraudit.h | 1 -
src/util/virauth.c | 1 -
src/util/virauth.h | 1 -
src/util/virauthconfig.c | 1 -
src/util/virbpf.c | 1 -
src/util/virbuffer.c | 2 --
src/util/vircgroup.c | 3 ---
src/util/vircgroupv2devices.c | 1 -
src/util/vircgroupv2devices.h | 2 --
src/util/virconf.c | 1 -
src/util/vircrypto.c | 2 --
src/util/virdnsmasq.c | 2 --
src/util/virebtables.c | 4 ----
src/util/virendian.h | 2 --
src/util/virenum.c | 1 -
src/util/virerror.c | 1 -
src/util/virevent.h | 1 -
src/util/vireventglib.c | 1 -
src/util/vireventglib.h | 2 --
src/util/vireventthread.h | 1 -
src/util/virfcp.c | 2 --
src/util/virfdstream.c | 1 -
src/util/virfilecache.c | 2 --
src/util/virfilecache.h | 2 --
src/util/virfirewall.c | 1 -
src/util/virfirmware.c | 1 -
src/util/virgic.c | 1 -
src/util/virhook.c | 2 --
src/util/virhook.h | 2 --
src/util/virhostcpu.c | 2 --
src/util/virhostcpu.h | 1 -
src/util/virhostmem.c | 2 --
src/util/virhostuptime.c | 1 -
src/util/viridentity.c | 3 ---
src/util/virinitctl.c | 3 ---
src/util/viriptables.c | 6 ------
src/util/viriscsi.c | 2 --
src/util/virjson.c | 1 -
src/util/virkmod.c | 1 -
src/util/virlease.c | 2 --
src/util/virlockspace.c | 1 -
src/util/virlockspace.h | 1 -
src/util/virmacaddr.c | 1 -
src/util/virmacmap.c | 2 --
src/util/virmacmap.h | 1 -
src/util/virmdev.h | 1 -
src/util/virnetdevbandwidth.c | 1 -
src/util/virnetdevbridge.c | 2 --
src/util/virnetdevmacvlan.c | 2 --
src/util/virnetdevmacvlan.h | 2 --
src/util/virnetdevmidonet.c | 1 -
src/util/virnetdevtap.c | 1 -
src/util/virnetdevveth.c | 2 --
src/util/virnetdevvlan.c | 2 --
src/util/virnetlink.c | 1 -
src/util/virnetlink.h | 1 -
src/util/virnvme.c | 1 -
src/util/virobject.c | 2 --
src/util/virpci.c | 1 -
src/util/virpcivpd.c | 1 -
src/util/virperf.c | 2 --
src/util/virpidfile.c | 1 -
src/util/virpolkit.c | 2 --
src/util/virportallocator.c | 3 ---
src/util/virprobe.h | 1 -
src/util/virprocess.h | 1 -
src/util/virqemu.c | 2 --
src/util/virqemu.h | 1 -
src/util/virrandom.c | 3 ---
src/util/virresctrl.h | 3 ---
src/util/virrotatingfile.c | 1 -
src/util/virscsi.h | 1 -
src/util/virscsivhost.c | 1 -
src/util/virscsivhost.h | 1 -
src/util/virseclabel.c | 2 --
src/util/virsecret.c | 1 -
src/util/virsocketaddr.c | 2 --
src/util/virstoragefile.c | 4 ----
src/util/virtpm.c | 1 -
src/util/virusb.h | 1 -
src/util/virutil.c | 2 --
src/util/viruuid.c | 3 ---
src/vbox/vbox_XPCOMCGlue.c | 3 ---
src/vbox/vbox_common.h | 1 -
src/vbox/vbox_driver.c | 2 --
src/vbox/vbox_driver.h | 2 --
src/vbox/vbox_get_driver.h | 2 --
src/vbox/vbox_network.c | 2 --
src/vbox/vbox_storage.c | 3 ---
src/vbox/vbox_tmpl.c | 1 -
src/vbox/vbox_uniformed_api.h | 2 --
src/vmware/vmware_conf.c | 1 -
src/vmware/vmware_conf.h | 1 -
src/vmware/vmware_driver.c | 1 -
src/vmx/vmx.c | 1 -
src/vmx/vmx.h | 2 --
tests/commandtest.c | 2 --
tests/cputest.c | 2 --
tests/domainconftest.c | 2 --
tests/esxutilstest.c | 1 -
tests/eventtest.c | 2 --
tests/fchosttest.c | 1 -
tests/fdstreamtest.c | 3 ---
tests/genericxml2xmltest.c | 2 --
tests/interfacexml2xmltest.c | 2 --
tests/libxlmock.c | 2 --
tests/libxlxml2domconfigtest.c | 6 ------
tests/lxcxml2xmltest.c | 2 --
tests/networkxml2conftest.c | 2 --
tests/networkxml2firewalltest.c | 2 --
tests/networkxml2xmltest.c | 3 ---
tests/networkxml2xmlupdatetest.c | 3 ---
tests/nodedevmdevctltest.c | 2 --
tests/nodedevxml2xmltest.c | 3 ---
tests/nssmock.c | 2 --
tests/nsstest.c | 1 -
tests/nwfilterebiptablestest.c | 1 -
tests/nwfilterxml2firewalltest.c | 1 -
tests/nwfilterxml2xmltest.c | 6 ------
tests/objecteventtest.c | 3 ---
tests/openvzutilstest.c | 2 --
tests/qemuagenttest.c | 2 --
tests/qemublocktest.c | 4 ----
tests/qemucapsprobemock.c | 1 -
tests/qemucommandutiltest.c | 1 -
tests/qemucpumock.c | 1 -
tests/qemudomaincheckpointxml2xmltest.c | 2 --
tests/qemudomainsnapshotxml2xmltest.c | 2 --
tests/qemuhotplugmock.c | 1 -
tests/qemuhotplugtest.c | 3 ---
tests/qemumemlocktest.c | 2 --
tests/qemumigparamstest.c | 1 -
tests/qemumigrationcookiexmltest.c | 1 -
tests/qemumonitorjsontest.c | 2 --
tests/qemumonitortestutils.c | 2 --
tests/qemumonitortestutils.h | 1 -
tests/qemusecuritymock.c | 2 --
tests/qemuxml2argvmock.c | 6 ------
tests/qemuxml2argvtest.c | 8 --------
tests/qemuxml2xmltest.c | 3 ---
tests/scsihosttest.c | 2 --
tests/seclabeltest.c | 1 -
tests/secretxml2xmltest.c | 2 --
tests/securityselinuxhelper.c | 1 -
tests/securityselinuxlabeltest.c | 2 --
tests/securityselinuxtest.c | 3 ---
tests/sockettest.c | 1 -
tests/storagebackendsheepdogtest.c | 1 -
tests/storagepoolxml2argvtest.c | 4 ----
tests/storagepoolxml2xmltest.c | 3 ---
tests/storagevolxml2argvtest.c | 4 ----
tests/storagevolxml2xmltest.c | 3 ---
tests/sysinfotest.c | 1 -
tests/testutils.c | 4 ----
tests/testutils.h | 1 -
tests/testutilslxc.c | 1 -
tests/testutilslxc.h | 2 --
tests/testutilsqemu.c | 1 -
tests/utiltest.c | 1 -
tests/virauthconfigtest.c | 2 --
tests/virbuftest.c | 2 --
tests/vircaps2xmltest.c | 1 -
tests/vircgroupmock.c | 2 --
tests/vircgrouptest.c | 1 -
tests/virconftest.c | 1 -
tests/virdriverconnvalidatetest.c | 2 --
tests/virdrivermoduletest.c | 2 --
tests/virfilemock.c | 2 --
tests/virfiletest.c | 1 -
tests/virfilewrapper.c | 2 --
tests/virfirewallmock.c | 1 -
tests/virfirewalltest.c | 1 -
tests/virhostcputest.c | 1 -
tests/viridentitytest.c | 4 ----
tests/virkeycodetest.c | 4 ----
tests/virkmodtest.c | 1 -
tests/virlockspacetest.c | 2 --
tests/virmigtest.c | 1 -
tests/virmockstathelpers.c | 1 -
tests/virnetdaemonmock.c | 1 -
tests/virnetdevmock.c | 2 --
tests/virnetdevtest.c | 2 --
tests/virnetmessagetest.c | 2 --
tests/virnetserverclientmock.c | 1 -
tests/virnetsockettest.c | 1 -
tests/virnettlscontexttest.c | 5 -----
tests/virnettlssessiontest.c | 4 ----
tests/virnetworkportxml2xmltest.c | 2 --
tests/virnumamock.c | 3 ---
tests/virnwfilterbindingxml2xmltest.c | 4 ----
tests/virpcimock.c | 1 -
tests/virportallocatortest.c | 3 ---
tests/virrandommock.c | 1 -
tests/virschematest.c | 2 --
tests/virshtest.c | 2 --
tests/virstoragetest.c | 3 ---
tests/virstorageutiltest.c | 3 ---
tests/virstringtest.c | 3 ---
tests/virtestmock.c | 2 --
tests/virtimetest.c | 2 --
tests/viruritest.c | 1 -
tests/virusbmock.c | 3 ---
tests/virusbtest.c | 2 --
tests/vmx2xmltest.c | 2 --
tests/vshtabletest.c | 1 -
tests/xlconfigtest.c | 1 -
tests/xmconfigtest.c | 2 --
tests/xml2vmxtest.c | 1 -
tools/virsh-checkpoint.c | 2 --
tools/virsh-completer-checkpoint.c | 2 --
tools/virsh-completer-domain.c | 1 -
tools/virsh-completer-host.c | 1 -
tools/virsh-completer-interface.c | 2 --
tools/virsh-completer-network.c | 1 -
tools/virsh-completer-nodedev.c | 2 --
tools/virsh-completer-nwfilter.c | 2 --
tools/virsh-completer-pool.c | 2 --
tools/virsh-completer-secret.c | 2 --
tools/virsh-completer-snapshot.c | 2 --
tools/virsh-completer-volume.c | 2 --
tools/virsh-completer.c | 2 --
tools/virsh-console.c | 1 -
tools/virsh-domain-event.c | 2 --
tools/virsh-domain.c | 1 -
tools/virsh-nodedev.c | 1 -
tools/virsh-pool.c | 1 -
tools/virsh-snapshot.c | 1 -
tools/virsh-util.c | 1 -
tools/virsh.c | 7 -------
tools/virsh.h | 2 --
tools/virt-admin.c | 1 -
tools/virt-admin.h | 1 -
tools/virt-host-validate-common.h | 1 -
tools/virt-login-shell-helper.c | 1 -
tools/vsh-table.c | 1 -
tools/vsh.c | 1 -
tools/vsh.h | 1 -
528 files changed, 1059 deletions(-)
--
2.36.1
2 years, 5 months
[libvirt][PATCH RESEND v12 0/6] Support query and use SGX
by Haibin Huang
This patch series provides support for enabling Intel's Software Guard Extensions (SGX) feature in guest VM.
Giving the SGX support in QEMU had been merged. Intel SGX is a set of instructions that increases the security of application code and data, giving them more protection from disclosure or modification.
Developers can partition sensitive information into enclaves, which are areas of execution in memory with more security protection.
The typical flow looks below at very high level:
1. Calls virConnectGetDomainCapabilities API to domain capabilities that includes the following SGX information.
<feature>
...
<sgx supported='yes'>
<epc_size unit='KiB'>N</epc_size>
</sgx>
...
</feature>
2. User requests to start a guest calling virCreateXML() with SGX requirement. It does not support NUMA yet, since latest QEMU 6.2 release does not support NUMA.
It should contain
<devices>
...
<memory model='sgx-epc'>
<target>
<size unit='KiB'>N</size>
</target>
</memory>
...
</devices>
Please note that SGX NUMA support will be implemented in future patches.
Haibin Huang (4):
Define SGX capabilities structs
Get SGX capabilities form QMP
Convert QMP capabilities to domain capabilities
conf: expose SGX feature in domain capabilities
Lin Yang (2):
conf: Introduce SGX EPC element into device memory xml
qemu: Add command-line to generate SGX EPC memory backend
docs/formatdomain.rst | 9 +-
docs/formatdomaincaps.rst | 26 ++++
src/conf/domain_capabilities.c | 33 ++++
src/conf/domain_capabilities.h | 13 ++
src/conf/domain_conf.c | 6 +
src/conf/domain_conf.h | 1 +
src/conf/domain_validate.c | 16 ++
src/conf/schemas/domaincaps.rng | 22 ++-
src/conf/schemas/domaincommon.rng | 1 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 6 +-
src/qemu/qemu_capabilities.c | 145 ++++++++++++++++++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_capspriv.h | 4 +
src/qemu/qemu_command.c | 54 ++++++-
src/qemu/qemu_domain.c | 38 +++--
src/qemu/qemu_domain_address.c | 6 +
src/qemu/qemu_driver.c | 1 +
src/qemu/qemu_monitor.c | 10 ++
src/qemu/qemu_monitor.h | 3 +
src/qemu/qemu_monitor_json.c | 104 ++++++++++++-
src/qemu/qemu_monitor_json.h | 9 ++
src/qemu/qemu_process.c | 2 +
src/qemu/qemu_validate.c | 8 +
src/security/security_apparmor.c | 1 +
src/security/security_dac.c | 2 +
src/security/security_selinux.c | 2 +
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_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 +
.../qemu_6.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.aarch64.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 +
.../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 4 +
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 4 +
.../qemu_6.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 4 +
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 4 +
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 4 +
.../qemu_7.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 4 +
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 1 +
.../caps_6.2.0.x86_64.replies | 22 ++-
.../caps_6.2.0.x86_64.xml | 5 +
.../caps_7.0.0.x86_64.replies | 22 ++-
.../caps_7.0.0.x86_64.xml | 5 +
.../caps_7.1.0.x86_64.replies | 21 ++-
.../sgx-epc.x86_64-6.2.0.args | 37 +++++
tests/qemuxml2argvdata/sgx-epc.xml | 36 +++++
tests/qemuxml2argvtest.c | 2 +
.../sgx-epc.x86_64-6.2.0.xml | 52 +++++++
tests/qemuxml2xmltest.c | 2 +
121 files changed, 793 insertions(+), 40 deletions(-)
create mode 100644 tests/qemuxml2argvdata/sgx-epc.x86_64-6.2.0.args
create mode 100644 tests/qemuxml2argvdata/sgx-epc.xml
create mode 100644 tests/qemuxml2xmloutdata/sgx-epc.x86_64-6.2.0.xml
--
2.17.1
2 years, 5 months
[PATCH REBASE 00/17] Use virXMLPropEnum() more (part I)
by Michal Privoznik
This is rebased version of:
https://listman.redhat.com/archives/libvir-list/2022-April/229941.html
Michal Prívozník (17):
Drop needless typecast to virStorageType enum
virStorageSourceGetActualType: Change type of retval
virDomainBackupDefParse: Switch to virXMLPropEnumDefault()
virDomainDeviceAddressParseXML: Switch to virXMLPropEnumDefault()
virDomainStorageNetworkParseHost: Switch to virXMLPropEnumDefault()
virDomainHostdevSubsysSCSIDefParseXML: Switch to
virXMLPropEnumDefault()
virDomainHostdevSubsysSCSIVHostDefParseXML: Switch to
virXMLPropEnumDefault()
virDomainDiskSourceNVMeParse: Switch to virXMLPropEnumDefault()
virDomainDiskDefMirrorParse: Switch to virXMLPropEnumDefault()
virDomainDiskSourcePoolDefParse: Switch to virXMLPropEnumDefault()
virDomainDiskDefParseSourceXML: Switch to virXMLPropEnumDefault()
virDomainChrDefParseXML: Switch to virXMLPropEnumDefault()
virDomainTPMDefParseXML: Switch to virXMLPropEnumDefault()
virDomainPanicDefParseXML: Switch to virXMLPropEnumDefault()
virDomainInputDefParseXML: Switch to virXMLPropEnumDefault()
virDomainHubDefParseXML: Switch to virXMLPropEnumDefault()
virDomainTimerDefParseXML: Switch to virXMLPropEnumDefault()
src/ch/ch_monitor.c | 2 +-
src/conf/backup_conf.c | 16 +-
src/conf/backup_conf.h | 2 +-
src/conf/device_conf.c | 12 +-
src/conf/device_conf.h | 4 +-
src/conf/domain_audit.c | 2 +-
src/conf/domain_conf.c | 494 ++++++------------
src/conf/domain_conf.h | 54 +-
src/conf/domain_validate.c | 6 +-
src/conf/storage_source_conf.c | 2 +-
src/conf/storage_source_conf.h | 8 +-
src/conf/virchrdev.c | 29 +
src/libxl/libxl_conf.c | 32 +-
src/libxl/libxl_domain.c | 2 +-
src/libxl/xen_common.c | 29 +-
src/libxl/xen_xl.c | 7 +-
src/libxl/xen_xm.c | 3 +
src/locking/domain_lock.c | 2 +-
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/qemu/qemu_backup.c | 2 +-
src/qemu/qemu_block.c | 14 +-
src/qemu/qemu_cgroup.c | 12 +
src/qemu/qemu_command.c | 49 +-
src/qemu/qemu_domain.c | 44 +-
src/qemu/qemu_domain_address.c | 4 +-
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_hotplug.c | 4 +-
src/qemu/qemu_migration.c | 6 +-
src/qemu/qemu_monitor.c | 54 +-
src/qemu/qemu_monitor_json.c | 4 +-
src/qemu/qemu_process.c | 10 +-
src/qemu/qemu_snapshot.c | 16 +-
src/qemu/qemu_validate.c | 19 +-
src/security/security_apparmor.c | 6 +-
src/security/security_dac.c | 8 +-
src/security/security_selinux.c | 28 +-
.../storage_file_backend_gluster.c | 2 +-
src/storage_file/storage_source.c | 4 +-
.../storage_source_backingstore.c | 16 +-
src/vmx/vmx.c | 26 +
tests/qemuxml2argvtest.c | 2 +-
tests/testutilsqemu.c | 2 +-
43 files changed, 557 insertions(+), 489 deletions(-)
--
2.35.1
2 years, 5 months
[PATCH 00/15] docs: Convert some pages to rST and clean up (part 6)
by Peter Krempa
After this series only 2 non-generated HTML files remain:
- index.html.in
- 404.html.in
It is possible to convert these but the utility of doing so may not be
great for now.
Additionally this series cleans up some long-broken links and removes
unneeded raw HTML passthrough to declare anchors.
Pavel Hrdina (2):
docs: storage: rename headers to remove duplicate names
docs: Convert 'storage' page to rst
Peter Krempa (13):
docs: formatsecret: Correct link to storage volume XML definition
Correct links to TLS certificate setup page
docs: Convert 'remote' page to rst
docs: remote: Remove 'Limitations' paragraph
docs: Convert 'uri' page to rst
docs: uri: Remove old 'NULL URI' section
docs: uri: Consolidate paragraphs on Xen URIs
docs: uri: Move the 'test' hypervisor under a 'local hypervisors
heading
docs: uri: Rewrite section about transport protocols and extra
parameters
docs: governance: Remove unused HTML anchors
docs: contact: Remove HTML anchors and adjust documents using them
docs: bugs: Remove raw HTML anchor 'quality'
docs: formatdomain: Remove old unreferenced HTML anchors
.gitlab/issue_templates/bug.md | 2 +-
docs/bugs.rst | 5 -
docs/contact.rst | 11 +-
docs/contribute.rst | 10 +-
docs/drvesx.rst | 5 +-
docs/formatdomain.rst | 112 -----
docs/formatsecret.rst | 8 +-
docs/governance.rst | 5 -
docs/kbase/tlscerts.rst | 4 +-
docs/meson.build | 6 +-
docs/page.xsl | 2 +-
docs/remote.html.in | 297 ------------
docs/remote.rst | 209 +++++++++
docs/securityprocess.rst | 4 +-
docs/storage.html.in | 833 ---------------------------------
docs/storage.rst | 790 +++++++++++++++++++++++++++++++
docs/uri.html.in | 507 --------------------
docs/uri.rst | 405 ++++++++++++++++
tools/virt-pki-validate.in | 10 +-
19 files changed, 1431 insertions(+), 1794 deletions(-)
delete mode 100644 docs/remote.html.in
create mode 100644 docs/remote.rst
delete mode 100644 docs/storage.html.in
create mode 100644 docs/storage.rst
delete mode 100644 docs/uri.html.in
create mode 100644 docs/uri.rst
--
2.35.1
2 years, 5 months
[PATCH RESEND 0/3] network: Generate TFTP config regardless of DHCP
by Michal Privoznik
This is rebased version of:
https://listman.redhat.com/archives/libvir-list/2021-December/226045.html
Michal Prívozník (3):
network: Initialize variables in networkDnsmasqConfContents()
network: Separate DHCP config generator into a function
network: Generate TFTP config regardless of DHCP
src/network/bridge_driver.c | 259 ++++++++++--------
.../networkxml2confdata/netboot-network.conf | 4 +-
tests/networkxml2confdata/netboot-tftp.conf | 13 +
tests/networkxml2confdata/netboot-tftp.xml | 9 +
tests/networkxml2conftest.c | 1 +
tests/networkxml2xmlin/netboot-tftp.xml | 1 +
tests/networkxml2xmlout/netboot-tftp.xml | 1 +
tests/networkxml2xmltest.c | 1 +
8 files changed, 170 insertions(+), 119 deletions(-)
create mode 100644 tests/networkxml2confdata/netboot-tftp.conf
create mode 100644 tests/networkxml2confdata/netboot-tftp.xml
create mode 120000 tests/networkxml2xmlin/netboot-tftp.xml
create mode 120000 tests/networkxml2xmlout/netboot-tftp.xml
--
2.35.1
2 years, 5 months
[PATCH 00/67] docs: Fix and clean up anchor links
by Peter Krempa
First 50 patches remove the use of raw HTML passthrough in
formatdomain.rst, which is the only outstanding place which still does.
Most of the work was done by a ad-hoc bash script, but manual tweaks
were needed. Since this series also contains a test script which
validates linking I'm not going to publish the conversion script.
The rest of the series then cleans up pre-existing broken links and adds
the aforementioned checker script.
One more change is to prevent the use of external references in RST to
refer to the same file. All usage was converted to local references and
a syntax check was added.
One slight drawback of the checker script is that it works on generated
HTML files and thus the error message contains the output file name and
not the source RST document.
Output after the fixes can be browsed at:
https://gitlab.com/pipo.sk/libvirt/-/jobs/2528184702/artifacts/browse/web...
Peter Krempa (67):
docs: formatdomain: Remove 'elements' anchor
docs: formatdomain: Remove 'elementsMetadata' anchor
docs: formatdomain: Remove 'elementsOS' anchor
docs: formatdomain: Remove 'elementsOSBIOS' anchor
docs: formatdomain: Remove 'elementsOSContainer' anchor
docs: formatdomain: Remove 'elementsSysinfo' anchor
docs: formatdomain: Remove 'elementsCPUAllocation' anchor
docs: formatdomain: Remove 'elementsIOThreadsAllocation' anchor
docs: formatdomain: Remove 'elementsCPUTuning' anchor
docs: formatdomain: Remove 'elementsMemoryAllocation' anchor
docs: formatdomain: Remove 'elementsMemoryBacking' anchor
docs: formatdomain: Remove 'elementsMemoryTuning' anchor
docs: formatdomain: Remove 'elementsNUMATuning' anchor
docs: formatdomain: Remove 'elementsBlockTuning' anchor
docs: formatdomain: Remove 'elementsCPU' anchor
docs: formatdomain: Remove 'hmat' anchor
docs: formatdomain: Remove 'elementsEvents' anchor
docs: formatdomain: Remove 'elementsFeatures' anchor
docs: formatdomain: Remove 'elementsDevices' anchor
docs: formatdomain: Remove 'elementsDisks' anchor
docs: formatdomain: Remove 'elementsAddress' anchor
docs: formatdomain: Remove 'elementsVirtio' anchor
docs: formatdomain: Remove 'elementsVirtioTransitional' anchor
docs: formatdomain: Remove 'elementsControllers' anchor
docs: formatdomain: Remove 'elementsHostDev' anchor
docs: formatdomain: Remove 'elementsNICS' anchor
docs: formatdomain: Remove 'elementsNICSDirect' anchor
docs: formatdomain: Remove 'elementsNICSTargetOverride' anchor
docs: formatdomain: Remove 'elementQoS' anchor
docs: formatdomain: Remove 'elementVlanTag' anchor
docs: formatdomain: Remove 'elementPort' anchor
docs: formatdomain: Remove 'mtu' anchor
docs: formatdomain: Remove 'coalesce' anchor
docs: formatdomain: Remove 'elementVhostuser' anchor
docs: formatdomain: Remove 'elementsGraphics' anchor
docs: formatdomain: Remove 'elementsVideo' anchor
docs: formatdomain: Remove 'elementsConsole' anchor
docs: formatdomain: Remove 'elementCharSerial' anchor
docs: formatdomain: Remove 'elementCharSerialAndConsole' anchor
docs: formatdomain: Remove 'elementsCharHostInterface' anchor
docs: formatdomain: Remove 'elementsCharHost' anchor
docs: formatdomain: Remove 'elementsAudio' anchor
docs: formatdomain: Remove 'elementsTpm' anchor
docs: formatdomain: Remove 'elementsMemory' anchor
docs: formatdomain: Remove 'elementsIommu' anchor
docs: formatdomain: Remove 'vsock' anchor
docs: formatdomain: Remove 'seclabel' anchor
docs: formatdomain: Remove 'keywrap' anchor
docs: formatdomain: Remove 'launchSecurity' anchor
docs: formatdomain: Remove the 'anchor' role
docs: formatdomain: Use local reference directly
docs: uri: Fix link to libvirtd configuration section
syntax-check: Add check prohibiting remote reference to local file
docs: page.xsl: Fix link to 'mailing-lists' section
docs: domainstatecapture: Fix broken links
docs: rpc: Fix broken headings
docs: formatcaps: Fix anchors of links into formatdomain.rst
scripts: hvsupport: Remove link into the 'html' directory
docs: Fix link to 'tlscerts' article
docs: Remove extra leading slash in 'api' and 'formatdomaincaps' pages
docs: Fix links in kbase/internals
docs: kbase/kvm-realtime: Fix few links
docs: kbase/tlscerts: Fix links
docs: remote: Fix anchor names in links to uri.html
uri: Fix link to qemu KVM example config
docs: formatstorageencryption: Use correct anchor into formatsecret
page
docs: Add HTML reference checker
build-aux/syntax-check.mk | 7 +
docs/api.rst | 2 +-
docs/docs.rst | 2 +-
docs/drvlxc.rst | 2 +-
docs/formatbackup.rst | 6 +-
docs/formatcaps.rst | 10 +-
docs/formatcheckpoint.rst | 2 +-
docs/formatdomain.rst | 360 ++++++++++++-----------------
docs/formatdomaincaps.rst | 20 +-
docs/formatnetwork.rst | 8 +-
docs/formatnetworkport.rst | 4 +-
docs/formatnode.rst | 2 +-
docs/formatsecret.rst | 12 +-
docs/formatsnapshot.rst | 8 +-
docs/formatstorageencryption.rst | 2 +-
docs/kbase/domainstatecapture.rst | 12 +-
docs/kbase/internals/eventloop.rst | 2 +-
docs/kbase/internals/migration.rst | 2 +-
docs/kbase/internals/rpc.rst | 16 +-
docs/kbase/kvm-realtime.rst | 10 +-
docs/kbase/launch_security_sev.rst | 2 +-
docs/kbase/locking-sanlock.rst | 2 +-
docs/kbase/memorydevices.rst | 2 +-
docs/kbase/s390_protected_virt.rst | 2 +-
docs/kbase/tlscerts.rst | 8 +-
docs/manpages/virsh.rst | 8 +-
docs/meson.build | 11 +
docs/page.xsl | 2 +-
docs/remote.rst | 4 +-
docs/storage.rst | 6 +-
docs/uri.rst | 4 +-
scripts/check-html-references.py | 153 ++++++++++++
scripts/hvsupport.py | 2 +-
scripts/meson.build | 1 +
34 files changed, 402 insertions(+), 294 deletions(-)
create mode 100755 scripts/check-html-references.py
--
2.35.3
2 years, 5 months
[PATCH] lib: Be consistent about vm->pid
by Michal Privoznik
The virDomainObj struct has @pid member where the domain's
hypervisor PID is stored (e.g. QEMU/bhyve/libvirt_lxc/... PID).
However, we are not consistent when it comes to shutoff state.
Initially, because virDomainObjNew() uses g_new0() the @pid is
initialized to 0. But when domain is shut off, some functions set
it to -1 (virBhyveProcessStop, virCHProcessStop, qemuProcessStop,
..).
In other places, the @pid is tested to be 0, on some other places
it's tested for being negative and in the rest for being
positive.
To solve this inconsistency we can stick with either value, -1 or
0. I've chosen the latter as it's safer IMO. For instance if by
mistake we'd kill(vm->pid, SIGTERM) we would kill ourselves
instead of init's process group.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/bhyve/bhyve_process.c | 8 ++++----
src/ch/ch_domain.c | 2 +-
src/ch/ch_process.c | 2 +-
src/conf/domain_conf.h | 2 +-
src/hypervisor/domain_cgroup.c | 2 +-
src/lxc/lxc_process.c | 6 +++---
src/openvz/openvz_conf.c | 2 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_process.c | 4 ++--
tests/qemusecuritytest.c | 1 -
10 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c
index 18002b559b..d46786d393 100644
--- a/src/bhyve/bhyve_process.c
+++ b/src/bhyve/bhyve_process.c
@@ -293,7 +293,7 @@ virBhyveProcessStop(struct _bhyveConn *driver,
return 0;
}
- if (vm->pid <= 0) {
+ if (vm->pid == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid PID %d for VM"),
(int)vm->pid);
@@ -329,7 +329,7 @@ virBhyveProcessStop(struct _bhyveConn *driver,
bhyveProcessAutoDestroy);
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
- vm->pid = -1;
+ vm->pid = 0;
vm->def->id = -1;
bhyveProcessStopHook(vm, VIR_HOOK_BHYVE_OP_RELEASE);
@@ -344,7 +344,7 @@ virBhyveProcessStop(struct _bhyveConn *driver,
int
virBhyveProcessShutdown(virDomainObj *vm)
{
- if (vm->pid <= 0) {
+ if (vm->pid == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid PID %d for VM"),
(int)vm->pid);
@@ -433,7 +433,7 @@ virBhyveProcessReconnect(virDomainObj *vm,
if (!virDomainObjIsActive(vm))
return 0;
- if (!vm->pid)
+ if (vm->pid == 0)
return 0;
virObjectLock(vm);
diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c
index bb489a74e3..5ab526ba1b 100644
--- a/src/ch/ch_domain.c
+++ b/src/ch/ch_domain.c
@@ -405,7 +405,7 @@ virCHDomainGetMachineName(virDomainObj *vm)
virCHDriver *driver = priv->driver;
char *ret = NULL;
- if (vm->pid > 0) {
+ if (vm->pid != 0) {
ret = virSystemdGetMachineNameByPID(vm->pid);
if (!ret)
virResetLastError();
diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c
index 977082d585..4247902bcf 100644
--- a/src/ch/ch_process.c
+++ b/src/ch/ch_process.c
@@ -574,7 +574,7 @@ virCHProcessStop(virCHDriver *driver G_GNUC_UNUSED,
vm->def->name);
}
- vm->pid = -1;
+ vm->pid = 0;
vm->def->id = -1;
g_clear_pointer(&priv->machineName, g_free);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 6906db4af5..e7e0f24443 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3059,7 +3059,7 @@ struct _virDomainObj {
virObjectLockable parent;
virCond cond;
- pid_t pid;
+ pid_t pid; /* 0 for no PID, avoid negative values like -1 */
virDomainStateReason state;
unsigned int autostart : 1;
diff --git a/src/hypervisor/domain_cgroup.c b/src/hypervisor/domain_cgroup.c
index 8072465615..7265325406 100644
--- a/src/hypervisor/domain_cgroup.c
+++ b/src/hypervisor/domain_cgroup.c
@@ -517,7 +517,7 @@ virDomainCgroupSetupCgroup(const char *prefix,
bool privileged,
char *machineName)
{
- if (!vm->pid) {
+ if (vm->pid == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Cannot setup cgroups until process is started"));
return -1;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 9722d8e1de..d162812a74 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -217,7 +217,7 @@ static void virLXCProcessCleanup(virLXCDriver *driver,
lxcProcessRemoveDomainStatus(cfg, vm);
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
- vm->pid = -1;
+ vm->pid = 0;
vm->def->id = -1;
if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback)
@@ -892,7 +892,7 @@ int virLXCProcessStop(virLXCDriver *driver,
_("Some processes refused to die"));
return -1;
}
- } else if (vm->pid > 0) {
+ } else if (vm->pid != 0) {
/* If cgroup doesn't exist, just try cleaning up the
* libvirt_lxc process */
if (virProcessKillPainfully(vm->pid, true) < 0) {
@@ -1033,7 +1033,7 @@ virLXCProcessReadLogOutputData(virDomainObj *vm,
bool isdead = false;
char *eol;
- if (vm->pid <= 0 ||
+ if (vm->pid == 0 ||
(kill(vm->pid, 0) == -1 && errno == ESRCH))
isdead = true;
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 191c79e1e2..79ab786355 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -528,7 +528,7 @@ int openvzLoadDomains(struct openvz_driver *driver)
if (STREQ(status, "stopped")) {
virDomainObjSetState(dom, VIR_DOMAIN_SHUTOFF,
VIR_DOMAIN_SHUTOFF_UNKNOWN);
- dom->pid = -1;
+ dom->pid = 0;
} else {
virDomainObjSetState(dom, VIR_DOMAIN_RUNNING,
VIR_DOMAIN_RUNNING_UNKNOWN);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 31e60c7359..8ebf152d95 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -10741,7 +10741,7 @@ qemuDomainGetMachineName(virDomainObj *vm)
virQEMUDriver *driver = priv->driver;
char *ret = NULL;
- if (vm->pid > 0) {
+ if (vm->pid != 0) {
ret = virSystemdGetMachineNameByPID(vm->pid);
if (!ret)
virResetLastError();
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 07acb1c427..cbcc480089 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8239,7 +8239,7 @@ void qemuProcessStop(virQEMUDriver *driver,
g_clear_pointer(&vm->deprecations, g_free);
vm->ndeprecations = 0;
vm->taint = 0;
- vm->pid = -1;
+ vm->pid = 0;
virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, reason);
for (i = 0; i < vm->def->niothreadids; i++)
vm->def->iothreadids[i]->thread_id = 0;
@@ -8969,7 +8969,7 @@ qemuProcessReconnectHelper(virDomainObj *obj,
g_autofree char *name = NULL;
/* If the VM was inactive, we don't need to reconnect */
- if (!obj->pid)
+ if (obj->pid == 0)
return 0;
data = g_new0(struct qemuProcessReconnectData, 1);
diff --git a/tests/qemusecuritytest.c b/tests/qemusecuritytest.c
index 924c625a4c..4e2343b7d7 100644
--- a/tests/qemusecuritytest.c
+++ b/tests/qemusecuritytest.c
@@ -54,7 +54,6 @@ prepareObjects(virQEMUDriver *driver,
if (!(vm = virDomainObjNew(driver->xmlopt)))
return -1;
- vm->pid = -1;
priv = vm->privateData;
priv->chardevStdioLogd = false;
priv->rememberOwner = true;
--
2.35.1
2 years, 5 months