[PATCH] qemu_namespace: Umount the original /dev before replacing it with tmpfs

2022-12-16 Thread Michal Privoznik
gi?id=2151869#c6 Signed-off-by: Michal Privoznik --- src/qemu/qemu_namespace.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index 90c0b90024..a6b9af1307 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu

[PATCH] meson: Provide default values for nonexistent xenlight pkgconfig vars

2022-12-12 Thread Michal Privoznik
e case and we should specifically set 'default_value' so that the empty string is returned if pkgconfig variable doesn't exist. Fixes: 968479adcfa5c49b29b7b6680dcaffde1408f044 Signed-off-by: Michal Privoznik --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH] formatcaps: Update capabilities example

2022-12-12 Thread Michal Privoznik
se by showing an actual output of 'virsh capabilities' as obtained on my machine. Signed-off-by: Michal Privoznik --- docs/formatcaps.rst | 230 +--- 1 file changed, 176 insertions(+), 54 deletions(-) diff --git a/docs/formatcaps.rst b/docs/forma

[PATCH] virnuma: Allow multiple nodes for preferred policy

2022-12-09 Thread Michal Privoznik
whether the kernel has support for the new mode (1) or not (0). Putting this all together, we can lift our check for sufficiently new kernel and libnuma. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2151064 Signed-off-by: Michal Privoznik --- meson.build| 3 +++ src/util

[PATCH v2 2/2] virnetdevtap.c: Disallow pre-existing TAP devices

2022-12-08 Thread Michal Privoznik
8 Signed-off-by: Michal Privoznik --- src/qemu/qemu_interface.c | 2 ++ src/util/virnetdevtap.c | 23 +-- src/util/virnetdevtap.h | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index 4cc76e07a5..26

[PATCH v2 1/2] virnetdev: Make virNetDevGenerateName() return 1 if no name was generated

2022-12-08 Thread Michal Privoznik
e was generated. Signed-off-by: Michal Privoznik --- src/util/virnetdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 66cfc5d781..82dbb486f2 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -3595,7 +3

[PATCH v2 0/2] virnetdevtap.c: Disallow pre-existing TAP devices

2022-12-08 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2022-December/236197.html diff to v1: - Check for existing device iff virNetDevGenerateName() returned early (per Laine's suggestion). Michal Prívozník (2): virnetdev: Make virNetDevGenerateName() return 1 if no name was generated

[PATCH] virnetdevtap.c: Disallow pre-existing TAP devices

2022-12-08 Thread Michal Privoznik
8 Signed-off-by: Michal Privoznik --- src/qemu/qemu_interface.c | 2 ++ src/util/virnetdevtap.c | 31 ++- src/util/virnetdevtap.h | 2 ++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index 4cc76e0

[PATCH] tools: Fix install_mode for some scripts

2022-12-07 Thread Michal Privoznik
=2151202 Signed-off-by: Michal Privoznik --- tools/meson.build | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/meson.build b/tools/meson.build index c41c619af4..fad7f202ad 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -249,7 +249,7 @@ configure_file

[PATCH 5/5] NEWS: Document change of screenshot format for QEMU

2022-12-07 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bc61b9..39f508a6ce 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,10 @@ v9.0.0 (unreleased) * **Improvements** + * qemu: Prefer PNG for domain screenshots

[PATCH 3/5] qemu_monitor: Extend qemuMonitorScreendump() for @format

2022-12-07 Thread Michal Privoznik
The 'screendump' command has new argument 'format'. Let's expose this on our QMP level so that callers can specify the format, if they wish so. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 7 --- src/qem

[PATCH 4/5] qemu: Prefer PNG for domain screenshots

2022-12-07 Thread Michal Privoznik
-by: Michal Privoznik --- src/qemu/qemu_driver.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f6683cbb0a..d509582719 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3291,6 +3291,7

[PATCH 0/5] qemu: Prefer PNG for domain screenshots

2022-12-07 Thread Michal Privoznik
Whilst preparing for libvirt-php release, I want to ditch its imagick dependency which is needed to convert PPM to PNG. But I've learned that QEMU is able to return PNG already which looks more versatile than PPM anyways. Michal Prívozník (5): qemu_caps: Introduce QEMU_CAPS_SCREENSHOT_FORMAT_PNG

[PATCH 2/5] qemu_monitor: Debug print all arguments in qemuMonitorScreendump()

2022-12-07 Thread Michal Privoznik
For some reason, only @file argument is printed into debug logs. The rest of arguments was left out. Include all arguments. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu

[PATCH 1/5] qemu_caps: Introduce QEMU_CAPS_SCREENSHOT_FORMAT_PNG

2022-12-07 Thread Michal Privoznik
In its v7.1.0-rc0~125^2~6 commit, QEMU gained support for taking screenshots in PNG format. Track this capability. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata

[PATCH 2/4] qemu_extdevice: Init paths in qemuExtDevicesPrepareDomain()

2022-12-05 Thread Michal Privoznik
The path generation phase belongs conceptually into domain preparation phase and not host preparation. Move qemuExtDevicesInitPaths() call from qemuExtDevicesPrepareHost() into qemuExtDevicesPrepareDomain(). Signed-off-by: Michal Privoznik --- src/qemu/qemu_extdevice.c | 6 +++--- 1 file

[PATCH 1/4] qemu_process: Document qemuProcessPrepare{Domain, Host}() order

2022-12-05 Thread Michal Privoznik
ation function must be called before the host preparation function (e.g. the host preparation might try to create a file which path is generated in the domain preparation phase). Nevertheless, let's document this expectation. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 4 ++

[PATCH 4/4] qemu: Init ext devices paths on reconnect

2022-12-05 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=2150760 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 19b9242623..c542be5036 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_proc

[PATCH 0/4] qemu: Init ext devices paths on reconnect

2022-12-05 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (4): qemu_process: Document qemuProcessPrepare{Domain,Host}() order qemu_extdevice: Init paths in qemuExtDevicesPrepareDomain() qemu_extdevice: Expose qemuExtDevicesInitPaths() qemu: Init ext devices paths on reconnect src/qemu/qemu_extdevice.c | 8 +++

[PATCH 3/4] qemu_extdevice: Expose qemuExtDevicesInitPaths()

2022-12-05 Thread Michal Privoznik
This function is going to be called outside of qemu_extdevice.c. Expose it to the rest of the driver. Signed-off-by: Michal Privoznik --- src/qemu/qemu_extdevice.c | 2 +- src/qemu/qemu_extdevice.h | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu

[PATCH 0/3] qemu_tpm: Set log file label on migration

2022-12-02 Thread Michal Privoznik
See 3/3 for explanation. Michal Prívozník (3): security: Extend TPM label APIs qemu_tpm: Extend start/stop APIs qemu_tpm: Set log file label on migration src/qemu/qemu_security.c| 13 +++ src/qemu/qemu_security.h| 4 +++- src/qemu/qemu_tpm.c | 22 ++

[PATCH 2/3] qemu_tpm: Extend start/stop APIs

2022-12-02 Thread Michal Privoznik
, just pass true. The juicy bits are soon to come. Signed-off-by: Michal Privoznik --- src/qemu/qemu_security.c | 13 + src/qemu/qemu_security.h | 4 +++- src/qemu/qemu_tpm.c | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_security.c b/src

[PATCH 3/3] qemu_tpm: Set log file label on migration

2022-12-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_tpm.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 8dba716ef2..0939f64e4e 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -926,6 +926,7

[PATCH 1/3] security: Extend TPM label APIs

2022-12-02 Thread Michal Privoznik
le but not on the state. Therefore, extend these APIs for a boolean flag that when set does both, but when unset does only 2). Signed-off-by: Michal Privoznik --- src/qemu/qemu_security.c| 6 ++--- src/security/security_driver.h | 6 +++-- src/security/security_manager.c | 10 +---

[PATCH] commandtest: Comply with FreeBSD poll()

2022-12-01 Thread Michal Privoznik
r we'd get both POLLIN and POLLHUP after the very first time poll() returns. That's very unfortunate, but okay - we can just check whether read() returned zero and break from the reading loop. Signed-off-by: Michal Privoznik --- tests/commandtest.c | 3 +++ 1 file changed, 3 insertio

[PATCH] node_device_conf: Avoid memleak in virNodeDeviceGetPCIVPDDynamicCap()

2022-11-30 Thread Michal Privoznik
virNodeDeviceGetPCIDynamicCaps() behave as well. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143235 Signed-off-by: Michal Privoznik --- src/conf/node_device_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 83e66b85e3

[PATCH 9/9] tests: Use virTestCompareToString() more

2022-11-30 Thread Michal Privoznik
ern in testNWFilterEBIPTablesAllTeardown() so I had to fix it manually. Also, I manually fixed testFormat() in tests/sockettest.c as I didn't bother writing another spatch rule just for that. Signed-off-by: Michal Privoznik --- tests/commandtest.c | 33 +++-

[PATCH 4/9] virCommandSetSendBuffer: Take double pointer of @buffer

2022-11-30 Thread Michal Privoznik
The virCommandSetSendBuffer() function consumes passed @buffer, but takes it only as plain pointer. Switch to a double pointer to make this obvious. This allows us then to drop all g_steal_pointer() in callers. Signed-off-by: Michal Privoznik --- src/qemu/qemu_tpm.c | 2 +- src/util

[PATCH 8/9] tests: Don't wrap virTestDifference() arguments in NULLSTR()

2022-11-30 Thread Michal Privoznik
The virTestDifference() is perfectly capable of handling NULL arguments. There's no need to wrap arguments in NULLSTR(). Signed-off-by: Michal Privoznik --- tests/virnetdevbandwidthtest.c | 4 +--- tests/virnetdevopenvswitchtest.c | 8 ++-- 2 files changed, 3 insertions(+), 9 dele

[PATCH 1/9] vircommand: Document virCommandSetSendBuffer() behaviour wrt daemonize

2022-11-30 Thread Michal Privoznik
ff-by: Michal Privoznik --- src/util/vircommand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index bbfbe19706..cdc74bc2fd 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1693,6 +1693,9 @@ virCommandFreeSendBuffers(virCommand

[PATCH 7/9] virbuftest: Cleanup code around virTestDifference()

2022-11-30 Thread Michal Privoznik
nything, and if it is on, then much more information is printed by subsequent virTestDifference(). This makes the STRNEQ() + virTestDifference() combo look similar to the rest of tests and thus can be picked up by spatch later. Signed-off-by: Michal Privoznik --- tests/virbuftest.c | 8 +

[PATCH 6/9] commandtest: Use virTestCompareToFile() in checkoutput()

2022-11-30 Thread Michal Privoznik
virTestCompareToFile() except for the nice feature that the virTestCompareToFile() has: VIR_TEST_OUTPUT_REGENERATE. Signed-off-by: Michal Privoznik --- tests/commandtest.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/commandtest.c b/tests/commandtest.c index

[PATCH 2/9] virCommandDoAsyncIO: Drop misleading statement about main event loop

2022-11-30 Thread Michal Privoznik
the original state. Signed-off-by: Michal Privoznik --- src/util/vircommand.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index cdc74bc2fd..4f60432c0a 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -3078,8 +3078,6

[PATCH 5/9] commandtest: Test virCommandSetSendBuffer() with virCommandDoAsyncIO()

2022-11-30 Thread Michal Privoznik
Introduce a test case which ensures that a daemonized process can work with virCommandSetSendBuffer() when async IO is enabled. Signed-off-by: Michal Privoznik --- tests/commanddata/test29.log | 20 tests/commandtest.c | 97 2 files changed

[PATCH 3/9] commandtest: Use unsigned char in test27()

2022-11-30 Thread Michal Privoznik
In test27() the virCommandSetSendBuffer() is used, which expects unsigned char. Use that type for variables which are passed to the function. Signed-off-by: Michal Privoznik --- tests/commandtest.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests

[PATCH 0/9] Couple of virCommand related improvements

2022-11-30 Thread Michal Privoznik
Found these on a abandoned branch, but they are still worth merging. Polished them a bit though. Michal Prívozník (9): vircommand: Document virCommandSetSendBuffer() behaviour wrt daemonize virCommandDoAsyncIO: Drop misleading statement about main event loop commandtest: Use unsigned char in

[PATCH] selinux: Reflect context_str() type change

2022-11-29 Thread Michal Privoznik
As of [1]. libselinux changed the type of context_str() - it now returns a const string. Follow this change in our code base. 1: https://github.com/SELinuxProject/selinux/commit/dd98fa322766760c4e1f029cf19d2515a583304f Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 4

[PATCH 2/2] virnetdevbandwidth: Unbreak tc filter update on Linux-4.20+

2022-11-24 Thread Michal Privoznik
friends) where this practice was turned into error. But that's okay - we can delete the specific filter we are after and not touch the hash table at all. Signed-off-by: Michal Privoznik --- src/util/virnetdevbandwidth.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view'

2022-11-24 Thread Michal Privoznik
es must be swapped. But that's not true. An easy reproducer is to start a domain with two -s: one type of network, the other of type ethernet and configure the same for both. Reversed setting can then be observed (e.g. via tc). Reported-by: Oleg Vasilev Signed-off-by: Michal Privoznik

[PATCH 0/2] Couple of domain fixes

2022-11-24 Thread Michal Privoznik
The first one fixes a bug that was reported on the list: https://listman.redhat.com/archives/libvir-list/2022-November/235922.html The second one - I've noticed while investigating the first one. Michal Prívozník (2): conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view' virnetdevban

[PATCH 0/2] virsh: Two simple long version output fixes

2022-11-24 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virsh: Format -V output properly virsh: Report iSCSI-direct backend in long version tools/virsh.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.37.4

[PATCH 2/2] virsh: Report iSCSI-direct backend in long version

2022-11-24 Thread Michal Privoznik
We already report whether iSCSI backend was enabled at compile time, but we don't do the same with iSCSI-direct backend. Signed-off-by: Michal Privoznik --- tools/virsh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virsh.c b/tools/virsh.c index ad11f4a9ac..8de85f2516 1

[PATCH 1/2] virsh: Format -V output properly

2022-11-24 Thread Michal Privoznik
When displaying long version (virsh -V), the 'Virtuozzo Storage' substring lacks leading space and thus produces awful output. Signed-off-by: Michal Privoznik --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[PATCH] rpc: Mark close callback (un-)register as high priority

2022-11-23 Thread Michal Privoznik
ck for public API is Parallels (vz). And that can't block really. And for virConnectUnregisterCloseCallback() it's the same story. Therefore, both can be marked as high priority. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143840 Signed-off-by: Michal Privoznik --- src/remo

[PATCH v2] qemu_tpm: Check for qemuTPMSetupEncryption() errors

2022-11-22 Thread Michal Privoznik
be returned to indicate error. Signed-off-by: Michal Privoznik --- v2 of: https://listman.redhat.com/archives/libvir-list/2022-November/235866.html diff to v1: - Ignore error from virCommandSetSendBuffer() as it'll be reported later. Don't actually jump onto error label as it would

[PATCH] qemu_tpm: Check for qemuTPMSetupEncryption() errors

2022-11-22 Thread Michal Privoznik
more specific. Signed-off-by: Michal Privoznik --- src/qemu/qemu_tpm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 15ee7db757..502a77b5b3 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -635,7 +635,12

[PATCH] virmockstathelpers: Load aliases for 64-bit time

2022-11-21 Thread Michal Privoznik
spectively. Fortunately, no other variant (__xstat(), __xstat64()) has _time64 alternative and thus does not need similar treatment. Similarly, musl is not affected by this. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/404 Signed-off-by: Michal Privoznik --- Mind you, after this I still see

[PATCH] tests: Drop needless virrandom mock from two tests

2022-11-21 Thread Michal Privoznik
Nothing in virnettlscontexttest nor virnettlssessiontest calls any of random number generator functions overridden virrandommock. GnuTLS handles RNG within itself. Therefore, there's no need to preload the mock. Signed-off-by: Michal Privoznik --- tests/virnettlscontexttest.c | 2 +-

[PATCH 7/7] conf: Declare and use autoptr for virDomainMemoryDef

2022-11-16 Thread Michal Privoznik
Register virDomainMemoryDefFree() to do the cleanup. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 24 ++-- src/conf/domain_conf.h | 1 + 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[PATCH 4/7] vmx: Convert virVMXConfigScanResultsCollector() to use STRCASESKIP()

2022-11-16 Thread Michal Privoznik
Now that we have STRCASESKIP() there's no need to open code it. Convert virVMXConfigScanResultsCollector() so that it uses this new macro. Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/

[PATCH 2/7] docs: Fill missing docs on STRCASEPREFIX() and STRSKIP()

2022-11-16 Thread Michal Privoznik
We document use of our STR*() macros, but somehow missed STRCASEPREFIX() and STRSKIP(). Signed-off-by: Michal Privoznik --- docs/coding-style.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index d4c9d3b8ab..1faaf681e4

[PATCH 3/7] internal: Introduce STRCASESKIP()

2022-11-16 Thread Michal Privoznik
There is so far one case where STRCASEPREFIX(a, b) && a + strlen(b) combo is used (in virVMXConfigScanResultsCollector()), but there will be more. Do what we do usually: introduce a macro. Signed-off-by: Michal Privoznik --- docs/coding-style.rst | 9 + src/internal.h|

[PATCH 1/7] coding-style: Follow our own recommendation wrt spacing around commas

2022-11-16 Thread Michal Privoznik
We require a space after a comma and even document this in our coding style document. However, our own rule is broken in the very same document when listing string comparison macros. Separate macro arguments properly. Signed-off-by: Michal Privoznik --- docs/coding-style.rst | 18

[PATCH 6/7] conf: Introduce virDomainMemoryDefNew()

2022-11-16 Thread Michal Privoznik
This is new allocator for virDomainMemoryDef struct which also sets some default values: @model and @targetNode. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 26 +++--- src/conf/domain_conf.h | 1 + 2 files changed, 20 insertions(+), 7 deletions(-) diff

[PATCH 5/7] vmx: Rework virVMXConfigScanResultsCollector slightly

2022-11-16 Thread Michal Privoznik
vSphere domain can have is (): ten [1]. This will fit into signed int easily anywhere. 1: https://configmax.esp.vmware.com/guest?vmwareproduct=vSphere&release=vSphere%208.0&categories=1-0 Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 8 1 file changed, 4 insertions(+), 4 d

[PATCH 0/7] Couple of miscellaneous cleanups

2022-11-16 Thread Michal Privoznik
There's this request for us to parse NVDIMMs from .vmx files. Well, we're not there yet - firstly we'd need to deduce NUMA configuration so that we know to which guest NUMA node is the NVDIMM attached. But that is very dynamic and in fact computed on virtual machine startup [1]. Nevertheless, I've

[PATCH 5/7] qemu: Generate thread-context object for memory devices

2022-11-14 Thread Michal Privoznik
When generating memory for memory devices memory-backend-* might be used. This means, we may need to generate thread-context objects too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 9 + .../hugepages-memaccess.x86_64-latest.args

[PATCH 7/7] qemu_hotplug: Generate thread-context object for memory device

2022-11-14 Thread Michal Privoznik
, the __NR_sched_setaffinity syscall is filtered by libseccomp and thus QEMU is unable to instantiate the thread-context object. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[PATCH 4/7] qemu_command: Generate thread-context object for guest NUMA memory

2022-11-14 Thread Michal Privoznik
When generating memory for guest NUMA memory-backend-* might be used. This means, we may need to generate thread-context objects too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 10 ++ .../hugepages-memaccess.x86_64-latest.args

[PATCH 6/7] qemu_command: Generate thread-context object for main guest memory

2022-11-14 Thread Michal Privoznik
When generating memory for main guest memory memory-backend-* might be used. This means, we may need to generate thread-context objects too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 9 + .../numatune-system-memory.x86_64-latest.args

[PATCH 2/7] qemu_command: Introduce qemuBuildThreadContextProps()

2022-11-14 Thread Michal Privoznik
d thus theoretically could be scheduled to run on CPUs of different NUMA node (which is what I saw occasionally). Therefore, whenever we are pinning memory (IOW setting host-nodes attribute), we can generate thread-context object with the same affinity. Signed-off-by: Michal Privoznik --- src/

[PATCH 3/7] qemu: Delete thread-context objects at domain startup

2022-11-14 Thread Michal Privoznik
allocation the TC object is left behind. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 7 ++ src/qemu/qemu_domain.c | 2 ++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_process.c | 47 + src/qemu/qemu_process.h | 2 ++ 5 files

[PATCH 1/7] qemu_capabilities: Introduce QEMU_CAPS_THREAD_CONTEXT

2022-11-14 Thread Michal Privoznik
bvirt. Therefore, introduce a new capability to track whether QEMU is capable of this object. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 + 3

[PATCH 0/7] qemu: Make memory allocation NUMA aware

2022-11-14 Thread Michal Privoznik
See 2/7 for explanation. Michal Prívozník (7): qemu_capabilities: Introduce QEMU_CAPS_THREAD_CONTEXT qemu_command: Introduce qemuBuildThreadContextProps() qemu: Delete thread-context objects at domain startup qemu_command: Generate thread-context object for guest NUMA memory qemu: Genera

[PATCH] qemu_validate: Use proper printf directive for ssize_t

2022-11-11 Thread Michal Privoznik
In one of recent commits an error message was introduced. In this message a variable of type ssize_t is being printed out, but the corresponding format directive is %ld instead of %zd which breaks on 32bits systems. Switch to proper format. Signed-off-by: Michal Privoznik --- Pushed under

[PATCH] qemu: Add missing 'break' statement in couple of switch()-es

2022-11-09 Thread Michal Privoznik
In recent commits migration of TPM on shared storage was introduced. However, I've only complied it with gcc and thus did not notice that clang build fails due to missing break; at the end of some (empty) cases in switch() statements. Signed-off-by: Michal Privoznik --- Pushed under trivia

[PATCH 31/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.9.0-rc0~162^2~10 the .host_mtu attribute of virtio-net device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal

[PATCH 21/48] qemu: Retire QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 48/48] qemu: Retire QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 41/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 29/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 46/48] qemu: Assume QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
e .args is justified, because the qemuxml2argvdatatest runs these test caseses with very minimalistic set of capabilities, that's nowhere near real life scenario. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 3 +-- tests/qemuxml2argvdata/contro

[PATCH 32/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 20/48] qemu_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 18/48] qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 44/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests

[PATCH 10/48] qemu: Retire QEMU_CAPS_VSERPORT_CHANGE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 42/48] qemu: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 43/48] qemu: Assume QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Michal Privoznik
controller-order.args is justified, because the qemuxml2argvdatatest runs the test case with very minimalistic set of capabilities, that's nowhere near real life scenario. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 3 +-- tests/qemuxml2argvdata/controller-order

[PATCH 26/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 39/48] qemu: Retire QEMU_CAPS_BLOCKIO

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 47/48] qemu_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests

[PATCH 36/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 35/48] qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata

[PATCH 14/48] qemu: Assume QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.12.0-rc0~48^2~25 the qom-list-properties command is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik ---

[PATCH 19/48] qemu: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 06/48] qemu: Retire QEMU_CAPS_NUMA

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 08/48] qemu_agent: Drop @singleSync from _qemuAgent

2022-11-08 Thread Michal Privoznik
ent we can execute the sync command just once - the first time after we've connected. Should agent disconnect in the middle of reading a command, and then connect back again we would get the event and disconnect and connect back again, resulting in the sync command being executed again. Signed

[PATCH 23/48] qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_DISPLAY_OPTIONS

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 25/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.8.0-rc0~116^2~26 the .rx_queue_size attribute of virtio-net device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-

[PATCH 30/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 16/48] qemu: Retire QEMU_CAPS_QOM_LIST_PROPERTIES

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 45/48] qemu: Retire QEMU_CAPS_DISK_SHARE_RW

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 37/48] qemu: Assume QEMU_CAPS_BLOCKIO

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v0.13.0-rc0~1072 the .logical_block_size attribute of virtio-blk device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-

[PATCH 38/48] qemu_capabilities: Stop detecting QEMU_CAPS_BLOCKIO

2022-11-08 Thread Michal Privoznik
All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata

[PATCH 34/48] qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v4.2.0-rc0~23^2~4 the .failover attribute of virtio-net device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal

[PATCH 40/48] qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v2.7.0-rc0~83^2 the .num-queues attribute of virtio-blk device is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal

[PATCH 33/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_HOST_MTU

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 27/48] qemu: Retire QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

2022-11-08 Thread Michal Privoznik
Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[PATCH 22/48] qemu: Assume QEMU_CAPS_QUERY_DISPLAY_OPTIONS

2022-11-08 Thread Michal Privoznik
Introduced in QEMU's commit of v3.1.0-rc3~8^2 the query-display-options command is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik ---

<    1   2   3   4   5   6   7   8   9   10   >