[libvirt] [PATCH 0/4] Remove more deprecated options
by Thomas Huth
These options are deprecated since at least two releases, and nobody
complained. Time to remove them now.
(I'm sending these patches as a series since Paolo asked me to send a PULL
request on my own for them ... but if one of the subsystems maintainers
prefers to take the patches through their own tree instead, just let me
know)
Thomas Huth (4):
Remove the deprecated -balloon option
Remove the deprecated -nodefconfig option
Remove the deprecated options -startdate, -localtime and -rtc-td-hack
net: Remove the deprecated -tftp, -bootp, -redir and -smb options
docs/interop/live-block-operations.rst | 4 +-
docs/virtio-balloon-stats.txt | 6 +-
include/net/net.h | 3 -
include/net/slirp.h | 4 -
net/slirp.c | 132 ++++++++-------------------------
os-posix.c | 8 --
qemu-deprecated.texi | 56 --------------
qemu-options.hx | 36 +--------
vl.c | 132 ++++++---------------------------
9 files changed, 58 insertions(+), 323 deletions(-)
--
1.8.3.1
6 years, 4 months
[libvirt] [PATCH] tests: qemuxml2argv: Drop some unused args files
by Peter Krempa
aarch64-acpi-nouefi and hostdev-scsi-boot are unused. Noticed when
checking whether '-nodefconfig' is still used by libvirt.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemuxml2argvdata/aarch64-acpi-nouefi.args | 22 ---------------------
tests/qemuxml2argvdata/hostdev-scsi-boot.args | 26 -------------------------
2 files changed, 48 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/aarch64-acpi-nouefi.args
delete mode 100644 tests/qemuxml2argvdata/hostdev-scsi-boot.args
diff --git a/tests/qemuxml2argvdata/aarch64-acpi-nouefi.args b/tests/qemuxml2argvdata/aarch64-acpi-nouefi.args
deleted file mode 100644
index 5d9e1fb7c8..0000000000
--- a/tests/qemuxml2argvdata/aarch64-acpi-nouefi.args
+++ /dev/null
@@ -1,22 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-aarch64 \
--name guest \
--S \
--M virt \
--cpu host \
--m 1024 \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \
--nographic \
--nodefconfig \
--nodefaults \
--monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \
--boot c \
--kernel /var/lib/libvirt/images/guest.vmlinux \
--initrd /var/lib/libvirt/images/guest.initramfs \
--append 'console=ttyAMA0 rw root=/dev/vda rootwait'
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-boot.args b/tests/qemuxml2argvdata/hostdev-scsi-boot.args
deleted file mode 100644
index efbdc81415..0000000000
--- a/tests/qemuxml2argvdata/hostdev-scsi-boot.args
+++ /dev/null
@@ -1,26 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-i686 \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9466-926a-d65c16db1809 \
--nographic \
--nodefconfig \
--nodefaults \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x3 \
--usb \
--drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--drive file=/dev/sg0,if=none,id=drive-hostdev0 \
--device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\
-drive=drive-hostdev0,id=hostdev0,bootindex=1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
--
2.16.2
6 years, 4 months
[libvirt] [PATCH 0/7] cgroup cleanup
by Pavel Hrdina
Another small set of cgroup cleanup patches as preparation for
cgroup v2.
Pavel Hrdina (7):
vircgroup: Duplicate string before modifying
vircgroup: Extract controller detection into function
vircgroup: Extract placement validation into function
vircgroup: Split virCgroupPathOfController into two functions
vircgroup: Call virCgroupRemove inside virCgroupMakeGroup
vircgroup: Simplify if conditions in virCgroupMakeGroup
vircgroup: Remove obsolete sa_assert
src/util/vircgroup.c | 200 +++++++++++++++++++++++++------------------
src/util/vircgroup.h | 2 +-
2 files changed, 118 insertions(+), 84 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH v4] qemu: qemuDomainChangeNet: validity checks should be done before XML autocompletion
by Katerina Koukiou
This patch ensures that changes in attributes of interfaces will emit
errors accept if they are missing from the XML.
Previously we were falsely reporting successful updates, because some
changed attributes got overwritten before the validity checks.
https://bugzilla.redhat.com/show_bug.cgi?id=1599513
Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
Changes from v3:
Adjusted to Jano's comments in v3; type and address are now checked together.
src/qemu/qemu_hotplug.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 0b84a503bb..4f290b5648 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3598,16 +3598,19 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
goto cleanup;
}
- /* info: if newdev->info is empty, fill it in from olddev,
- * otherwise verify that it matches - nothing is allowed to
- * change. (There is no helper function to do this, so
- * individually check the few feidls of virDomainDeviceInfo that
- * are relevant in this case).
+ /* info: Nothing is allowed to change. First fill the missing newdev->info
+ * from olddev and then check for changes.
*/
- if (!virDomainDeviceAddressIsValid(&newdev->info,
- VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
- virDomainDeviceInfoCopy(&newdev->info, &olddev->info) < 0) {
- goto cleanup;
+ /* if pci addr is missing or is invalid we overwrite it from olddev */
+ if (newdev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE ||
+ !virDomainDeviceAddressIsValid(&newdev->info,
+ newdev->info.type)) {
+ newdev->info.type = olddev->info.type;
+ newdev->info.addr = olddev->info.addr;
+ }
+ if (olddev->info.type != newdev->info.type) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("cannot modify network device address type"));
}
if (!virPCIDeviceAddressEqual(&olddev->info.addr.pci,
&newdev->info.addr.pci)) {
@@ -3622,21 +3625,33 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
/* device alias is checked already in virDomainDefCompatibleDevice */
+ if (newdev->info.rombar == VIR_TRISTATE_BOOL_ABSENT)
+ newdev->info.rombar = olddev->info.rombar;
if (olddev->info.rombar != newdev->info.rombar) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device rom bar setting"));
goto cleanup;
}
+
+ if (!newdev->info.romfile &&
+ VIR_STRDUP(newdev->info.romfile, olddev->info.romfile) < 0)
+ goto cleanup;
if (STRNEQ_NULLABLE(olddev->info.romfile, newdev->info.romfile)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network rom file"));
goto cleanup;
}
+
+ if (newdev->info.bootIndex == 0)
+ newdev->info.bootIndex = olddev->info.bootIndex;
if (olddev->info.bootIndex != newdev->info.bootIndex) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device boot index setting"));
goto cleanup;
}
+
+ if (newdev->info.romenabled == VIR_TRISTATE_BOOL_ABSENT)
+ newdev->info.romenabled = olddev->info.romenabled;
if (olddev->info.romenabled != newdev->info.romenabled) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device rom enabled setting"));
--
2.17.1
6 years, 4 months
[libvirt] [jenkins-ci PATCH] guests: Fix mapping for perl-Digest on Debian Sid
by Andrea Bolognani
It's now part of perl instead of being its own package.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
guests/vars/mappings.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 59a4b01..5df918f 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -539,6 +539,7 @@ mappings:
deb: libdigest-perl
pkg: p5-Digest
rpm: perl-Digest
+ DebianSid: perl
perl-Digest-MD5:
deb: libdigest-perl-md5-perl
--
2.17.1
6 years, 4 months
[libvirt] [PULL 00/12] Ui 20180827 v4 patches
by Gerd Hoffmann
The following changes since commit 5ccac548faf041ff5229a8e8342e3be14a34c8af:
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2018-08-23 17:35:48 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/ui-20180827-v4-pull-request
for you to fetch changes up to b1d380372f31672da9318431e84e79bccd8ef3bf:
util: promote qemu_egl_rendernode_open() to libqemuutil (2018-08-27 10:51:44 +0200)
----------------------------------------------------------------
ui: misc fixes which piled up during 3.0 release freeze
----------------------------------------------------------------
Daniel P. Berrangé (2):
doc: switch to modern syntax for VNC TLS setup
vnc: remove support for deprecated tls, x509, x509verify options
Marc-André Lureau (3):
ui: use enum to string helpers
dmabuf: add y0_top, pass it to spice
util: promote qemu_egl_rendernode_open() to libqemuutil
Paolo Bonzini (2):
spice-display: access ptr_x/ptr_y under Mutex
spice-display: fix qemu_spice_cursor_refresh_bh locking
Peter Wu (1):
vnc: fix memleak of the "vnc-worker-output" name
Philippe Mathieu-Daudé (1):
ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
Tao Wu (1):
sdl2: redraw correctly when scanout_mode enabled.
Thomas Huth (2):
ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag
ui/sdl2: Fix broken -full-screen CLI option
include/qemu/drm.h | 6 ++++
include/ui/console.h | 1 +
qemu-keymap.c | 2 +-
ui/console.c | 6 ++--
ui/egl-helpers.c | 51 ++--------------------------
ui/sdl2-gl.c | 5 +++
ui/sdl2.c | 13 +++-----
ui/spice-display.c | 42 +++++++++++++++--------
ui/vnc-enc-tight.c | 2 +-
ui/vnc-jobs.c | 3 +-
ui/vnc.c | 94 ++--------------------------------------------------
util/drm.c | 66 ++++++++++++++++++++++++++++++++++++
MAINTAINERS | 1 +
qemu-deprecated.texi | 20 -----------
qemu-doc.texi | 20 ++++++++---
qemu-options.hx | 43 ------------------------
util/Makefile.objs | 1 +
17 files changed, 139 insertions(+), 237 deletions(-)
create mode 100644 include/qemu/drm.h
create mode 100644 util/drm.c
--
2.9.3
6 years, 4 months
[libvirt] [PATCH] vl.c deprecate incorrect CPUs topology
by Igor Mammedov
-smp [cpus],sockets/cores/threads[,maxcpus] should describe topology
so that total number of logical CPUs [sockets * cores * threads]
would be equal to [maxcpus], however historically we didn't have
such check in QEMU and it is possible to start VM with an invalid
topology.
Deprecate invalid options combination so we can make sure that
the topology VM started with is always correct in the future.
Users with an invalid sockets/cores/threads/maxcpus values should
fix their CLI to make sure that
[sockets * cores * threads] == [maxcpus]
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
---
qemu-deprecated.texi | 11 +++++++++++
vl.c | 6 ++++++
2 files changed, 17 insertions(+)
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 87212b6..d5d9ce6 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -159,6 +159,17 @@ The 'file' driver for drives is no longer appropriate for character or host
devices and will only accept regular files (S_IFREG). The correct driver
for these file types is 'host_cdrom' or 'host_device' as appropriate.
+@subsection -smp X,[socket=a,core=b,thread=c],maxcpus=Y (since 3.1)
+
+CPU topology properties should describe whole machine topology including
+possible CPUs. but historically it was possible to start QEMU with
+an incorrect topology where
+ socket * core * thread >= X && < maxcpus
+which could lead to incorrect topology enumeration by the guest.
+Support for invalid topology will be removed, end user must ensure
+that topology described with -smp includes all possible cpus, i.e.:
+ socket * core * thread == maxcpus
+
@section QEMU Machine Protocol (QMP) commands
@subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0)
diff --git a/vl.c b/vl.c
index 5ba06ad..bc53828 100644
--- a/vl.c
+++ b/vl.c
@@ -1238,6 +1238,12 @@ static void smp_parse(QemuOpts *opts)
exit(1);
}
+ if (sockets * cores * threads != max_cpus) {
+ warn_report("Invalid CPUs topology deprecated. "
+ "sockets (%u) * cores (%u) * threads (%u) "
+ "!= maxcpus (%u)",
+ sockets, cores, threads, max_cpus);
+ }
if (sockets * cores * threads > max_cpus) {
error_report("cpu topology: "
"sockets (%u) * cores (%u) * threads (%u) > "
--
2.7.4
6 years, 4 months
[libvirt] [PULL 00/12] Ui 20180823 v3 patches
by Gerd Hoffmann
The following changes since commit d0092d90eb546a8bbe9e9120426c189474123797:
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180820' into staging (2018-08-20 17:41:18 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/ui-20180823-v3-pull-request
for you to fetch changes up to 63cde1d13d0767f778a130e2c93c15ad709e1276:
util: promote qemu_egl_rendernode_open() to libqemuutil (2018-08-23 11:53:26 +0200)
----------------------------------------------------------------
ui: misc fixes which piled up during 3.0 release freeze
----------------------------------------------------------------
Daniel P. Berrangé (2):
doc: switch to modern syntax for VNC TLS setup
vnc: remove support for deprecated tls, x509, x509verify options
Marc-André Lureau (3):
ui: use enum to string helpers
dmabuf: add y0_top, pass it to spice
util: promote qemu_egl_rendernode_open() to libqemuutil
Paolo Bonzini (2):
spice-display: access ptr_x/ptr_y under Mutex
spice-display: fix qemu_spice_cursor_refresh_bh locking
Peter Wu (1):
vnc: fix memleak of the "vnc-worker-output" name
Philippe Mathieu-Daudé (1):
ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
Tao Wu (1):
sdl2: redraw correctly when scanout_mode enabled.
Thomas Huth (2):
ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag
ui/sdl2: Fix broken -full-screen CLI option
include/qemu/drm.h | 6 ++++
include/ui/console.h | 1 +
qemu-keymap.c | 2 +-
ui/console.c | 6 ++--
ui/egl-helpers.c | 51 ++--------------------------
ui/sdl2-gl.c | 5 +++
ui/sdl2.c | 13 +++-----
ui/spice-display.c | 42 +++++++++++++++--------
ui/vnc-enc-tight.c | 2 +-
ui/vnc-jobs.c | 3 +-
ui/vnc.c | 94 ++--------------------------------------------------
util/drm.c | 66 ++++++++++++++++++++++++++++++++++++
MAINTAINERS | 1 +
qemu-deprecated.texi | 20 -----------
qemu-doc.texi | 20 ++++++++---
qemu-options.hx | 43 ------------------------
util/Makefile.objs | 1 +
17 files changed, 139 insertions(+), 237 deletions(-)
create mode 100644 include/qemu/drm.h
create mode 100644 util/drm.c
--
2.9.3
6 years, 4 months
[libvirt] [PATCH] apparmor: fix ptrace rules with kernel 4.18
by Christian Ehrhardt
Due to kernel upstream change 338d0be4 ("apparmor: fix ptrace read check")
libvirt now hits apparmor denies like:
apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd"
pid=4409 comm="libvirtd" requested_mask="read" denied_mask="read"
peer="libvirt-14e92a75-7668-4b97-8f92-322fc1b9c78a"
Extend the ptrace rule to also allow 'ptrace (read)' for libvirtd to work
with these newer kernels.
Fixes: https://bugs.launchpad.net/bugs/1788603
Reported-by: Thadeu Lima de Souza Cascardo <thadeu.cascardo(a)canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt(a)canonical.com>
---
examples/apparmor/usr.sbin.libvirtd | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
index 80e348b7ee..f0ffc53008 100644
--- a/examples/apparmor/usr.sbin.libvirtd
+++ b/examples/apparmor/usr.sbin.libvirtd
@@ -50,10 +50,10 @@
# for --p2p migrations
unix (send, receive) type=stream addr=none peer=(label=unconfined addr=none),
- ptrace (trace) peer=unconfined,
- ptrace (trace) peer=/usr/sbin/libvirtd,
- ptrace (trace) peer=/usr/sbin/dnsmasq,
- ptrace (trace) peer=libvirt-*,
+ ptrace (read,trace) peer=unconfined,
+ ptrace (read,trace) peer=/usr/sbin/libvirtd,
+ ptrace (read,trace) peer=/usr/sbin/dnsmasq,
+ ptrace (read,trace) peer=libvirt-*,
signal (send) peer=/usr/sbin/dnsmasq,
signal (read, send) peer=libvirt-*,
--
2.17.1
6 years, 4 months
[libvirt] [PATCH v2] qemu: Start domain on a node without cpu affinity
by Roman Bolshakov
qemuProcessInitCpuAffinity prevents a VM from getting started on a
platform that uses cpu affinity wrapper stubs e.g. macOS.
The patch adds qemuProcessInitCpuAffinity stub on all platforms without
HAVE_SCHED_GETAFFINITY or HAVE_BSD_CPU_AFFINITY.
Signed-off-by: Roman Bolshakov <r.bolshakov(a)yadro.com>
---
Changes since v1:
* Replaced no-op virProcessGetAffinity with qemuProcessInitCpuAffinity
stub.
src/qemu/qemu_process.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ab749389ee..28d52f01f6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2343,6 +2343,7 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver,
/*
* To be run between fork/exec of QEMU only
*/
+#if defined(HAVE_SCHED_GETAFFINITY) || defined(HAVE_BSD_CPU_AFFINITY)
static int
qemuProcessInitCpuAffinity(virDomainObjPtr vm)
{
@@ -2413,6 +2414,13 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm)
virBitmapFree(hostcpumap);
return ret;
}
+#else
+static int
+qemuProcessInitCpuAffinity(virDomainObjPtr vm ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+#endif
/* set link states to down on interfaces at qemu start */
static int
--
2.17.0
6 years, 4 months