Commit Graph

45464 Commits

Author SHA1 Message Date
Peter Krempa
2a8946ca7e docs: Convert 'formatnetwork' page to rst
Additionally hyperlinks in other parts of the documentation are updated
to match.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
8b3d9314ae docs: Convert 'formatcaps' page to rst
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Pavel Hrdina
f01f957792 docs: Convert 'formatnwfilter' page to rst
Also adjust direct links from other pages.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
5002ed37f3 docs: pci-hotplug: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
5b1eb476a4 docs: kbase/tlscerts: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
ffef3fcd7b docs: kbase/launch_security_sev: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
a87d8d4277 docs: drvsecret: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
6d9ae27f62 docs: drvnodedev: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
a070fecbf8 docs: drvesx: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
79070dd24c docs: drvbhve: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:48 +02:00
Peter Krempa
182a12789a docs: drivers: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:47 +02:00
Peter Krempa
fb0fc32ba9 docs: api: Fix local anchor links
Original conversion didn't properly convert local links. Fix them by
pointing to the section name. In certain cases this requires
reformulation of the text.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:47 +02:00
Peter Krempa
b7d936c5c2 docs: meson: Sort list of RST files to build
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-19 16:19:47 +02:00
Andrea Bolognani
703054cfec qemu: Retire QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
a277dea0a7 qemu: Stop setting QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
519a2c5577 qemu: Assume QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT
All QEMU versions we support have this feature.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
b506874f9f qemu: Retire QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
72427767dd qemu: Stop setting QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
9f1925d718 qemu: Assume QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT
All QEMU versions we support have this feature.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
4b3b14138b tests: Drop pseries-machine-max-cpu-compat
This was supposed to test the behavior when
QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT is present, but these
days that's always the case and pseries-cpu-compat already
provides all the coverage we need.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2022-04-19 15:43:17 +02:00
Andrea Bolognani
8f651ad4d2 util: Fix stubs for virProcessGet{Stat,Sched}Info()
Commit d73852c499 moved the original QEMU-specific helpers to
the utils module, which resulted in build failures on non-Unix
platforms due to the unconditional use of Unix-only symbols such
as _SC_CLK_TCK.

To deal with that situation, commit d7c64453aa made the helpers
Linux-only and added stubs for other platforms that, when called,
would always fail with ENOSYS.

However the original helpers had been carefully written so that,
while they would only be able to produce useful output on Linux,
they would still succeed on the other Unix platforms where we
build the QEMU driver.

Restore the original behavior so that calling APIs such as
virDomainGetInfo() can once again work on FreeBSD and macOS.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/298
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-04-19 15:43:12 +02:00
Michal Privoznik
48b9a6ae31 qemu: Fetch info on NVDIMM-s too when updating memory devices
Sometimes it may come handy to learn what address is a NVDIMM
mapped to inside a guest. While users can provide an address they
want to have NVDIMM mapped to, it's optional. Fortunately, when a
domain is being started we issue the 'query-memory-devices'
monitor command and the reply is the same for 'dimm' and 'nvdimm'
types. Therefore, updating NVDIMM address is trivial.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-04-19 13:31:53 +02:00
Tim Wiederhake
6be7beb3bd vz_driver: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:43 +02:00
Tim Wiederhake
c8f5b33631 security_manager: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:43 +02:00
Tim Wiederhake
122efa6a07 virnetserverclient: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:43 +02:00
Tim Wiederhake
db16792aa9 virnetserver: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:43 +02:00
Tim Wiederhake
42fccb4716 virNetServerProcessClients: Remove goto
This gets rid of the goto and prepares the function for automatic
mutex management.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:43 +02:00
Tim Wiederhake
0c4b391e2a virstorageobject: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:42 +02:00
Tim Wiederhake
bafcc61548 virStorageVolObjNew: Move locking to usage site
This allows a later patch to replace virObjectLock/Unlock
pairs with automatic mutex management code.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:42 +02:00
Tim Wiederhake
d12417de63 virStorageVolObjEndAPI: Remove
This allows a later patch to replace virObjectLock/Unlock
pairs with automatic mutex management code.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:42 +02:00
Tim Wiederhake
8283450370 virStoragePoolObjAddVol: Simplify error path
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:42 +02:00
Tim Wiederhake
a5af1a437c virstorageobj: Replace deprecated virHash functions
Checking for duplicate / NULL keys beforehand will simplify error
handling in a later patch significantly.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-14 19:03:42 +02:00
Andrea Bolognani
08e097f605 ci: Drop openSUSE Leap 15.2
It has reached end of life in January 2022.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:34 +02:00
Andrea Bolognani
60375a96cd ci: Move codestyle job to openSUSE Leap 15.3
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:33 +02:00
Andrea Bolognani
e33366fc19 ci: Add openSUSE Leap 15.3
It was released in June 2021.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:31 +02:00
Andrea Bolognani
67e3589120 ci: Add Alpine Linux 3.15
It was released in November 2021.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:30 +02:00
Andrea Bolognani
de390af9d7 ci: Simplify Alpine Linux 3.14 definition
Using the extended definition format is only necessary when
the defaults are not good enough, but that's not the case here.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:28 +02:00
Andrea Bolognani
766a2d2e52 ci: Drop FreeBSD -CURRENT
All build jobs for the target are explicitly disabled, so
there's no point in keeping the variables file around and we
can simply not mention it in the manifest at all.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-14 17:59:11 +02:00
Andrea Bolognani
c08b2ac24f docs: Fix spelling for Homebrew
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2022-04-14 11:54:28 +02:00
Nikolay Shirokovskiy
f647a4b8dd qemu: fix one more race on undefining and create
[1] closes gap in virDomainObjListRemove so that concurrent thread can
not step in and obtain the domain while domain is temporary unlocked. But
there is another gap exist:

thread B - executes create API
thread C - executes undefine API

- thread A executes some job on domain
- threads B and C obtains domain from list and wait for job condition
- thread A finishes its job and C grabs job condition, removes domain
  from list and finishes
- thread B grabs job condition and start the domain, unfortunately
  is not in the list already

[1] commit c7d1c139ca
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Dec 11 11:14:08 2014 +0100

    qemu: avoid rare race when undefining domain

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:48:46 +03:00
Nikolay Shirokovskiy
e55302596b qemu: drop needless acquiring job removing domain
Acquiring job introduced in commit [1] to fix a race described in the
commit. Actually it does not help because we get domain in create API
before acuiring job. Then [2] fixed the race but [1] was not reverted even
it is does not required by [2] to work properly.

[1] commit b629c64e5e
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Oct 30 14:38:35 2014 +0100

    qemu: avoid rare race when undefining domain

[2] commit c7d1c139ca
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Dec 11 11:14:08 2014 +0100

    qemu: avoid rare race when undefining domain

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:46:02 +03:00
Nikolay Shirokovskiy
b66a36e719 qemu: cleanup code to relece SPICE ports
SPICE ports cleanup looks overly complicated. We can just set *reserved
flags whenever port is reserved (auto or non auto).

Also *Reserved flags are not cleared on stop in case of reconnect with
autoport (flags are set on reconnect in qemuProcessGraphicsReservePorts
call). Yeah config is freed in the end of stopping domain but still.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:45:56 +03:00
Nikolay Shirokovskiy
39d93fd8b0 qemu: cleanup code to release VNC websocket port
VNC websocket port cleanup looks a bit repetetive. Let's set websocketReserved
flag whenever we reserve port (auto or not).

Also websocketReserved flag is not cleared on stop in case of reconnect with
auto port (flags is set on reconnect in qemuProcessGraphicsReservePorts
call). Yeah config is freed in the end of stopping domain but still.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:45:49 +03:00
Nikolay Shirokovskiy
2f99afbd9a qemu: fix releasing VNC websocket port domain does not own
Scenario is with two domains with same VNC websocket port.

- start first domain
- start second, it will fail as port is occupied

As a result port will be released which breaks port reservation logic.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:45:39 +03:00
Nikolay Shirokovskiy
658ce2c3d4 qemu: cleanup code to release VNC port
Code to release VNC port looks repetitive. The reason is there were
originally 2 functions to release ports - for auto and non-auto cases.

Also portReserved flag is not cleared on stop in case of reconnect with
auto port (flags is set on reconnect in qemuProcessGraphicsReservePorts call).
Yeah config is freed in the end of stopping domain but still.

Let's use this flag whenever we reserve port (auto or not). This makes
things clearer.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-04-13 17:45:12 +03:00
Peter Krempa
8b60342f76 docs: Adapt to semantic tag usage of docutils-0.17 and later
Docutils-0.17 switched to using <main> instead of a <div
class='document'> and <section> instead of <div class='section'>.

To ensure that our pages still work we need to slightly adapt our XSL
stylesheet to select the <main> tag properly and adapt the CSS to also
select the 'section' element instead of a class and to apply to a <main>
tag with the appropriate names.

Docutils-0.17 also changed to use 'h2' for section heading instead of
'h1'.

Note the styles applied to the 'main' element with certain id can't be
made more universal by just applying to the id itself, as in certain
cases (e.g. 'documentation') we also have sections with that name. This
was previously ensured by also matching the 'document' class which would
make it equal to the 'main' element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2022-04-13 13:02:06 +02:00
Peter Krempa
b27937972f docs/css: Simplify selector for heading of 'knowledge-base' and 'documentation' pages
Select direct 'h1' children of elements named 'knowledge-base' and
'documentation. It's simpler and will also work properly with
docutils-0.17 and later where we don't have a div with class 'document'
wrapping everything.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2022-04-13 13:02:06 +02:00
Peter Krempa
67263604e6 docs: man: Add description of 'calc_mode' and 'vcpu.<num>.megabytes_per_second' dirtyrate mode
Commit 42d36b65a3 added new fields to the API docs but didn't add the
virsh man page equivalent.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2073867
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2022-04-13 13:00:22 +02:00
Peter Krempa
a89b17c2a7 docs: kbase: internals: Make 'overview' page useful and link to it
While the content is slightly outdated it's still a good primer on how
an API call traverses through the client library and to the remote
driver.

To make the page useful, this commit:
 - removes the paragraphs which were intended to serve as a directory
   page for the 'internals' subdirectory
 - adds a note saying that some facts might not be up to date
 - adds linking to this page from the kbase directory page
 - adds more monospace formatting around function names

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-12 12:53:32 +02:00
Peter Krempa
b51afd97e5 docs: Convert 'internals' to RST and move it to 'kbase/internal/overview.rst'
Note that this document was not referenced from any top level page. This
patch does a straight conversion and leaves it unreferenced.

Next patch will then modify it to serve as an overview (hence the new
name) of how an API call happens.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2022-04-12 12:53:32 +02:00