Commit Graph

4687 Commits

Author SHA1 Message Date
Peter Krempa
1a883c9a7c virsh: cmdDomdisplayReload: Require option name for --type
As this command was introduced in this release add the flag requiring to
pass optionname.

This is needed to actually disallow positional parsing of the value
despite documenting that the flag name is required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-03-25 16:18:32 +01:00
Rayhan Faizel
5c70a7e328 conf: Introduce support for usb-mtp devices
Expose usb-mtp device as another type of <filesystem/>.

Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-03-19 17:36:19 +01:00
Zheng Yan
c9caf53d9b virsh: Introduce domdisplay-reload command
Introduce the domdisplay-reload command to make the domain reload
its graphics certificates
   #virsh domdisplay-reload <domain> --type <type>

Signed-off-by: Zheng Yan <yanzheng759@huawei.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-03-08 17:00:15 +01:00
Jiri Denemark
75ace65104 docs: Update documentation of CPU models in domain caps
Using check='none' when starting a domain with a CPU model marked as
usable is no longer needed as libvirt will do the right thing even with
check='partial'.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-03-07 14:32:20 +01:00
Peter Krempa
c472736062 docs: newapi: Fix generation of type definition tables
Ensure that all rows have 3 columns and avoid generation of emtpy
elements which would be turned by the XML formatter into non-pair td/tr
tags which don't work properly with HTML5 parsers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:56 +01:00
Peter Krempa
620cbfaea5 docs: newapi: Properly skip ACL entries if empty
The source document can contain an empty '@flags' attribute which passes
the test but generates an empty element. Check that flags is non-empty
to trigger the fallback.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:56 +01:00
Peter Krempa
6f4485a453 docs: newapi: Avoid table where every row has an cell with 'colspan'
The HTML standard requires that a table column must include at least one
row which defines it exclusively, thus having a table where all rows
unite it via 'colspan' is illegal.

Modify the enum value generator to always output the description field
even when it's empty rather than uniting it, as in case when each value
doesn't have a description the generated document would violate the
standard.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:56 +01:00
Peter Krempa
47a8ff9979 docs: newapi: Avoid empty <div>s when there is no description
The various objects we generate API for may have empty description in
which case an empty div would be generated when processing the API
description. As we're using XML output mode the generator would shorten
such divs to the non-pair empty element version, which doesn't work well
with HTML5 parsers requiring a pair tag for <div>

Avoid empty description <div> elements altogether by skipping it if the
description is empty.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:56 +01:00
Peter Krempa
3a0af92df6 docs: newapi: Don't generate empty <div> in template for ACL permissions
If an API has no ACLs an empty <div class='acl'/> would be generated
which is mis-interpreted by browsers when creating DOM to nest any
subsequent elements under it.

Don't generate the ACL section div unless it will be filled.

Best viewed with 'git show -w'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:56 +01:00
Peter Krempa
bf4a709ebe docs: index: Fix import of blog planet javascript
Similarly to previous commit drop the 'type' attribute which is frowned
upon by the HTML standard.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:55 +01:00
Peter Krempa
6ecbc16050 docs: page: Fix declaration of main javascript source
Per the w3 html validator a HTML/XML comment is not allowed inside the
<script> tag, use a space instead as it must be a pair tag.

Additionally drop the 'type' attribute as it's not needed (validator
warns about it).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:55 +01:00
Peter Krempa
e7ddd7e8e4 docs: page: Add 'lang="en"' for all HTML output documents
Per the w3 HTML validator the 'lang' attribute is suggested.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:55 +01:00
Peter Krempa
e49b305c56 docs: site: Don't generate '<?xml' header for HTML documents
Skip the XML header as it's invalid with <!DOCTYPE HTML> both for the
RST-generated pages and for the API docs generated from the API XML.

Additionally remove the spurious xsl:output directive from newapi.xsl
which is ignored and thus misleading.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2024-03-01 12:51:55 +01:00
Andrea Bolognani
96777db719 docs: Other fixes to :since: tags
Make sure that they're entirely contained within a single line
and that punctuation is used in a way that doesn't make the
resulting HTML look weird.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
fd1dac6cd4 docs: Rewrite a few awkward sections
Address several oddities, and bring them in line with the style
used for the vast majority of our documentation. In a couple of
cases, some of the possible values for an attribute were listed
with :since: information matching that off the attribute itself,
making it redundant.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
e833c3d122 docs: Leave kernel version out of :since:
Tweak things so that the required kernel version is still
listed, just not as part of the :since: tag.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
f80dc130ed docs: Fix a few weird :since: tags
These either mention libvirt explicitly, which is something
that we generally don't do, or lack the word "since", which
makes the resulting HTML awkward.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
4abadea48d docs: Don't use "line blocks"
It's unclear why the conversion process decided to insert
them, but they don't seem to do much.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
93e546baff docs: Fix list of values
One of them got chopped up.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
82b61dbe65 docs: Remove unnecessary whitespace
It slipped in during the conversion to reStructuredText.

In one case, part of the preformatted text shouldn't have been
marked as such, so that's addressed too. A spurious opening
parenthesis is dropped as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Andrea Bolognani
c780be11d6 docs: Format lists of files better
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 12:10:27 +01:00
Boris Fiuczynski
8cb1616226 virsh: add nodedev-update
Add ability to update node devices.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 11:13:32 +01:00
Boris Fiuczynski
e4abc0789c virsh: doc fix on nodedev-list
Commit 26136e3 allowed to use option all with option tree but did not
update the manpage.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 11:03:18 +01:00
Boris Fiuczynski
4476751e53 tools: add switches persistent and transient to nodedev-list
Now that we can filter persistent and transient node devices in
virConnectListAllNodeDevices(), add these switches also to the
virsh nodedev-list command.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 11:02:44 +01:00
Boris Fiuczynski
6fcf613c6f tools: add option inactive to nodedev-dumpxml
Allow to dump the XML of the persistent mdev when the mdev has been
started instead of the current state only.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-02-26 11:00:04 +01:00
Peter Krempa
8d9e1f7718 docs: domain: Fix iothread to virtqueue mapping example
Each queue can be referenced only once and queues are numbered starting
from 0. Modify the example to show a valid configuration of one
iothread servicing more queues.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-02-16 16:15:18 +01:00
Peter Krempa
da3b0468f3 docs: domain: Fix broken rST clauses
Fix few malformed rST clauses breaking the 'Since' label and one
internal link.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2024-02-16 16:15:18 +01:00
Andrea Bolognani
3f01ecd830 docs: Improve documentation for dies and clusters
I've seen examples in the wild of the cluster attribute having
non-zero value on x86_64.

This is obviously quite confusing, but it's the information that
Linux exposes to userspace and we don't really have a way to tell
apart a valid die/cluster ID from a dummy one.

What ultimately matters is that the underlying assumptions about
topology are respected, which they are: in the x86_64 cases that
I have analyzed, for example, each "cluster" contained exactly
one core, so any program that would use this information to
influence guest topology decisions would be unaffected by the
additional level showing up in the hierarchy.

In an attempt to reduce confusion, remove any reference to any
specific value for the attributes having any special meaning
attached to it.

In fact, since there are plans to make it possible to create
guests with multiple CPU clusters on x86_64, rework the note
into a more generic warning cautioning users that an attribute
showing up here does not imply that the same attribute can be
used when defining a guest CPU topology.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2024-02-08 18:41:47 +01:00
Peter Krempa
c4e35af08c docs: page.xsl: Split up 'href_base' for assets and links
To allow reuse of this template as-is in libvirt-wiki, we need to be
able to specify a distinct asset_href_base and link_href_base. Adjust
the template to allow that.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
334858bd40 docs: xsl: Properly propagate 'href_base' as XSL template parameter
Propagate it as a parameter both from site.xsl and from newapi.xsl, the
latter of which declared it as a variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
8c0e313339 docs: Move 'html including' from page.xsl to site.xsl
Strip down the main template as much as possible.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
799e38ef31 css: Move generic styles to 'generic.css'
Move the few generic styles to the appropriate document. 'libvirt.css'
will now be a compilation of styles related only to libvirt.org.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
93030fa381 css: Move styles for the generated API documents to libvirt-api.css
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
e460a37512 css: Remove unused CSS for migration support matrix table
The 'table tbody td.y' and 'table tbody td.n' selectors don't exist
since commit 8841302e3d which converted
the table to rST.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
5dfc6e4e47 css: Split out page templated styles to 'libvirt-template.css'
Separate the styles related to the main page template and the build
process specifics (docutils-originated) into a separate CSS file.

Hint: Best viewed with 'git show --color-moved=blocks'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
52145c8997 css: mobile: Split up libvirt.org specific styles from main template style
Separate the libvirt.org specific stuff from the main template style so
that the latter can be reused in libvirt-wiki without modification.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
753a6add46 js: Separate the virt-tools blog planet loader code
In order to promote simple assets sharing between main libvirt web and
the libvirt-wiki separate the virt tools blog feed loader from the main
code used for search.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:47 +01:00
Peter Krempa
da851ed184 docs: page.xsl: Fix headerlinks with new docutils
New docutils generates a <section> element rather than a <div
class='section'> as it did before thus breaking our headerlink
generator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-08 16:48:46 +01:00
Jiri Denemark
43c0325b10 network: Make virtual domains resolvable from the host
This patch adds a new attribute "register" to the <domain> element. If
set to "yes", the DNS server created for the virtual network is
registered with systemd-resolved as a name server for the associated
domain. The names known to the dnsmasq process serving DNS and DHCP
requests for the virtual network will then be resolvable from the host
by appending the domain name to them.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-02-07 14:19:42 +01:00
Jiri Denemark
5e95cedbb2 docs: Fix typo in network XML documentation
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2024-02-01 21:58:38 +01:00
Michal Privoznik
5325820585 conf: Introduce dynamicMemslots attribute for virtio-mem
Introduced in v8.2.0-rc0~74^2~2, QEMU now allows setting
.dynamic-memslots attribute for virtio-mem-pci devices. When
turned on, it allows memory exposed to guest to be split into
multiple memslots and thus smaller memory footprint (see the
original commit for detailed explanation).

Therefore, introduce new <target/> attribute which will control
that QEMU knob.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-30 10:44:36 +01:00
Yalan Zhang
6828c6eb67 Add explanation about the attribute "delay"
The libvirt created linux bridge has a configurable value "delay",
the default value is "0", but it will not take effect. That's because
kernel has a minimum value for linux bridge. Add some explanation
about it in the document.

Signed-off-by: Yalan Zhang <yalzhang@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-01-25 16:07:13 +01:00
Peter Krempa
5969ad097d tests: Rename 'qemuxml2argvtest' to 'qemuxmlconftest'
Since this tests inactive/config XML files rename it accordingly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-01-17 17:31:12 +01:00
Peter Krempa
70c6084cf0 tests: Remove qemuxml2xmltest
The full functionality was merged into qemuxmlconftest.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-01-17 17:31:12 +01:00
Andrea Bolognani
1968f69b01 docs: Document CPU clusters
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-15 15:30:34 +01:00
Andrea Bolognani
032d67311a docs: Improve documentation for CPU topology
On the guest configuration side, mention that support for the
"dies" attribute was introduced in libvirt 6.1.0 and clarify
that the ability to use non-default values is subject to
architecture and machine limitations.

On the host capabilities side, the documentation was pretty
much entirely missing. It's still far from perfect, but anything
is better than having no information at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-15 15:26:31 +01:00
Peter Krempa
0cb7b1b2c3 conf: Add possibility to configure multiple iothreads per disk
Introduce a new <iothreads> sub-element of disk's <driver> which will
allow configuring multiple iothreads and also map them to specific
virt-queues of virtio devices.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-01-08 09:27:31 +01:00
Laine Stump
8b93d78c83 conf: support manually specifying VFIO variant driver in <hostdev> XML
This patch makes it possible to manually specify which VFIO variant
driver to use for PCI hostdev device assignment, so that, e.g. you
could force use of a VFIO "variant" driver, with e.g.

  <driver model='mlx5_vfio_pci'/>

or alternately to force use of the generic vfio-pci driver with

  <driver model='vfio-pci'/>

when libvirt would have normally (after applying a subsequent patch)
found a "better match" for a device in the active kernel's
modules.alias file. (The main potential use of this manual override
would probably be to work around a bug in a new VFIO variant driver by
temporarily not using that driver).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-08 01:00:08 -05:00
Laine Stump
956e1ca6aa tests: remove explicit <driver name='vfio'/> from hostdev test cases
The long-deprecated use of <driver name='vfio|xen|kvm'/> in domain xml
for <hostdev> devices was only ever necessary during the period when
libvirt (and the Linux kernel) supported both VFIO and "legacy KVM"
styles of hostdev device assignment for QEMU. This became pointless
many years ago when legacy KVM device assignment was removed from the
kernel, and support for that style of device assignment was completely
disabled in the libvirt source in 2019 (commit
v5.6.0-316-g2e7225ea8c).

Nevertheless, there were instances of <driver name='vfio'/> in the
unit test data that were then (unnecessarily) propagated to several
more tests over the years. This patch cleans out those unnecessary
explicit settings of driver name='vfio' in all QEMU unit test data,
proving that the attribute is no longer (externally) needed. (A later
patch which adds a 2nd attribute to the <driver> element will include
a test case that explicitly exercises the driver name attribute).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2024-01-07 23:59:00 -05:00
Foster Snowhill
419ad1ab49 docs: fix typo in qemu-passthrough-security
Signed-off-by: Foster Snowhill <2486761-ForstPenguin@users.noreply.gitlab.com>
2024-01-03 16:05:03 +00:00